Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/
Date: Tue, 02 Aug 2022 13:06:53
Message-Id: 1659445348.84982b6a98984b097e1f155699d269b3dddc7d2a.grobian@gentoo
1 commit: 84982b6a98984b097e1f155699d269b3dddc7d2a
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 2 13:02:28 2022 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 2 13:02:28 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=84982b6a
7
8 sys-devel/gcc-12.1.0: workaround compilation issue on arm64-darwin
9
10 For some reason when flex invokes m4 during bootstrap of gcc, it fails
11 which results in an empty file, causing compilation to fail. This is a
12 really weird issue only happening on arm64/Apple SI, so just use the
13 host flex which seems to work correctly.
14
15 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
16
17 sys-devel/gcc/gcc-12.1.0.ebuild | 7 +++++++
18 1 file changed, 7 insertions(+)
19
20 diff --git a/sys-devel/gcc/gcc-12.1.0.ebuild b/sys-devel/gcc/gcc-12.1.0.ebuild
21 index 29983dc1e2..590c202d8c 100644
22 --- a/sys-devel/gcc/gcc-12.1.0.ebuild
23 +++ b/sys-devel/gcc/gcc-12.1.0.ebuild
24 @@ -92,6 +92,13 @@ src_configure() {
25 # use sysroot with the linker, #756160
26 export gcc_cv_ld_sysroot=yes
27 ;;
28 + arm64-*-darwin*)
29 + # only supported from darwin21, so no conflict with above
30 + # case switch
31 + # for the time being use system flex, for our doesn't work
32 + # here (while it does fine elsewhere), #778014
33 + export ac_cv_prog_FLEX=/usr/bin/flex
34 + ;;
35 *-solaris*)
36 # todo: some magic for native vs. GNU linking?
37 myconf+=( --with-gnu-ld --with-gnu-as --enable-largefile )