summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-08-07 19:50:46 +0200
committerMichał Górny <mgorny@gentoo.org>2022-08-07 19:53:28 +0200
commit089297e7fc12562886e29253add293cd71df5bf7 (patch)
treef4fffcce70260a3d5c6a4d403e3fe23d2ec99991 /sys-libs/compiler-rt
parentsys-devel/binutils: Bump 2.39 patchset to 3 (no revbump) (diff)
downloadgentoo-089297e7fc12562886e29253add293cd71df5bf7.tar.gz
gentoo-089297e7fc12562886e29253add293cd71df5bf7.tar.bz2
gentoo-089297e7fc12562886e29253add293cd71df5bf7.zip
sys-libs/compiler-rt: Revert runtimes build for 15+
Revert to the regular compiler-rt build since the runtimes build did not solve the bootstrap problems as I anticipated. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-libs/compiler-rt')
-rw-r--r--sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild15
-rw-r--r--sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild15
2 files changed, 20 insertions, 10 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 8ef4aebf481d..8af221eaa8ad 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
@@ -32,7 +32,7 @@ BDEPEND="
)
"
-LLVM_COMPONENTS=( runtimes compiler-rt cmake llvm/cmake )
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
LLVM_PATCHSET=9999-1
llvm.org_set_globals
@@ -70,6 +70,7 @@ 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,14 +79,18 @@ src_configure() {
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
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
fi
local mycmakeargs=(
- -DLLVM_ENABLE_RUNTIMES=compiler-rt
- # this only adds unnecessary req on llvm-lit directory
- -DLLVM_INCLUDE_TESTS=OFF
-
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
-DCOMPILER_RT_BUILD_MEMPROF=OFF
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 8ef4aebf481d..8af221eaa8ad 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
@@ -32,7 +32,7 @@ BDEPEND="
)
"
-LLVM_COMPONENTS=( runtimes compiler-rt cmake llvm/cmake )
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
LLVM_PATCHSET=9999-1
llvm.org_set_globals
@@ -70,6 +70,7 @@ 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,14 +79,18 @@ src_configure() {
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
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
fi
local mycmakeargs=(
- -DLLVM_ENABLE_RUNTIMES=compiler-rt
- # this only adds unnecessary req on llvm-lit directory
- -DLLVM_INCLUDE_TESTS=OFF
-
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
-DCOMPILER_RT_BUILD_MEMPROF=OFF