commit:     96a3b69fe604926908eab27204f9e96bb705c7b2
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Thu Oct 17 23:52:01 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 18 01:31:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96a3b69f

sys-devel/clang-common: pass flags on darwin differently

Bug: https://bugs.gentoo.org/758167
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/clang-common/clang-common-19.1.1.ebuild          | 14 ++++++++++----
 sys-devel/clang-common/clang-common-19.1.2.ebuild          | 14 ++++++++++----
 sys-devel/clang-common/clang-common-20.0.0.9999.ebuild     | 14 ++++++++++----
 .../clang-common/clang-common-20.0.0_pre20241009.ebuild    | 14 ++++++++++----
 .../clang-common/clang-common-20.0.0_pre20241015.ebuild    | 14 ++++++++++----
 5 files changed, 50 insertions(+), 20 deletions(-)

diff --git a/sys-devel/clang-common/clang-common-19.1.1.ebuild 
b/sys-devel/clang-common/clang-common-19.1.1.ebuild
index 96be6fb619b1..d587000e70f7 100644
--- a/sys-devel/clang-common/clang-common-19.1.1.ebuild
+++ b/sys-devel/clang-common/clang-common-19.1.1.ebuild
@@ -274,10 +274,6 @@ src_install() {
                cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
                        # Gentoo Prefix on Darwin
                        -Wl,-search_paths_first
-                       -Wl,-rpath,${EPREFIX}/usr/lib
-                       -L ${EPREFIX}/usr/lib
-                       -isystem ${EPREFIX}/usr/include
-                       -isysroot ${EPREFIX}/MacOSX.sdk
                EOF
                if use bootstrap-prefix ; then
                        # bootstrap-prefix is only set during stage2 of 
bootstrapping
@@ -286,8 +282,18 @@ src_install() {
                        # EPREFIX.
                        cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
                                -Wl,-rpath,${EPREFIX}/../usr/lib
+                               -Wl,-L,${EPREFIX}/../usr/lib
+                               -isystem ${EPREFIX}/../usr/include
                        EOF
                fi
+               # Using -Wl,-L instead of -L to trick compiler driver to put it
+               # after -isysroot's internal -L
+               cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+                       -Wl,-rpath,${EPREFIX}/usr/lib
+                       -Wl,-L,${EPREFIX}/usr/lib
+                       -isystem ${EPREFIX}/usr/include
+                       -isysroot ${EPREFIX}/MacOSX.sdk
+               EOF
        fi
 }
 

diff --git a/sys-devel/clang-common/clang-common-19.1.2.ebuild 
b/sys-devel/clang-common/clang-common-19.1.2.ebuild
index 96be6fb619b1..d587000e70f7 100644
--- a/sys-devel/clang-common/clang-common-19.1.2.ebuild
+++ b/sys-devel/clang-common/clang-common-19.1.2.ebuild
@@ -274,10 +274,6 @@ src_install() {
                cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
                        # Gentoo Prefix on Darwin
                        -Wl,-search_paths_first
-                       -Wl,-rpath,${EPREFIX}/usr/lib
-                       -L ${EPREFIX}/usr/lib
-                       -isystem ${EPREFIX}/usr/include
-                       -isysroot ${EPREFIX}/MacOSX.sdk
                EOF
                if use bootstrap-prefix ; then
                        # bootstrap-prefix is only set during stage2 of 
bootstrapping
@@ -286,8 +282,18 @@ src_install() {
                        # EPREFIX.
                        cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
                                -Wl,-rpath,${EPREFIX}/../usr/lib
+                               -Wl,-L,${EPREFIX}/../usr/lib
+                               -isystem ${EPREFIX}/../usr/include
                        EOF
                fi
+               # Using -Wl,-L instead of -L to trick compiler driver to put it
+               # after -isysroot's internal -L
+               cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+                       -Wl,-rpath,${EPREFIX}/usr/lib
+                       -Wl,-L,${EPREFIX}/usr/lib
+                       -isystem ${EPREFIX}/usr/include
+                       -isysroot ${EPREFIX}/MacOSX.sdk
+               EOF
        fi
 }
 

diff --git a/sys-devel/clang-common/clang-common-20.0.0.9999.ebuild 
b/sys-devel/clang-common/clang-common-20.0.0.9999.ebuild
index 6eb8b79a8c99..0351c7b25564 100644
--- a/sys-devel/clang-common/clang-common-20.0.0.9999.ebuild
+++ b/sys-devel/clang-common/clang-common-20.0.0.9999.ebuild
@@ -274,10 +274,6 @@ src_install() {
                cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
                        # Gentoo Prefix on Darwin
                        -Wl,-search_paths_first
-                       -Wl,-rpath,${EPREFIX}/usr/lib
-                       -L ${EPREFIX}/usr/lib
-                       -isystem ${EPREFIX}/usr/include
-                       -isysroot ${EPREFIX}/MacOSX.sdk
                EOF
                if use bootstrap-prefix ; then
                        # bootstrap-prefix is only set during stage2 of 
bootstrapping
@@ -286,8 +282,18 @@ src_install() {
                        # EPREFIX.
                        cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
                                -Wl,-rpath,${EPREFIX}/../usr/lib
+                               -Wl,-L,${EPREFIX}/../usr/lib
+                               -isystem ${EPREFIX}/../usr/include
                        EOF
                fi
+               # Using -Wl,-L instead of -L to trick compiler driver to put it
+               # after -isysroot's internal -L
+               cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+                       -Wl,-rpath,${EPREFIX}/usr/lib
+                       -Wl,-L,${EPREFIX}/usr/lib
+                       -isystem ${EPREFIX}/usr/include
+                       -isysroot ${EPREFIX}/MacOSX.sdk
+               EOF
        fi
 }
 

diff --git a/sys-devel/clang-common/clang-common-20.0.0_pre20241009.ebuild 
b/sys-devel/clang-common/clang-common-20.0.0_pre20241009.ebuild
index 6eb8b79a8c99..0351c7b25564 100644
--- a/sys-devel/clang-common/clang-common-20.0.0_pre20241009.ebuild
+++ b/sys-devel/clang-common/clang-common-20.0.0_pre20241009.ebuild
@@ -274,10 +274,6 @@ src_install() {
                cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
                        # Gentoo Prefix on Darwin
                        -Wl,-search_paths_first
-                       -Wl,-rpath,${EPREFIX}/usr/lib
-                       -L ${EPREFIX}/usr/lib
-                       -isystem ${EPREFIX}/usr/include
-                       -isysroot ${EPREFIX}/MacOSX.sdk
                EOF
                if use bootstrap-prefix ; then
                        # bootstrap-prefix is only set during stage2 of 
bootstrapping
@@ -286,8 +282,18 @@ src_install() {
                        # EPREFIX.
                        cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
                                -Wl,-rpath,${EPREFIX}/../usr/lib
+                               -Wl,-L,${EPREFIX}/../usr/lib
+                               -isystem ${EPREFIX}/../usr/include
                        EOF
                fi
+               # Using -Wl,-L instead of -L to trick compiler driver to put it
+               # after -isysroot's internal -L
+               cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+                       -Wl,-rpath,${EPREFIX}/usr/lib
+                       -Wl,-L,${EPREFIX}/usr/lib
+                       -isystem ${EPREFIX}/usr/include
+                       -isysroot ${EPREFIX}/MacOSX.sdk
+               EOF
        fi
 }
 

diff --git a/sys-devel/clang-common/clang-common-20.0.0_pre20241015.ebuild 
b/sys-devel/clang-common/clang-common-20.0.0_pre20241015.ebuild
index 6eb8b79a8c99..0351c7b25564 100644
--- a/sys-devel/clang-common/clang-common-20.0.0_pre20241015.ebuild
+++ b/sys-devel/clang-common/clang-common-20.0.0_pre20241015.ebuild
@@ -274,10 +274,6 @@ src_install() {
                cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
                        # Gentoo Prefix on Darwin
                        -Wl,-search_paths_first
-                       -Wl,-rpath,${EPREFIX}/usr/lib
-                       -L ${EPREFIX}/usr/lib
-                       -isystem ${EPREFIX}/usr/include
-                       -isysroot ${EPREFIX}/MacOSX.sdk
                EOF
                if use bootstrap-prefix ; then
                        # bootstrap-prefix is only set during stage2 of 
bootstrapping
@@ -286,8 +282,18 @@ src_install() {
                        # EPREFIX.
                        cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
                                -Wl,-rpath,${EPREFIX}/../usr/lib
+                               -Wl,-L,${EPREFIX}/../usr/lib
+                               -isystem ${EPREFIX}/../usr/include
                        EOF
                fi
+               # Using -Wl,-L instead of -L to trick compiler driver to put it
+               # after -isysroot's internal -L
+               cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+                       -Wl,-rpath,${EPREFIX}/usr/lib
+                       -Wl,-L,${EPREFIX}/usr/lib
+                       -isystem ${EPREFIX}/usr/include
+                       -isysroot ${EPREFIX}/MacOSX.sdk
+               EOF
        fi
 }
 

Reply via email to