Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 908600 - LLVM: Missing cet IUSE (Intel CET support) in components
Summary: LLVM: Missing cet IUSE (Intel CET support) in components
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: LLVM support project
URL: https://reviews.llvm.org/D105968
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-06-16 09:09 UTC by David Carlos Manuelda
Modified: 2024-03-23 15:42 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 David Carlos Manuelda 2023-06-16 09:09:52 UTC
Since some time, llvm-libunwind implemented the CET support, but currently only (masked) support for it is implemented in gcc, glibc and binutils.

It can be enabled as easy as adding cet as IUSE and adding the following line in configure function:

mycmakeargs+=( -DLIBUNWIND_ENABLE_CET=$(usex cet ON OFF) )

I think that despite the use flag is currently masked for testing it could be a good idea to include its support here also for testing with LLVM profiles also.

Reproducible: Always
Comment 1 David Carlos Manuelda 2023-06-17 20:13:39 UTC
Inspecting compiler-rt's CMake I found COMPILER_RT_ENABLE_CET, so I will change the title to enable CET in all LLVM
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-07-03 03:47:40 UTC
Could you consider making a PR or a series of patches, for 17.0.0.9999?
Comment 3 David Carlos Manuelda 2023-10-20 05:47:04 UTC
(In reply to Michał Górny from comment #2)
> Could you consider making a PR or a series of patches, for 17.0.0.9999?

Thanks for your hint, I did finally a PR containing the changes for current ebuilds in https://github.com/gentoo/gentoo/pull/33424
Comment 4 David Carlos Manuelda 2023-10-20 05:57:02 UTC
Sorry, I closed old PR and remade it correctly in https://github.com/gentoo/gentoo/pull/33425
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-22 15:34:11 UTC
The options in libunwind, etc. are not valid additions, since they only add compilation flags for these packages.

However, I think we may need to add a USE=cet to clang-common, to toggle CET-by-default like in sys-devel/gcc[cet,hardened].
Comment 6 Larry the Git Cow gentoo-dev 2024-03-23 15:42:56 UTC
The bug has been closed via the following commit(s):

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

commit 8bfd8afef6dd8c66def48ef52abcb624c0077ad1
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-03-23 15:04:34 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-23 15:38:51 +0000

    sys-devel/clang-common: updates for 23.0
    
    * Promote -Wl,-z,now to vanilla, following GCC (bug #876923)
    * Add USE=cet to control -fcf-protection, following GCC (bug #908600, bug #927298)
    
    Bug: https://bugs.gentoo.org/876923
    Bug: https://bugs.gentoo.org/927298
    Closes: https://bugs.gentoo.org/908600
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/arch/amd64/package.use.mask               |   1 +
 profiles/base/package.use.mask                     |   1 +
 profiles/features/musl/package.use.mask            |   1 +
 .../clang-common/clang-common-17.0.6-r2.ebuild     | 295 ++++++++++++++++++++
 .../clang-common/clang-common-18.1.2-r1.ebuild     | 297 +++++++++++++++++++++
 .../clang-common/clang-common-19.0.0.9999.ebuild   |  10 +-
 .../clang-common-19.0.0_pre20240316.ebuild         |  10 +-
 sys-devel/clang-common/metadata.xml                |  10 +
 8 files changed, 621 insertions(+), 4 deletions(-)