commit:     be4af79203e951268c0f3bf2dc1dce1496bbc16f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 05:55:34 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 13 05:55:34 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be4af792

sys-devel/clang-common: backport .cfg commentary update

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/clang-common/clang-common-15.0.6-r1.ebuild          | 3 +++
 sys-devel/clang-common/clang-common-16.0.0_pre20230107.ebuild | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/sys-devel/clang-common/clang-common-15.0.6-r1.ebuild 
b/sys-devel/clang-common/clang-common-15.0.6-r1.ebuild
index 7ec66f0dd663..047c2afbd37e 100644
--- a/sys-devel/clang-common/clang-common-15.0.6-r1.ebuild
+++ b/sys-devel/clang-common/clang-common-15.0.6-r1.ebuild
@@ -91,6 +91,8 @@ src_install() {
 
        # Baseline hardening (bug #851111)
        newins - gentoo-hardened.cfg <<-EOF
+               # Some of these options are added unconditionally, regardless of
+               # USE=hardened, for parity with sys-devel/gcc.
                -fstack-clash-protection
                -fstack-protector-strong
                -fPIE
@@ -113,6 +115,7 @@ src_install() {
 
        if use hardened ; then
                cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+                       # Options below are conditional on USE=hardened.
                        -D_GLIBCXX_ASSERTIONS
 
                        # Analogue to GLIBCXX_ASSERTIONS

diff --git a/sys-devel/clang-common/clang-common-16.0.0_pre20230107.ebuild 
b/sys-devel/clang-common/clang-common-16.0.0_pre20230107.ebuild
index 9fe06f311bb7..6f1eacac9cc2 100644
--- a/sys-devel/clang-common/clang-common-16.0.0_pre20230107.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.0_pre20230107.ebuild
@@ -91,6 +91,8 @@ src_install() {
 
        # Baseline hardening (bug #851111)
        newins - gentoo-hardened.cfg <<-EOF
+               # Some of these options are added unconditionally, regardless of
+               # USE=hardened, for parity with sys-devel/gcc.
                -fstack-clash-protection
                -fstack-protector-strong
                -fPIE
@@ -113,6 +115,7 @@ src_install() {
 
        if use hardened ; then
                cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+                       # Options below are conditional on USE=hardened.
                        -D_GLIBCXX_ASSERTIONS
 
                        # Analogue to GLIBCXX_ASSERTIONS

Reply via email to