Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 873526 - sys-devel/llvm, sys-devel/lld: add zstd support
Summary: sys-devel/llvm, sys-devel/lld: add zstd support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on: 872254
Blocks:
  Show dependency tree
 
Reported: 2022-09-29 21:57 UTC by Sam James
Modified: 2024-01-06 07:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-29 21:57:37 UTC
See https://maskray.me/blog/2022-09-09-zstd-compressed-debug-sections. We're blocked on bug 872254 though.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-30 14:51:37 UTC
Good news is that we can get llvm to build with two-line zstdConfig.cmake generated at LLVM build time.

Bad news is that LLD fails to build afterwards because -- of course -- it assumes LLVM magically takes care of setting the CMake targets for it.
Comment 2 Larry the Git Cow gentoo-dev 2022-09-30 15:52:54 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=861536e5487b9c63f9cf878b4f2ecc3e8a220daf

commit 861536e5487b9c63f9cf878b4f2ecc3e8a220daf
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2022-09-30 15:49:24 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-09-30 15:52:51 +0000

    sys-devel/lld: Add zstd support to 16.x
    
    Bug: https://bugs.gentoo.org/873526
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-devel/lld/lld-16.0.0.9999.ebuild        | 16 +++++++++++++---
 sys-devel/lld/lld-16.0.0_pre20220930.ebuild | 16 +++++++++++++---
 2 files changed, 26 insertions(+), 6 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70bf3a8996b9a14b0e28d7e367275a20f6d0cffc

commit 70bf3a8996b9a14b0e28d7e367275a20f6d0cffc
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2022-09-30 13:49:51 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-09-30 15:52:50 +0000

    sys-devel/llvm: Add zstd support in 16.x
    
    Bug: https://bugs.gentoo.org/873526
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-devel/llvm/llvm-16.0.0.9999.ebuild        | 22 +++++++++++++++++++---
 sys-devel/llvm/llvm-16.0.0_pre20220930.ebuild | 22 +++++++++++++++++++---
 2 files changed, 38 insertions(+), 6 deletions(-)
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-10-11 15:56:48 UTC
I suppose you meant lld and not lldb, right?
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-11 15:58:11 UTC
(In reply to Michał Górny from comment #3)
> I suppose you meant lld and not lldb, right?

I figured lldb needed support to read it, but apparently not: https://github.com/llvm/llvm-project/commit/0b140d0910d1762225fd10372d84ecca1a62305d.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-29 15:10:59 UTC
I think this is done.
Comment 6 Larry the Git Cow gentoo-dev 2024-01-06 07:52:38 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d99a19043e4cfe3270c7bf91ada6554d9d0382c4

commit d99a19043e4cfe3270c7bf91ada6554d9d0382c4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-06 07:47:24 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-06 07:51:39 +0000

    sys-devel/lld: ixup zlib, zstd handling
    
    From the LLVM docs:
    ```
    LLVM_ENABLE_ZLIB:STRING
    Used to decide if LLVM tools should support compression/decompression with zlib. Allowed values are OFF, ON (default, enable if zlib is found), and FORCE_ON (error if zlib is not found).
    
    LLVM_ENABLE_ZSTD:STRING
    Used to decide if LLVM tools should support compression/decompression with zstd. Allowed values are OFF, ON (default, enable if zstd is found), and FORCE_ON (error if zstd is not found).
    ```
    
    We had a user report that they had an LLVM / LLD built without zlib support
    despite the unconditional RDEPEND we have. Use FORCE_ON so we bail out at
    configure/build time rather than silently buliding without it if the system's
    zlib is broken.
    
    Ditto zstd.
    
    Bug: https://bugs.gentoo.org/873526
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/lld/lld-15.0.7.ebuild             | 3 ++-
 sys-devel/lld/lld-16.0.6.ebuild             | 4 +++-
 sys-devel/lld/lld-17.0.6.ebuild             | 4 +++-
 sys-devel/lld/lld-18.0.0.9999.ebuild        | 4 +++-
 sys-devel/lld/lld-18.0.0_pre20231215.ebuild | 4 +++-
 sys-devel/lld/lld-18.0.0_pre20231222.ebuild | 4 +++-
 sys-devel/lld/lld-18.0.0_pre20231228.ebuild | 4 +++-
 7 files changed, 20 insertions(+), 7 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c060d95c3f33f1033c003575096609e0795a2951

commit c060d95c3f33f1033c003575096609e0795a2951
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-06 07:39:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-06 07:51:34 +0000

    sys-devel/llvm: fixup zlib, zstd handling
    
    From the LLVM docs:
    ```
    LLVM_ENABLE_ZLIB:STRING
        Used to decide if LLVM tools should support compression/decompression with zlib. Allowed values are OFF, ON (default, enable if zlib is found), and FORCE_ON (error if zlib is not found).
    
    LLVM_ENABLE_ZSTD:STRING
        Used to decide if LLVM tools should support compression/decompression with zstd. Allowed values are OFF, ON (default, enable if zstd is found), and FORCE_ON (error if zstd is not found).
    ```
    
    We had a user report that they had an LLVM / LLD built without zlib support
    despite the unconditional RDEPEND we have. Use FORCE_ON so we bail out at
    configure/build time rather than silently buliding without it if the system's
    zlib is broken.
    
    Ditto zstd.
    
    Bug: https://bugs.gentoo.org/873526
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/llvm/llvm-15.0.7-r3.ebuild          | 5 +++--
 sys-devel/llvm/llvm-16.0.6.ebuild             | 5 +++--
 sys-devel/llvm/llvm-17.0.6.ebuild             | 5 +++--
 sys-devel/llvm/llvm-18.0.0.9999.ebuild        | 5 +++--
 sys-devel/llvm/llvm-18.0.0_pre20231215.ebuild | 5 +++--
 sys-devel/llvm/llvm-18.0.0_pre20231222.ebuild | 5 +++--
 sys-devel/llvm/llvm-18.0.0_pre20231228.ebuild | 5 +++--
 7 files changed, 21 insertions(+), 14 deletions(-)