commit:     828d8bf14cac680b319b107412d1eda05661436f
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 20 21:22:10 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jul 20 21:23:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=828d8bf1

sys-libs/compiler-rt: add -nostartfiles to nolib_flags

This avoids bootstrapping failures during e.g. pure LLVM stage builds
as compiler-rt is checking for a working compiler but without -nostartfiles,
is actually checking for a working compiler-rt too (which isn't yet installed!)

See 
https://archives.gentoo.org/gentoo-releng-autobuilds/message/eaafa503472438245449f93c2bb64578:
```
: && /usr/lib/llvm/14/bin/clang -O2 -pipe -nodefaultlibs -lc 
CMakeFiles/cmTC_77c36.dir/testCCompiler.c.o -o cmTC_77c36 && :
ld.lld: error: cannot open crtbeginS.o: No such file or directory
ld.lld: error: cannot open crtendS.o: No such file or directory
clang-14: error: linker command failed with exit code 1 (use -v to see 
invocation)
ninja: build stopped: subcommand failed.
```

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/compiler-rt/compiler-rt-14.0.4.ebuild      | 2 +-
 sys-libs/compiler-rt/compiler-rt-14.0.6.ebuild      | 2 +-
 sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys-libs/compiler-rt/compiler-rt-14.0.4.ebuild 
b/sys-libs/compiler-rt/compiler-rt-14.0.4.ebuild
index 80f426ade02d..7511ea774e2b 100644
--- a/sys-libs/compiler-rt/compiler-rt-14.0.4.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-14.0.4.ebuild
@@ -70,7 +70,7 @@ src_configure() {
        # pre-set since we need to pass it to cmake
        BUILD_DIR=${WORKDIR}/${P}_build
 
-       local nolib_flags=( -nodefaultlibs -lc )
+       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

diff --git a/sys-libs/compiler-rt/compiler-rt-14.0.6.ebuild 
b/sys-libs/compiler-rt/compiler-rt-14.0.6.ebuild
index e5c0203110f9..f63f68d1b652 100644
--- a/sys-libs/compiler-rt/compiler-rt-14.0.6.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-14.0.6.ebuild
@@ -70,7 +70,7 @@ src_configure() {
        # pre-set since we need to pass it to cmake
        BUILD_DIR=${WORKDIR}/${P}_build
 
-       local nolib_flags=( -nodefaultlibs -lc )
+       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

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 c6913b149fa4..379d6dd27c08 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,7 @@ src_configure() {
        # pre-set since we need to pass it to cmake
        BUILD_DIR=${WORKDIR}/${P}_build
 
-       local nolib_flags=( -nodefaultlibs -lc )
+       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

Reply via email to