commit:     84982b6a98984b097e1f155699d269b3dddc7d2a
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  2 13:02:28 2022 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Aug  2 13:02:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=84982b6a

sys-devel/gcc-12.1.0: workaround compilation issue on arm64-darwin

For some reason when flex invokes m4 during bootstrap of gcc, it fails
which results in an empty file, causing compilation to fail.  This is a
really weird issue only happening on arm64/Apple SI, so just use the
host flex which seems to work correctly.

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 sys-devel/gcc/gcc-12.1.0.ebuild | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys-devel/gcc/gcc-12.1.0.ebuild b/sys-devel/gcc/gcc-12.1.0.ebuild
index 29983dc1e2..590c202d8c 100644
--- a/sys-devel/gcc/gcc-12.1.0.ebuild
+++ b/sys-devel/gcc/gcc-12.1.0.ebuild
@@ -92,6 +92,13 @@ src_configure() {
                        # use sysroot with the linker, #756160
                        export gcc_cv_ld_sysroot=yes
                        ;;
+               arm64-*-darwin*)
+                       # only supported from darwin21, so no conflict with 
above
+                       # case switch
+                       # for the time being use system flex, for our doesn't 
work
+                       # here (while it does fine elsewhere), #778014
+                       export ac_cv_prog_FLEX=/usr/bin/flex
+                       ;;
                *-solaris*)
                        # todo: some magic for native vs. GNU linking?
                        myconf+=( --with-gnu-ld --with-gnu-as 
--enable-largefile )

Reply via email to