1 |
commit: 1b3e9f1dc1e6fcce61f1ed7e26b93d69c927177a |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 6 16:49:49 2022 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 6 16:49:49 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=1b3e9f1d |
7 |
|
8 |
toolchain.eclass: update Darwin hacks for GCC-12 |
9 |
|
10 |
GCC-12 is completely C++, so patch the appropriate file(s) instead. |
11 |
|
12 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
13 |
|
14 |
eclass/toolchain.eclass | 8 ++++++-- |
15 |
1 file changed, 6 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass |
18 |
index 782cbeebf2..afd81cfc08 100644 |
19 |
--- a/eclass/toolchain.eclass |
20 |
+++ b/eclass/toolchain.eclass |
21 |
@@ -615,13 +615,17 @@ toolchain_src_prepare() { |
22 |
make_gcc_hard |
23 |
fi |
24 |
|
25 |
- # we use our libtool on Darwin |
26 |
+ # we use our libtool on Darwin (no longer applies since 12) |
27 |
sed -i -e "s:/usr/bin/libtool:${EPREFIX}/usr/bin/${CTARGET}-libtool:" \ |
28 |
"${S}"/gcc/config/darwin.h || die "sed gcc/config/darwin.h failed" |
29 |
# add prefixed Frameworks to default search paths (may want to |
30 |
# change this in a cross-compile) |
31 |
+ local darwindriver |
32 |
+ tc_version_is_at_least 12 \ |
33 |
+ && darwindriver=darwin-c.cc \ |
34 |
+ || darwindriver=darwin-c.c |
35 |
sed -i -e "/\"\/System\/Library\/Frameworks\"\,/i\ \ \"${EPREFIX}/MacOSX.sdk/System/Library/Frameworks\"\, \"${EPREFIX}/Frameworks\"\, " \ |
36 |
- "${S}"/gcc/config/darwin-c.c || die "sed gcc/config/darwin-c.c failed" |
37 |
+ "${S}"/gcc/config/${darwindriver} || die "sed gcc/config/${darwindriver} failed" |
38 |
|
39 |
# Make sure the pkg-config files install into multilib dirs. |
40 |
# Since we configure with just one --libdir, we can't use that |