diff options
author | Sam James <sam@gentoo.org> | 2023-03-03 22:15:03 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-03-03 22:15:17 +0000 |
commit | ec0857c1f4b448861a54ad185c79528c070776e2 (patch) | |
tree | 88e3bdca984011a3f551f9a1607719c4da337775 | |
parent | profiles/features/llvm: move some package.use entries to package.use.force (diff) | |
download | gentoo-ec0857c1.tar.gz gentoo-ec0857c1.tar.bz2 gentoo-ec0857c1.zip |
profiles/features/llvm: default sys-libs/llvm-libunwind[static-libs] on
Without this, statically linking even a basic example fails because
we're using llvm-libunwind rather than GCC's internals.
Quoting myself on the bug:
"""
FWIW the LLVM/Clang profiles are considered pretty experimental still.
For Clang, it's tricky because it depends on configuration and the (default) flags passed.
Ionen points out it should be harmless dep-wise (non-invasive to users, no need to then
enable static-libs for its deps) to default to +static-libs on llvm-libunwind,
which would cover most cases here. I think that generally makes sense.
I see three options:
1. Adding IUSE=llvm-libunwind to virtual/libc
2. Defaulting on (which doesn't feel like a full solution alone) +static-libs in llvm-libunwind
3. Making clang-common[default-compiler-rt] depend on libunwind[static-libs]
(or correspondingly llvm-libunwind[static-libs] if USE=llvm-libunwind)
I think 2+3 is probably a good fit?
"""
Bug: https://bugs.gentoo.org/892956
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | profiles/features/llvm/package.use | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/profiles/features/llvm/package.use b/profiles/features/llvm/package.use index 5e1bbab42414..e878f28f7454 100644 --- a/profiles/features/llvm/package.use +++ b/profiles/features/llvm/package.use @@ -1,3 +1,6 @@ +# Make static linking work by default for simple binaries (bug #892956) +sys-libs/llvm-libunwind static-libs + # use lld by default sys-devel/llvm -binutils-plugin |