Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcxx/
Date: Wed, 27 Nov 2019 08:58:54
Message-Id: 1574845121.708fe7d2e647a6cf6257e04ed6c99639a1444e18.mgorny@gentoo
1 commit: 708fe7d2e647a6cf6257e04ed6c99639a1444e18
2 Author: Yang Yang <geraint0923 <AT> gmail <DOT> com>
3 AuthorDate: Sun Nov 24 05:07:44 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 27 08:58:41 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=708fe7d2
7
8 sys-libs/libcxx-9.0.0: add USE to explicitly link compiler-rt
9
10 According to
11 https://clang.llvm.org/docs/Toolchain.html#compiler-rt-llvm,
12 `-DLIBCXX_USE_COMPILER_RT=YES` is needed to linked to compiler-rt.
13
14 Otherwise building libcxx using clang+compiler-rt will fail.
15
16 Signed-off-by: Yang Yang <geraint0923 <AT> gmail.com>
17 Closes: https://github.com/gentoo/gentoo/pull/13748
18 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
19
20 sys-libs/libcxx/libcxx-10.0.0.9999.ebuild | 4 +++-
21 sys-libs/libcxx/libcxx-9.0.0.ebuild | 4 +++-
22 sys-libs/libcxx/libcxx-9.0.1.9999.ebuild | 4 +++-
23 sys-libs/libcxx/libcxx-9.0.1_rc1.ebuild | 4 +++-
24 4 files changed, 12 insertions(+), 4 deletions(-)
25
26 diff --git a/sys-libs/libcxx/libcxx-10.0.0.9999.ebuild b/sys-libs/libcxx/libcxx-10.0.0.9999.ebuild
27 index f5f67053d77..db9250d5440 100644
28 --- a/sys-libs/libcxx/libcxx-10.0.0.9999.ebuild
29 +++ b/sys-libs/libcxx/libcxx-10.0.0.9999.ebuild
30 @@ -93,7 +93,7 @@ src_configure() {
31 multilib_src_configure() {
32 # we want -lgcc_s for unwinder, and for compiler runtime when using
33 # gcc, clang with gcc runtime (or any unknown compiler)
34 - local extra_libs=() want_gcc_s=ON
35 + local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
36 if use libunwind; then
37 # work-around missing -lunwind upstream
38 extra_libs+=( -lunwind )
39 @@ -104,6 +104,7 @@ multilib_src_configure() {
40 ${LDFLAGS} -print-libgcc-file-name)
41 if [[ ${compiler_rt} == *libclang_rt* ]]; then
42 want_gcc_s=OFF
43 + want_compiler_rt=ON
44 extra_libs+=( "${compiler_rt}" )
45 fi
46 fi
47 @@ -130,6 +131,7 @@ multilib_src_configure() {
48 -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
49 -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
50 -DLIBCXX_INCLUDE_TESTS=$(usex test)
51 + -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
52 -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
53 )
54
55
56 diff --git a/sys-libs/libcxx/libcxx-9.0.0.ebuild b/sys-libs/libcxx/libcxx-9.0.0.ebuild
57 index 76ae63ba35a..41c96a83d61 100644
58 --- a/sys-libs/libcxx/libcxx-9.0.0.ebuild
59 +++ b/sys-libs/libcxx/libcxx-9.0.0.ebuild
60 @@ -93,7 +93,7 @@ src_configure() {
61 multilib_src_configure() {
62 # we want -lgcc_s for unwinder, and for compiler runtime when using
63 # gcc, clang with gcc runtime (or any unknown compiler)
64 - local extra_libs=() want_gcc_s=ON
65 + local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
66 if use libunwind; then
67 # work-around missing -lunwind upstream
68 extra_libs+=( -lunwind )
69 @@ -104,6 +104,7 @@ multilib_src_configure() {
70 ${LDFLAGS} -print-libgcc-file-name)
71 if [[ ${compiler_rt} == *libclang_rt* ]]; then
72 want_gcc_s=OFF
73 + want_compiler_rt=ON
74 extra_libs+=( "${compiler_rt}" )
75 fi
76 fi
77 @@ -130,6 +131,7 @@ multilib_src_configure() {
78 -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
79 -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
80 -DLIBCXX_INCLUDE_TESTS=$(usex test)
81 + -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
82 -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
83 )
84
85
86 diff --git a/sys-libs/libcxx/libcxx-9.0.1.9999.ebuild b/sys-libs/libcxx/libcxx-9.0.1.9999.ebuild
87 index f5f67053d77..db9250d5440 100644
88 --- a/sys-libs/libcxx/libcxx-9.0.1.9999.ebuild
89 +++ b/sys-libs/libcxx/libcxx-9.0.1.9999.ebuild
90 @@ -93,7 +93,7 @@ src_configure() {
91 multilib_src_configure() {
92 # we want -lgcc_s for unwinder, and for compiler runtime when using
93 # gcc, clang with gcc runtime (or any unknown compiler)
94 - local extra_libs=() want_gcc_s=ON
95 + local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
96 if use libunwind; then
97 # work-around missing -lunwind upstream
98 extra_libs+=( -lunwind )
99 @@ -104,6 +104,7 @@ multilib_src_configure() {
100 ${LDFLAGS} -print-libgcc-file-name)
101 if [[ ${compiler_rt} == *libclang_rt* ]]; then
102 want_gcc_s=OFF
103 + want_compiler_rt=ON
104 extra_libs+=( "${compiler_rt}" )
105 fi
106 fi
107 @@ -130,6 +131,7 @@ multilib_src_configure() {
108 -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
109 -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
110 -DLIBCXX_INCLUDE_TESTS=$(usex test)
111 + -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
112 -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
113 )
114
115
116 diff --git a/sys-libs/libcxx/libcxx-9.0.1_rc1.ebuild b/sys-libs/libcxx/libcxx-9.0.1_rc1.ebuild
117 index f5f67053d77..db9250d5440 100644
118 --- a/sys-libs/libcxx/libcxx-9.0.1_rc1.ebuild
119 +++ b/sys-libs/libcxx/libcxx-9.0.1_rc1.ebuild
120 @@ -93,7 +93,7 @@ src_configure() {
121 multilib_src_configure() {
122 # we want -lgcc_s for unwinder, and for compiler runtime when using
123 # gcc, clang with gcc runtime (or any unknown compiler)
124 - local extra_libs=() want_gcc_s=ON
125 + local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
126 if use libunwind; then
127 # work-around missing -lunwind upstream
128 extra_libs+=( -lunwind )
129 @@ -104,6 +104,7 @@ multilib_src_configure() {
130 ${LDFLAGS} -print-libgcc-file-name)
131 if [[ ${compiler_rt} == *libclang_rt* ]]; then
132 want_gcc_s=OFF
133 + want_compiler_rt=ON
134 extra_libs+=( "${compiler_rt}" )
135 fi
136 fi
137 @@ -130,6 +131,7 @@ multilib_src_configure() {
138 -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
139 -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
140 -DLIBCXX_INCLUDE_TESTS=$(usex test)
141 + -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
142 -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
143 )