summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-08-26 23:53:44 +0100
committerSam James <sam@gentoo.org>2023-08-29 20:08:05 +0100
commitd7e3de5bc89f7ea17ebc0ea0a1c9ad289a29cabb (patch)
tree1cb72ac0b0212b64e226f86c7e7ff14eb742f10c
parentsys-apps/coreutils: add 9.4, drop 9.3_p20230827 (diff)
downloadgentoo-d7e3de5bc89f7ea17ebc0ea0a1c9ad289a29cabb.tar.gz
gentoo-d7e3de5bc89f7ea17ebc0ea0a1c9ad289a29cabb.tar.bz2
gentoo-d7e3de5bc89f7ea17ebc0ea0a1c9ad289a29cabb.zip
sys-devel/clang-common: enable relro, enable bind_now (for hardened)
* Always enable RELRO (-Wl,-z,relro) * Conditionally enable BIND_NOW (-Wl,-z,now) based on USE=hardened (for parity with gcc for now) Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/32465 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--sys-devel/clang-common/clang-common-17.0.0.9999.ebuild4
-rw-r--r--sys-devel/clang-common/clang-common-17.0.0_rc3-r1.ebuild (renamed from sys-devel/clang-common/clang-common-17.0.0_rc3.ebuild)4
-rw-r--r--sys-devel/clang-common/clang-common-18.0.0.9999.ebuild4
-rw-r--r--sys-devel/clang-common/clang-common-18.0.0_pre20230825-r1.ebuild (renamed from sys-devel/clang-common/clang-common-18.0.0_pre20230825.ebuild)4
-rw-r--r--sys-devel/clang-common/clang-common-18.0.0_pre20230829-r1.ebuild (renamed from sys-devel/clang-common/clang-common-18.0.0_pre20230829.ebuild)4
5 files changed, 20 insertions, 0 deletions
diff --git a/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild
index abf3150abbd6..8bca701cfc0b 100644
--- a/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild
+++ b/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild
@@ -99,6 +99,8 @@ src_install() {
-fstack-protector-strong
-fPIE
-include "${EPREFIX}/usr/include/gentoo/fortify.h"
+
+ -Wl,-z,relro
EOF
dodir /usr/include/gentoo
@@ -144,6 +146,8 @@ src_install() {
# https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
# https://libcxx.llvm.org/Hardening.html#using-hardened-mode
-D_LIBCPP_ENABLE_HARDENED_MODE=1
+
+ -Wl,-z,now
EOF
fi
diff --git a/sys-devel/clang-common/clang-common-17.0.0_rc3.ebuild b/sys-devel/clang-common/clang-common-17.0.0_rc3-r1.ebuild
index abf3150abbd6..8bca701cfc0b 100644
--- a/sys-devel/clang-common/clang-common-17.0.0_rc3.ebuild
+++ b/sys-devel/clang-common/clang-common-17.0.0_rc3-r1.ebuild
@@ -99,6 +99,8 @@ src_install() {
-fstack-protector-strong
-fPIE
-include "${EPREFIX}/usr/include/gentoo/fortify.h"
+
+ -Wl,-z,relro
EOF
dodir /usr/include/gentoo
@@ -144,6 +146,8 @@ src_install() {
# https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
# https://libcxx.llvm.org/Hardening.html#using-hardened-mode
-D_LIBCPP_ENABLE_HARDENED_MODE=1
+
+ -Wl,-z,now
EOF
fi
diff --git a/sys-devel/clang-common/clang-common-18.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-18.0.0.9999.ebuild
index abf3150abbd6..8bca701cfc0b 100644
--- a/sys-devel/clang-common/clang-common-18.0.0.9999.ebuild
+++ b/sys-devel/clang-common/clang-common-18.0.0.9999.ebuild
@@ -99,6 +99,8 @@ src_install() {
-fstack-protector-strong
-fPIE
-include "${EPREFIX}/usr/include/gentoo/fortify.h"
+
+ -Wl,-z,relro
EOF
dodir /usr/include/gentoo
@@ -144,6 +146,8 @@ src_install() {
# https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
# https://libcxx.llvm.org/Hardening.html#using-hardened-mode
-D_LIBCPP_ENABLE_HARDENED_MODE=1
+
+ -Wl,-z,now
EOF
fi
diff --git a/sys-devel/clang-common/clang-common-18.0.0_pre20230825.ebuild b/sys-devel/clang-common/clang-common-18.0.0_pre20230825-r1.ebuild
index abf3150abbd6..8bca701cfc0b 100644
--- a/sys-devel/clang-common/clang-common-18.0.0_pre20230825.ebuild
+++ b/sys-devel/clang-common/clang-common-18.0.0_pre20230825-r1.ebuild
@@ -99,6 +99,8 @@ src_install() {
-fstack-protector-strong
-fPIE
-include "${EPREFIX}/usr/include/gentoo/fortify.h"
+
+ -Wl,-z,relro
EOF
dodir /usr/include/gentoo
@@ -144,6 +146,8 @@ src_install() {
# https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
# https://libcxx.llvm.org/Hardening.html#using-hardened-mode
-D_LIBCPP_ENABLE_HARDENED_MODE=1
+
+ -Wl,-z,now
EOF
fi
diff --git a/sys-devel/clang-common/clang-common-18.0.0_pre20230829.ebuild b/sys-devel/clang-common/clang-common-18.0.0_pre20230829-r1.ebuild
index abf3150abbd6..8bca701cfc0b 100644
--- a/sys-devel/clang-common/clang-common-18.0.0_pre20230829.ebuild
+++ b/sys-devel/clang-common/clang-common-18.0.0_pre20230829-r1.ebuild
@@ -99,6 +99,8 @@ src_install() {
-fstack-protector-strong
-fPIE
-include "${EPREFIX}/usr/include/gentoo/fortify.h"
+
+ -Wl,-z,relro
EOF
dodir /usr/include/gentoo
@@ -144,6 +146,8 @@ src_install() {
# https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
# https://libcxx.llvm.org/Hardening.html#using-hardened-mode
-D_LIBCPP_ENABLE_HARDENED_MODE=1
+
+ -Wl,-z,now
EOF
fi