commit:     da1b2fc8251c571f43813ecf04522aba75333df2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  7 17:52:47 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Aug  7 17:53:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da1b2fc8

sys-libs/compiler-rt: Sync 15+ to 14.0.6-r1

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild | 15 +++++++++++----
 sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild | 15 +++++++++++----
 2 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild 
b/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild
index 8af221eaa8ad..9330ad9834cf 100644
--- a/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild
@@ -70,7 +70,6 @@ src_configure() {
        # pre-set since we need to pass it to cmake
        BUILD_DIR=${WORKDIR}/${P}_build
 
-       local nolib_flags=( -nodefaultlibs -nostartfiles -lc )
        if use clang; then
                # Only do this conditionally to allow overriding with
                # e.g. CC=clang-13 in case of breakage
@@ -78,13 +77,21 @@ src_configure() {
                        local -x CC=${CHOST}-clang
                        local -x CXX=${CHOST}-clang++
                fi
+
                strip-unsupported-flags
-               # ensure we can use clang before installing compiler-rt
-               local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
-       elif ! test_compiler; then
+       fi
+
+       if ! test_compiler; then
+               local nolib_flags=( -nodefaultlibs -lc )
+
                if test_compiler "${nolib_flags[@]}"; then
                        local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
                        ewarn "${CC} seems to lack runtime, trying with 
${nolib_flags[*]}"
+               elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
+                       # Avoiding -nostartfiles earlier on for bug #862540
+                       nolib_flags+=( -nostartfiles )
+                       local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+                       ewarn "${CC} seems to lack runtime, trying with 
${nolib_flags[*]}"
                fi
        fi
 

diff --git a/sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild 
b/sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild
index 8af221eaa8ad..9330ad9834cf 100644
--- a/sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild
@@ -70,7 +70,6 @@ src_configure() {
        # pre-set since we need to pass it to cmake
        BUILD_DIR=${WORKDIR}/${P}_build
 
-       local nolib_flags=( -nodefaultlibs -nostartfiles -lc )
        if use clang; then
                # Only do this conditionally to allow overriding with
                # e.g. CC=clang-13 in case of breakage
@@ -78,13 +77,21 @@ src_configure() {
                        local -x CC=${CHOST}-clang
                        local -x CXX=${CHOST}-clang++
                fi
+
                strip-unsupported-flags
-               # ensure we can use clang before installing compiler-rt
-               local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
-       elif ! test_compiler; then
+       fi
+
+       if ! test_compiler; then
+               local nolib_flags=( -nodefaultlibs -lc )
+
                if test_compiler "${nolib_flags[@]}"; then
                        local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
                        ewarn "${CC} seems to lack runtime, trying with 
${nolib_flags[*]}"
+               elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
+                       # Avoiding -nostartfiles earlier on for bug #862540
+                       nolib_flags+=( -nostartfiles )
+                       local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+                       ewarn "${CC} seems to lack runtime, trying with 
${nolib_flags[*]}"
                fi
        fi
 

Reply via email to