commit:     ee5aadc4bb62d5479d8bc31fa06eb2e5a1bbacc3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  3 07:10:41 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb  3 07:10:41 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee5aadc4

sys-devel/clang-common: drop -fstack-clash-protection

There's very likely some Clang miscompilation occurring with 
-fstack-clash-protection,
GCC's implementation is fine. Both qtcore and chromium have been reported
to misbehave at runtime when built with Clang's.

Drop it for now until we can look into it more or Clang gets fixed.

Closes: https://bugs.gentoo.org/865339
Closes: https://bugs.gentoo.org/892537
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{clang-common-15.0.7-r1.ebuild => clang-common-15.0.7-r2.ebuild}   | 3 ++-
 ...pre20230107-r1.ebuild => clang-common-16.0.0_pre20230107-r2.ebuild} | 3 ++-
 ....0_pre20230127.ebuild => clang-common-16.0.0_pre20230127-r1.ebuild} | 3 ++-
 ...lang-common-16.0.0_rc1.ebuild => clang-common-16.0.0_rc1-r1.ebuild} | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/sys-devel/clang-common/clang-common-15.0.7-r1.ebuild 
b/sys-devel/clang-common/clang-common-15.0.7-r2.ebuild
similarity index 97%
rename from sys-devel/clang-common/clang-common-15.0.7-r1.ebuild
rename to sys-devel/clang-common/clang-common-15.0.7-r2.ebuild
index 651827d21197..2adff08df36d 100644
--- a/sys-devel/clang-common/clang-common-15.0.7-r1.ebuild
+++ b/sys-devel/clang-common/clang-common-15.0.7-r2.ebuild
@@ -90,10 +90,11 @@ src_install() {
        EOF
 
        # Baseline hardening (bug #851111)
+       # (-fstack-clash-protection is omitted because of a possible Clang bug,
+       # see bug #892537 and bug #865339.)
        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
                -include "${EPREFIX}/usr/include/gentoo/fortify.h"

diff --git a/sys-devel/clang-common/clang-common-16.0.0_pre20230107-r1.ebuild 
b/sys-devel/clang-common/clang-common-16.0.0_pre20230107-r2.ebuild
similarity index 97%
rename from sys-devel/clang-common/clang-common-16.0.0_pre20230107-r1.ebuild
rename to sys-devel/clang-common/clang-common-16.0.0_pre20230107-r2.ebuild
index 3c407f5a1af6..d5df949d5d96 100644
--- a/sys-devel/clang-common/clang-common-16.0.0_pre20230107-r1.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.0_pre20230107-r2.ebuild
@@ -90,10 +90,11 @@ src_install() {
        EOF
 
        # Baseline hardening (bug #851111)
+       # (-fstack-clash-protection is omitted because of a possible Clang bug,
+       # see bug #892537 and bug #865339.)
        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
                -include "${EPREFIX}/usr/include/gentoo/fortify.h"

diff --git a/sys-devel/clang-common/clang-common-16.0.0_pre20230127.ebuild 
b/sys-devel/clang-common/clang-common-16.0.0_pre20230127-r1.ebuild
similarity index 97%
rename from sys-devel/clang-common/clang-common-16.0.0_pre20230127.ebuild
rename to sys-devel/clang-common/clang-common-16.0.0_pre20230127-r1.ebuild
index be17e87b775a..c04c266d94c8 100644
--- a/sys-devel/clang-common/clang-common-16.0.0_pre20230127.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.0_pre20230127-r1.ebuild
@@ -90,10 +90,11 @@ src_install() {
        EOF
 
        # Baseline hardening (bug #851111)
+       # (-fstack-clash-protection is omitted because of a possible Clang bug,
+       # see bug #892537 and bug #865339.)
        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
                -include "${EPREFIX}/usr/include/gentoo/fortify.h"

diff --git a/sys-devel/clang-common/clang-common-16.0.0_rc1.ebuild 
b/sys-devel/clang-common/clang-common-16.0.0_rc1-r1.ebuild
similarity index 97%
rename from sys-devel/clang-common/clang-common-16.0.0_rc1.ebuild
rename to sys-devel/clang-common/clang-common-16.0.0_rc1-r1.ebuild
index 3c407f5a1af6..d5df949d5d96 100644
--- a/sys-devel/clang-common/clang-common-16.0.0_rc1.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.0_rc1-r1.ebuild
@@ -90,10 +90,11 @@ src_install() {
        EOF
 
        # Baseline hardening (bug #851111)
+       # (-fstack-clash-protection is omitted because of a possible Clang bug,
+       # see bug #892537 and bug #865339.)
        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
                -include "${EPREFIX}/usr/include/gentoo/fortify.h"

Reply via email to