commit:     1b3e9f1dc1e6fcce61f1ed7e26b93d69c927177a
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  6 16:49:49 2022 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jun  6 16:49:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=1b3e9f1d

toolchain.eclass: update Darwin hacks for GCC-12

GCC-12 is completely C++, so patch the appropriate file(s) instead.

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

 eclass/toolchain.eclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 782cbeebf2..afd81cfc08 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -615,13 +615,17 @@ toolchain_src_prepare() {
                make_gcc_hard
        fi
 
-       # we use our libtool on Darwin
+       # we use our libtool on Darwin (no longer applies since 12)
        sed -i -e "s:/usr/bin/libtool:${EPREFIX}/usr/bin/${CTARGET}-libtool:" \
                "${S}"/gcc/config/darwin.h || die "sed gcc/config/darwin.h 
failed"
        # add prefixed Frameworks to default search paths (may want to
        # change this in a cross-compile)
+       local darwindriver
+       tc_version_is_at_least 12 \
+               && darwindriver=darwin-c.cc \
+               || darwindriver=darwin-c.c
        sed -i -e "/\"\/System\/Library\/Frameworks\"\,/i\ \   
\"${EPREFIX}/MacOSX.sdk/System/Library/Frameworks\"\, 
\"${EPREFIX}/Frameworks\"\, " \
-               "${S}"/gcc/config/darwin-c.c || die "sed gcc/config/darwin-c.c 
failed"
+               "${S}"/gcc/config/${darwindriver} || die "sed 
gcc/config/${darwindriver} failed"
 
        # Make sure the pkg-config files install into multilib dirs.
        # Since we configure with just one --libdir, we can't use that

Reply via email to