summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2024-09-29 10:17:38 +0200
committerFabian Groffen <grobian@gentoo.org>2024-09-29 10:17:38 +0200
commit1be723dc652709881d976af337e3fe4d610c814e (patch)
treec9ced7b4e05e4061ef9ef457641e852981a1c318
parentscripts/bootstrap-prefix: try harder to find matching SDK to OS (diff)
downloadprefix-1be723dc652709881d976af337e3fe4d610c814e.tar.gz
prefix-1be723dc652709881d976af337e3fe4d610c814e.tar.bz2
prefix-1be723dc652709881d976af337e3fe4d610c814e.zip
sys-devel/gcc-14.2.0: avoid using incompatible __FLT_EVAL_METHOD__
For GCC to use FLT16 mode it needs its own fix-included headers, so during build it should not try to use it, as the system headers don't support this. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--sys-devel/gcc/gcc-14.2.0.ebuild9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys-devel/gcc/gcc-14.2.0.ebuild b/sys-devel/gcc/gcc-14.2.0.ebuild
index a6df03929c..7fe17192e3 100644
--- a/sys-devel/gcc/gcc-14.2.0.ebuild
+++ b/sys-devel/gcc/gcc-14.2.0.ebuild
@@ -134,6 +134,15 @@ src_configure() {
;;
esac
+ case "${CTARGET}" in
+ arm64-apple-darwin*)
+ # math.h from SDKs don't have FLOAT16 support, so we need to
+ # wait until fix-included headers are there with using it
+ # this flag forces GCC not to use FLT16 via __FLT_EVAL_METHOD__
+ myconf+=( 'CFLAGS_FOR_TARGET="-fpermitted-flt-eval-methods=c11"' )
+ ;;
+ esac
+
# Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
# least on Solaris, and AIX /bin/sh is way too slow,
# so force it to use $BASH (that portage uses) - it can't be EPREFIX