1 |
commit: cf3ce64992f49d222223c41b7c4582bd3e089909 |
2 |
Author: Yang Yang <geraint0923 <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Nov 24 05:05:09 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 27 08:58:38 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf3ce649 |
7 |
|
8 |
sys-libs/libcxxabi-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 |
`-DLIBCXXABI_USE_COMPILER_RT=YES` is needed to linked against |
13 |
compiler-rt if compiled with clang+compiler-rt. |
14 |
|
15 |
Signed-off-by: Yang Yang <geraint0923 <AT> gmail.com> |
16 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
17 |
|
18 |
sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild | 11 +++++++++++ |
19 |
sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild | 11 +++++++++++ |
20 |
sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild | 11 +++++++++++ |
21 |
sys-libs/libcxxabi/libcxxabi-9.0.1_rc1.ebuild | 11 +++++++++++ |
22 |
4 files changed, 44 insertions(+) |
23 |
|
24 |
diff --git a/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild |
25 |
index df108a4e023..4bdd0295a16 100644 |
26 |
--- a/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild |
27 |
+++ b/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild |
28 |
@@ -45,6 +45,16 @@ pkg_setup() { |
29 |
} |
30 |
|
31 |
multilib_src_configure() { |
32 |
+ # link against compiler-rt instead of libgcc if we are using clang with libunwind |
33 |
+ local want_compiler_rt=OFF |
34 |
+ if use libunwind && tc-is-clang; then |
35 |
+ local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \ |
36 |
+ ${LDFLAGS} -print-libgcc-file-name) |
37 |
+ if [[ ${compiler_rt} == *libclang_rt* ]]; then |
38 |
+ want_compiler_rt=ON |
39 |
+ fi |
40 |
+ fi |
41 |
+ |
42 |
local libdir=$(get_libdir) |
43 |
local mycmakeargs=( |
44 |
-DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib} |
45 |
@@ -52,6 +62,7 @@ multilib_src_configure() { |
46 |
-DLIBCXXABI_ENABLE_STATIC=$(usex static-libs) |
47 |
-DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind) |
48 |
-DLIBCXXABI_INCLUDE_TESTS=$(usex test) |
49 |
+ -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt} |
50 |
|
51 |
-DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include |
52 |
# upstream is omitting standard search path for this |
53 |
|
54 |
diff --git a/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild b/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild |
55 |
index eb296035779..3d656a49cf7 100644 |
56 |
--- a/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild |
57 |
+++ b/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild |
58 |
@@ -45,6 +45,16 @@ pkg_setup() { |
59 |
} |
60 |
|
61 |
multilib_src_configure() { |
62 |
+ # link against compiler-rt instead of libgcc if we are using clang with libunwind |
63 |
+ local want_compiler_rt=OFF |
64 |
+ if use libunwind && tc-is-clang; then |
65 |
+ local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \ |
66 |
+ ${LDFLAGS} -print-libgcc-file-name) |
67 |
+ if [[ ${compiler_rt} == *libclang_rt* ]]; then |
68 |
+ want_compiler_rt=ON |
69 |
+ fi |
70 |
+ fi |
71 |
+ |
72 |
local libdir=$(get_libdir) |
73 |
local mycmakeargs=( |
74 |
-DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib} |
75 |
@@ -52,6 +62,7 @@ multilib_src_configure() { |
76 |
-DLIBCXXABI_ENABLE_STATIC=$(usex static-libs) |
77 |
-DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind) |
78 |
-DLIBCXXABI_INCLUDE_TESTS=$(usex test) |
79 |
+ -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt} |
80 |
|
81 |
-DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include |
82 |
# upstream is omitting standard search path for this |
83 |
|
84 |
diff --git a/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild |
85 |
index df108a4e023..4bdd0295a16 100644 |
86 |
--- a/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild |
87 |
+++ b/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild |
88 |
@@ -45,6 +45,16 @@ pkg_setup() { |
89 |
} |
90 |
|
91 |
multilib_src_configure() { |
92 |
+ # link against compiler-rt instead of libgcc if we are using clang with libunwind |
93 |
+ local want_compiler_rt=OFF |
94 |
+ if use libunwind && tc-is-clang; then |
95 |
+ local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \ |
96 |
+ ${LDFLAGS} -print-libgcc-file-name) |
97 |
+ if [[ ${compiler_rt} == *libclang_rt* ]]; then |
98 |
+ want_compiler_rt=ON |
99 |
+ fi |
100 |
+ fi |
101 |
+ |
102 |
local libdir=$(get_libdir) |
103 |
local mycmakeargs=( |
104 |
-DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib} |
105 |
@@ -52,6 +62,7 @@ multilib_src_configure() { |
106 |
-DLIBCXXABI_ENABLE_STATIC=$(usex static-libs) |
107 |
-DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind) |
108 |
-DLIBCXXABI_INCLUDE_TESTS=$(usex test) |
109 |
+ -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt} |
110 |
|
111 |
-DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include |
112 |
# upstream is omitting standard search path for this |
113 |
|
114 |
diff --git a/sys-libs/libcxxabi/libcxxabi-9.0.1_rc1.ebuild b/sys-libs/libcxxabi/libcxxabi-9.0.1_rc1.ebuild |
115 |
index df108a4e023..4bdd0295a16 100644 |
116 |
--- a/sys-libs/libcxxabi/libcxxabi-9.0.1_rc1.ebuild |
117 |
+++ b/sys-libs/libcxxabi/libcxxabi-9.0.1_rc1.ebuild |
118 |
@@ -45,6 +45,16 @@ pkg_setup() { |
119 |
} |
120 |
|
121 |
multilib_src_configure() { |
122 |
+ # link against compiler-rt instead of libgcc if we are using clang with libunwind |
123 |
+ local want_compiler_rt=OFF |
124 |
+ if use libunwind && tc-is-clang; then |
125 |
+ local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \ |
126 |
+ ${LDFLAGS} -print-libgcc-file-name) |
127 |
+ if [[ ${compiler_rt} == *libclang_rt* ]]; then |
128 |
+ want_compiler_rt=ON |
129 |
+ fi |
130 |
+ fi |
131 |
+ |
132 |
local libdir=$(get_libdir) |
133 |
local mycmakeargs=( |
134 |
-DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib} |
135 |
@@ -52,6 +62,7 @@ multilib_src_configure() { |
136 |
-DLIBCXXABI_ENABLE_STATIC=$(usex static-libs) |
137 |
-DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind) |
138 |
-DLIBCXXABI_INCLUDE_TESTS=$(usex test) |
139 |
+ -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt} |
140 |
|
141 |
-DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include |
142 |
# upstream is omitting standard search path for this |