1 |
commit: 089297e7fc12562886e29253add293cd71df5bf7 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 7 17:50:46 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 7 17:53:28 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=089297e7 |
7 |
|
8 |
sys-libs/compiler-rt: Revert runtimes build for 15+ |
9 |
|
10 |
Revert to the regular compiler-rt build since the runtimes build |
11 |
did not solve the bootstrap problems as I anticipated. |
12 |
|
13 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
14 |
|
15 |
sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild | 15 ++++++++++----- |
16 |
sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild | 15 ++++++++++----- |
17 |
2 files changed, 20 insertions(+), 10 deletions(-) |
18 |
|
19 |
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 |
20 |
index 8ef4aebf481d..8af221eaa8ad 100644 |
21 |
--- a/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild |
22 |
+++ b/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild |
23 |
@@ -32,7 +32,7 @@ BDEPEND=" |
24 |
) |
25 |
" |
26 |
|
27 |
-LLVM_COMPONENTS=( runtimes compiler-rt cmake llvm/cmake ) |
28 |
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake ) |
29 |
LLVM_PATCHSET=9999-1 |
30 |
llvm.org_set_globals |
31 |
|
32 |
@@ -70,6 +70,7 @@ src_configure() { |
33 |
# pre-set since we need to pass it to cmake |
34 |
BUILD_DIR=${WORKDIR}/${P}_build |
35 |
|
36 |
+ local nolib_flags=( -nodefaultlibs -nostartfiles -lc ) |
37 |
if use clang; then |
38 |
# Only do this conditionally to allow overriding with |
39 |
# e.g. CC=clang-13 in case of breakage |
40 |
@@ -78,14 +79,18 @@ src_configure() { |
41 |
local -x CXX=${CHOST}-clang++ |
42 |
fi |
43 |
strip-unsupported-flags |
44 |
+ # ensure we can use clang before installing compiler-rt |
45 |
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
46 |
+ elif ! test_compiler; then |
47 |
+ if test_compiler "${nolib_flags[@]}"; then |
48 |
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
49 |
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" |
50 |
+ fi |
51 |
fi |
52 |
|
53 |
local mycmakeargs=( |
54 |
- -DLLVM_ENABLE_RUNTIMES=compiler-rt |
55 |
- # this only adds unnecessary req on llvm-lit directory |
56 |
- -DLLVM_INCLUDE_TESTS=OFF |
57 |
- |
58 |
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
59 |
+ |
60 |
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
61 |
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF |
62 |
-DCOMPILER_RT_BUILD_MEMPROF=OFF |
63 |
|
64 |
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 |
65 |
index 8ef4aebf481d..8af221eaa8ad 100644 |
66 |
--- a/sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild |
67 |
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild |
68 |
@@ -32,7 +32,7 @@ BDEPEND=" |
69 |
) |
70 |
" |
71 |
|
72 |
-LLVM_COMPONENTS=( runtimes compiler-rt cmake llvm/cmake ) |
73 |
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake ) |
74 |
LLVM_PATCHSET=9999-1 |
75 |
llvm.org_set_globals |
76 |
|
77 |
@@ -70,6 +70,7 @@ src_configure() { |
78 |
# pre-set since we need to pass it to cmake |
79 |
BUILD_DIR=${WORKDIR}/${P}_build |
80 |
|
81 |
+ local nolib_flags=( -nodefaultlibs -nostartfiles -lc ) |
82 |
if use clang; then |
83 |
# Only do this conditionally to allow overriding with |
84 |
# e.g. CC=clang-13 in case of breakage |
85 |
@@ -78,14 +79,18 @@ src_configure() { |
86 |
local -x CXX=${CHOST}-clang++ |
87 |
fi |
88 |
strip-unsupported-flags |
89 |
+ # ensure we can use clang before installing compiler-rt |
90 |
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
91 |
+ elif ! test_compiler; then |
92 |
+ if test_compiler "${nolib_flags[@]}"; then |
93 |
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
94 |
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" |
95 |
+ fi |
96 |
fi |
97 |
|
98 |
local mycmakeargs=( |
99 |
- -DLLVM_ENABLE_RUNTIMES=compiler-rt |
100 |
- # this only adds unnecessary req on llvm-lit directory |
101 |
- -DLLVM_INCLUDE_TESTS=OFF |
102 |
- |
103 |
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
104 |
+ |
105 |
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
106 |
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF |
107 |
-DCOMPILER_RT_BUILD_MEMPROF=OFF |