summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-28 23:31:30 +0000
committerSam James <sam@gentoo.org>2023-03-01 02:30:15 +0000
commite1ab113ab5191355b1c4738ddef01a79126710ae (patch)
tree22507c88e01f863af98e4c393cfaed126a0ba0f0 /sci-libs/gsl
parentsys-kernel/rt-sources: add 5.15.96_p61, drop 5.15.95_p60 (diff)
downloadgentoo-e1ab113ab5191355b1c4738ddef01a79126710ae.tar.gz
gentoo-e1ab113ab5191355b1c4738ddef01a79126710ae.tar.bz2
gentoo-e1ab113ab5191355b1c4738ddef01a79126710ae.zip
sci-libs/gsl: fix configure w/ clang 16
Closes: https://bugs.gentoo.org/898410 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs/gsl')
-rw-r--r--sci-libs/gsl/files/gsl-2.7.1-configure-clang16.patch26
-rw-r--r--sci-libs/gsl/gsl-2.7.1-r2.ebuild (renamed from sci-libs/gsl/gsl-2.7.1-r1.ebuild)10
2 files changed, 32 insertions, 4 deletions
diff --git a/sci-libs/gsl/files/gsl-2.7.1-configure-clang16.patch b/sci-libs/gsl/files/gsl-2.7.1-configure-clang16.patch
new file mode 100644
index 000000000000..ba239563a38e
--- /dev/null
+++ b/sci-libs/gsl/files/gsl-2.7.1-configure-clang16.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/898410
+https://savannah.gnu.org/bugs/?63679
+
+Avoid calling the undeclared exit function and future failures
+with compilers which do not support implicit function declarations.
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -449,7 +449,7 @@ int main (void)
+ inf = exp(1.0e10);
+ nan = inf / inf ;
+ status = (nan == nan);
+- exit (status);
++ return status;
+ }]])],[ac_cv_c_ieee_comparisons="yes"],[ac_cv_c_ieee_comparisons="no"],[ac_cv_c_ieee_comparisons="yes"])
+ ])
+
+@@ -469,7 +469,7 @@ int main (void)
+ for (i = 0; i < 5; i++) { z = z / 10.0 ; };
+ for (i = 0; i < 5; i++) { z = z * 10.0 ; };
+ status = (z == 0.0);
+- exit (status);
++ return status;
+ }]])],[ac_cv_c_ieee_denormals="yes"],[ac_cv_c_ieee_denormals="no"],[ac_cv_c_ieee_denormals="yes"])
+ ])
+
diff --git a/sci-libs/gsl/gsl-2.7.1-r1.ebuild b/sci-libs/gsl/gsl-2.7.1-r2.ebuild
index 64e427099641..e65ec799e0d2 100644
--- a/sci-libs/gsl/gsl-2.7.1-r1.ebuild
+++ b/sci-libs/gsl/gsl-2.7.1-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit autotools flag-o-matic toolchain-funcs
@@ -22,20 +22,22 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${WORKDIR}"/${PN}-2.7-cblas.patch
+ "${FILESDIR}"/${PN}-2.7.1-configure-clang16.patch
)
src_prepare() {
- filter-flags -ffast-math
-
default
if use deprecated; then
sed -i -e "/GSL_DISABLE_DEPRECATED/,+2d" configure.ac || die
fi
+
eautoreconf
}
src_configure() {
+ filter-flags -ffast-math
+
if use cblas-external; then
export CBLAS_LIBS="$($(tc-getPKG_CONFIG) --libs cblas)"
export CBLAS_CFLAGS="$($(tc-getPKG_CONFIG) --cflags cblas)"