commit:     419c393e7c673893092cf1784ea456b1227ef5db
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 30 17:53:59 2024 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Apr 30 17:53:59 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=419c393e

sys-devel/clang-common: reapply cet config for x86_64 only

This got dropped by accident.

Bug: https://bugs.gentoo.org/928460
Fixes: f6674da9ede829fbb18e97530ca10b48d0f37e29
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 ...-18.1.4-r3.ebuild => clang-common-18.1.4-r4.ebuild} | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/sys-devel/clang-common/clang-common-18.1.4-r3.ebuild 
b/sys-devel/clang-common/clang-common-18.1.4-r4.ebuild
similarity index 96%
rename from sys-devel/clang-common/clang-common-18.1.4-r3.ebuild
rename to sys-devel/clang-common/clang-common-18.1.4-r4.ebuild
index fff63838526d..b7d4720e0e22 100644
--- a/sys-devel/clang-common/clang-common-18.1.4-r3.ebuild
+++ b/sys-devel/clang-common/clang-common-18.1.4-r4.ebuild
@@ -73,6 +73,11 @@ _doclang_cfg() {
                        @gentoo-common.cfg
                        @gentoo-common-ld.cfg
                EOF
+               if [[ ${triple} == x86_64* ]]; then
+                       cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die
+                               @gentoo-cet.cfg
+                       EOF
+               fi
        done
 
        if use kernel_Darwin; then
@@ -85,6 +90,11 @@ _doclang_cfg() {
                # This configuration file is used by the ${triple}-clang-cpp 
driver.
                @gentoo-common.cfg
        EOF
+       if [[ ${triple} == x86_64* ]]; then
+               cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die
+                       @gentoo-cet.cfg
+               EOF
+       fi
 
        # Install symlinks for triples with other vendor strings since some
        # programs insist on mangling the triple.
@@ -175,11 +185,9 @@ src_install() {
                -include "${EPREFIX}/usr/include/gentoo/fortify.h"
        EOF
 
-       if use amd64; then
-               cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
-                       -Xarch_host -fcf-protection=$(usex cet full none)
-               EOF
-       fi
+       newins - gentoo-cet.cfg <<-EOF
+               -Xarch_host -fcf-protection=$(usex cet full none)
+       EOF
 
        if use kernel_Darwin; then
                newins - gentoo-hardened-ld.cfg <<-EOF

Reply via email to