1 |
commit: ec0857c1f4b448861a54ad185c79528c070776e2 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 3 22:15:03 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 3 22:15:17 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec0857c1 |
7 |
|
8 |
profiles/features/llvm: default sys-libs/llvm-libunwind[static-libs] on |
9 |
|
10 |
Without this, statically linking even a basic example fails because |
11 |
we're using llvm-libunwind rather than GCC's internals. |
12 |
|
13 |
Quoting myself on the bug: |
14 |
""" |
15 |
FWIW the LLVM/Clang profiles are considered pretty experimental still. |
16 |
|
17 |
For Clang, it's tricky because it depends on configuration and the (default) flags passed. |
18 |
|
19 |
Ionen points out it should be harmless dep-wise (non-invasive to users, no need to then |
20 |
enable static-libs for its deps) to default to +static-libs on llvm-libunwind, |
21 |
which would cover most cases here. I think that generally makes sense. |
22 |
|
23 |
I see three options: |
24 |
1. Adding IUSE=llvm-libunwind to virtual/libc |
25 |
2. Defaulting on (which doesn't feel like a full solution alone) +static-libs in llvm-libunwind |
26 |
3. Making clang-common[default-compiler-rt] depend on libunwind[static-libs] |
27 |
(or correspondingly llvm-libunwind[static-libs] if USE=llvm-libunwind) |
28 |
|
29 |
I think 2+3 is probably a good fit? |
30 |
""" |
31 |
|
32 |
Bug: https://bugs.gentoo.org/892956 |
33 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
34 |
|
35 |
profiles/features/llvm/package.use | 3 +++ |
36 |
1 file changed, 3 insertions(+) |
37 |
|
38 |
diff --git a/profiles/features/llvm/package.use b/profiles/features/llvm/package.use |
39 |
index 5e1bbab42414..e878f28f7454 100644 |
40 |
--- a/profiles/features/llvm/package.use |
41 |
+++ b/profiles/features/llvm/package.use |
42 |
@@ -1,3 +1,6 @@ |
43 |
+# Make static linking work by default for simple binaries (bug #892956) |
44 |
+sys-libs/llvm-libunwind static-libs |
45 |
+ |
46 |
# use lld by default |
47 |
sys-devel/llvm -binutils-plugin |