1 |
commit: f7735b2d87b2e510098235c1cadc00a62818ddf5 |
2 |
Author: Jacob Floyd <cognifloyd <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Dec 31 17:49:04 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 31 17:49:04 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f7735b2d |
7 |
|
8 |
scripts/bootstrap-prefix: properly deal with libcxx with clang |
9 |
|
10 |
- libunwind is not available yet, and has more deps than we care to deal |
11 |
with, so just compile libcxx without libunwind in stage2 & stage3 |
12 |
- llvm and clang need to be built with the same libc++. If you don't |
13 |
build with the same libc++ then you get weird errors where comparing |
14 |
std::error_code's fails because llvm has one errc enum, and clang has |
15 |
a different one. |
16 |
|
17 |
Bug: https://bugs.gentoo.org/758167 |
18 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
19 |
|
20 |
scripts/bootstrap-prefix.sh | 15 ++++++++++----- |
21 |
1 file changed, 10 insertions(+), 5 deletions(-) |
22 |
|
23 |
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh |
24 |
index fd8a343dae..8dae1b5944 100755 |
25 |
--- a/scripts/bootstrap-prefix.sh |
26 |
+++ b/scripts/bootstrap-prefix.sh |
27 |
@@ -234,10 +234,11 @@ configure_toolchain() { |
28 |
mycc=clang |
29 |
compiler_stage1+=" |
30 |
${llvm_deps} |
31 |
+ sys-libs/libcxxabi |
32 |
+ sys-libs/libcxx |
33 |
sys-devel/llvm |
34 |
sys-devel/clang |
35 |
- sys-libs/libcxxabi |
36 |
- sys-libs/libcxx" |
37 |
+ " |
38 |
CC=clang |
39 |
CXX=clang++ |
40 |
# avoid going through hoops and deps for |
41 |
@@ -262,10 +263,11 @@ configure_toolchain() { |
42 |
mycc=clang |
43 |
compiler_stage1+=" |
44 |
${llvm_deps} |
45 |
+ sys-libs/libcxxabi |
46 |
+ sys-libs/libcxx |
47 |
sys-devel/llvm |
48 |
sys-devel/clang |
49 |
- sys-libs/libcxxabi |
50 |
- sys-libs/libcxx" |
51 |
+ " |
52 |
;; |
53 |
esac |
54 |
CC=clang |
55 |
@@ -289,10 +291,10 @@ configure_toolchain() { |
56 |
local cdep="3.5.9999" |
57 |
compiler_stage1+=" |
58 |
dev-libs/libffi |
59 |
- <sys-devel/llvm-${cdep} |
60 |
<sys-libs/libcxx-headers-${cdep} |
61 |
<sys-libs/libcxxabi-${cdep} |
62 |
<sys-libs/libcxx-${cdep} |
63 |
+ <sys-devel/llvm-${cdep} |
64 |
<sys-devel/clang-${cdep}" |
65 |
fi |
66 |
|
67 |
@@ -541,6 +543,9 @@ bootstrap_setup() { |
68 |
# Use package.use to disable in the portage tree to be shared between |
69 |
# stage2 and stage3. The hack will be undone during tree sync in stage3. |
70 |
cat >> "${ROOT}"/etc/portage/make.profile/package.use <<-EOF |
71 |
+ # disable bootstrapping libcxx* with libunwind |
72 |
+ sys-libs/libcxxabi -libunwind |
73 |
+ sys-libs/libcxx -libunwind |
74 |
# Most binary Linux distributions seem to fancy toolchains that |
75 |
# do not do c++ support (need to install a separate package). |
76 |
sys-libs/ncurses -cxx |