summaryrefslogtreecommitdiff
path: root/sci-libs/openlibm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
commitb8c7370a682e4e29cda623222d17a790c01c3642 (patch)
treef6caa14689bd00a5760eadaa381ff41e50ef3c1b /sci-libs/openlibm
parent8a4997a7e2d1e36c089d4d76935b5a902d98d3d0 (diff)
gentoo auto-resync : 07:08:2024 - 12:37:20
Diffstat (limited to 'sci-libs/openlibm')
-rw-r--r--sci-libs/openlibm/Manifest5
-rw-r--r--sci-libs/openlibm/files/openlibm-0.8.3-stack-protection.patch73
-rw-r--r--sci-libs/openlibm/openlibm-0.8.0.ebuild4
-rw-r--r--sci-libs/openlibm/openlibm-0.8.3.ebuild46
4 files changed, 125 insertions, 3 deletions
diff --git a/sci-libs/openlibm/Manifest b/sci-libs/openlibm/Manifest
index 4d0281f1047a..ada134ecc10f 100644
--- a/sci-libs/openlibm/Manifest
+++ b/sci-libs/openlibm/Manifest
@@ -1,5 +1,8 @@
+AUX openlibm-0.8.3-stack-protection.patch 2065 BLAKE2B 213710329df83d08798cea61d952e6ced7218bad7e80eb9ee8004ccbfaf85a27fc70fb1ac4f6f5b313b47453be1197567296c8cca23fcd65ad037599ff0b17a7 SHA512 7e750cdb2fe9871b1e83291ffac5d255a73f2f577b05f3a3dcb35ee919c38fa26980416d38352805b1b32f91de3b7bcba8fab0f0757bb506786ddbdeb4429739
DIST openlibm-0.7.5.tar.gz 366889 BLAKE2B cd892965122237783cc288e57c965ae56d26fdcce93d89dd764ba659d292ade20baa754af303f04b831902f62f95388e2e7e11c050a0712a235bbc5793f2a9c4 SHA512 fe5797f49e9f9ac70485c53c6096ac273c33c7b44fbb694788717f0e427fe9a8e121939c4c1334f2d20f2fe1f440d952cc20cbdd49717996a2fb9a1045b05799
DIST openlibm-0.8.0.tar.gz 367130 BLAKE2B e516fee18203040b8f3cdffab10c4ca22df638551b420ec7e679ff373221973a013c93520b29395c61c8ef0f0f6c87516c1d4a9885c3bbb5e8cae8900efee6ea SHA512 336dfac1fd4ab6ce256aa0129a211c3556eac46d2e775e5cec9626dc5bbcb4d5e65c86617d72e531694e8c8e6320a0fabc76600a02b0ac9f1d652774d0a94440
+DIST openlibm-0.8.3.tar.gz 374991 BLAKE2B 91474b5c9480753dafb2f85521a8909eaa00febc871bd71d6ffecfd1001200ce66c66c43f4f5738215f04bc109035dcceb2a9f6319e8b9405e6cab65e802aafb SHA512 1c6969e6e3117ddc066697318e43cf42d170750cb85cbed6013eb29d7513d5998eeffbff4a658d222cf637977cb7dca34b7a15814f8870f4e36e880673d757c0
EBUILD openlibm-0.7.5.ebuild 820 BLAKE2B de0436b2b7598936c32951ad3063a4eea11d4f34f16abb30c675d387948cd44eb832c25b7ae6004bba879061d56fd97684761a06eb47619c7d408b0f1384a7d4 SHA512 3d96a505d1f15647ab229e5ef1f1e60f1b1ff9cdb063af2bc20e07b6eee49d76ac2e61939f2f948e311fef034af7c42c75b465110ef748dd770aefcc343d3862
-EBUILD openlibm-0.8.0.ebuild 890 BLAKE2B 452fc8fa61be18602db28ae60890f7aa87066b8f545255eb7560293349107dbe649846876758d82e1c8b553cfb8bf05d20c0cbba60f64f19933a36e2901a72e4 SHA512 6681605b4ba916b934be47c37cdfab8e80896212a6dcf8d26423ddbdaac6c0cd90270fd8f6631a8fdfb545fd198130d81eb6ac045a2e55f567746f2273985cbc
+EBUILD openlibm-0.8.0.ebuild 908 BLAKE2B f966b0c1ce4c6437061fc01caf15c79634350222865e7bea12da31897805bb56d50c43a75fa63060bf0a369b2c4ff394ce559ae0a26a171f9279859662ec0e8c SHA512 a62983295d2e90209e97b311e95d67e93bb2203d66bb9d9b1ba5aa00c034ab4b082bd34dd1fa25b5b2c9abfcbfed98938bf22aa278cfd3e494e17a02716f8f4d
+EBUILD openlibm-0.8.3.ebuild 1129 BLAKE2B 601582977548fd2517cd5908dedfb30d02d4b8358fb9e0ae4250b7e6e9ed46ad6bb7b1d55de3cd37926f702bef0231ff598b818f6ebb6842813161178ba192ae SHA512 8a98ad2018d53ec3b041f5da181ca353ffc59c51792ea7a102fdbd6b26e296e99d22e8c85aeacf044c2fc3031e7b949a22fb5779cbc29fa1fc3edd3a7b7b7d02
MISC metadata.xml 785 BLAKE2B 160415de6f1dd61dfe42488a2aaf716bb6ecb00396ae541c8b385116fb0b5017bc546fdcdd6394ce5c547cd85e7ccf94b7996128355ce3fa9fc7b17478c2949d SHA512 cdc602bce059702ad03d57a67ad9e2897fdcf999fd2d664e76293ddd22741817a042abafd6603c424839780d30b647a82901c468a5d55dc1794fdafd2a281b8c
diff --git a/sci-libs/openlibm/files/openlibm-0.8.3-stack-protection.patch b/sci-libs/openlibm/files/openlibm-0.8.3-stack-protection.patch
new file mode 100644
index 000000000000..91e28b238624
--- /dev/null
+++ b/sci-libs/openlibm/files/openlibm-0.8.3-stack-protection.patch
@@ -0,0 +1,73 @@
+# https://github.com/JuliaMath/openlibm/pull/307
+From 435459ec45b368e618578d2a526edd0c51709ad1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jakov=20Smoli=C4=87?= <jsmolic@gentoo.org>
+Date: Mon, 5 Aug 2024 00:02:28 +0200
+Subject: [PATCH] Add stack markings for GNU to fmod assembly files
+
+This adds stack markings to the missing fmod .S files, otherwise the
+final libopenlibm object file gets marked with an executable stack.
+
+Output when compiling from source on Gentoo Linux:
+
+```
+ * QA Notice: The following files contain writable and executable sections
+ * Files with such sections will not work properly (or at all!) on some
+ * architectures/operating systems. A bug should be filed at
+ * https://bugs.gentoo.org/ to make sure the issue is fixed.
+ * For more information, see:
+ *
+ * https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
+ *
+ * Please include the following list of files in your report:
+ * Note: Bugs should be filed for the respective maintainers
+ * of the package in question and not hardened@gentoo.org.
+ * RWX --- --- usr/lib64/libopenlibm.so.4.0
+```
+---
+ amd64/e_fmod.S | 5 +++++
+ amd64/e_fmodf.S | 5 +++++
+ amd64/e_fmodl.S | 5 +++++
+ 3 files changed, 15 insertions(+)
+
+diff --git a/amd64/e_fmod.S b/amd64/e_fmod.S
+index 37cae39..d2c8ecd 100644
+--- a/amd64/e_fmod.S
++++ b/amd64/e_fmod.S
+@@ -49,3 +49,8 @@ ENTRY(fmod)
+ fstp %st
+ ret
+ END(fmod)
++
++/* Enable stack protection */
++#if defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/amd64/e_fmodf.S b/amd64/e_fmodf.S
+index 197892e..b045e73 100644
+--- a/amd64/e_fmodf.S
++++ b/amd64/e_fmodf.S
+@@ -19,3 +19,8 @@ ENTRY(fmodf)
+ fstp %st
+ ret
+ END(fmodf)
++
++/* Enable stack protection */
++#if defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/amd64/e_fmodl.S b/amd64/e_fmodl.S
+index 64be92f..cab539d 100644
+--- a/amd64/e_fmodl.S
++++ b/amd64/e_fmodl.S
+@@ -45,3 +45,8 @@ ENTRY(fmodl)
+ fstp %st(1)
+ ret
+ END(fmodl)
++
++/* Enable stack protection */
++#if defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--
+2.44.2
+
diff --git a/sci-libs/openlibm/openlibm-0.8.0.ebuild b/sci-libs/openlibm/openlibm-0.8.0.ebuild
index 3d2362897851..df09fa8e2592 100644
--- a/sci-libs/openlibm/openlibm-0.8.0.ebuild
+++ b/sci-libs/openlibm/openlibm-0.8.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -13,7 +13,7 @@ IUSE="static-libs"
LICENSE="public-domain MIT ISC BSD-2 LGPL-2.1+"
# See https://abi-laboratory.pro/index.php?view=timeline&l=openlibm
SLOT="0/4"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux"
src_prepare() {
default
diff --git a/sci-libs/openlibm/openlibm-0.8.3.ebuild b/sci-libs/openlibm/openlibm-0.8.3.ebuild
new file mode 100644
index 000000000000..1751c8a9d1f2
--- /dev/null
+++ b/sci-libs/openlibm/openlibm-0.8.3.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="High quality system independent, open source libm"
+HOMEPAGE="https://github.com/JuliaLang/openlibm"
+SRC_URI="https://github.com/JuliaMath/openlibm/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+IUSE="static-libs"
+LICENSE="public-domain MIT ISC BSD-2 LGPL-2.1+"
+# See https://abi-laboratory.pro/index.php?view=timeline&l=openlibm
+SLOT="0/4"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-stack-protection.patch
+)
+
+src_prepare() {
+ default
+ sed -e "/^OLM_LIBS :=/s/^/#/" -i Makefile || die
+ if ! use static-libs ; then
+ sed -e "/install: /s/install-static//" -i Makefile || die
+ fi
+}
+
+src_compile() {
+ # Build system uses the riscv64 arch variable
+ use riscv && export ARCH=riscv64
+
+ emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ FC="$(tc-getFC)" \
+ AR="$(tc-getAR)" \
+ LD="$(tc-getLD)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" prefix="${EPREFIX}/usr" \
+ libdir="${EPREFIX}/usr/$(get_libdir)" install
+ dodoc README.md
+}