Skip to content

Commit

Permalink
sys-devel/gcc-14.2.0: avoid using incompatible __FLT_EVAL_METHOD__
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
grobian committed Sep 29, 2024
1 parent 2f9568f commit 1be723d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sys-devel/gcc/gcc-14.2.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1be723d

Please sign in to comment.