summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2025-01-03 00:58:00 +0000
committerSam James <sam@gentoo.org>2025-01-03 00:58:41 +0000
commit94cfc2abd5924cc71314e28fb9f26e147ed9659e (patch)
tree261498f16ac8f2d147bba0aff4cbb9798551abb1 /eclass
parentdev-embedded/avr-libc: HTTPSify HOMEPAGE (diff)
downloadgentoo-94cfc2abd5924cc71314e28fb9f26e147ed9659e.tar.gz
gentoo-94cfc2abd5924cc71314e28fb9f26e147ed9659e.tar.bz2
gentoo-94cfc2abd5924cc71314e28fb9f26e147ed9659e.zip
toolchain.eclass: move Clang CET hack earlier to influence tc_enable_hardened_gcc
Otherwise, we may still set -DEXTRA_OPTIONS_CF. Bug: https://bugs.gentoo.org/933772 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass10
1 files changed, 5 insertions, 5 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 6dc139bd1a02..85b5a2b23392 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -688,6 +688,11 @@ toolchain_src_prepare() {
eapply_user
+ # Workaround -march=native not working for stage1 with non-GCC (bug #933772).
+ if ! tc-is-gcc && [[ "${CFLAGS}${CXXFLAGS}" == *-march=native* ]] ; then
+ CLANG_DISABLE_CET_HACK=1
+ fi
+
if ! use vanilla ; then
tc_enable_hardened_gcc
fi
@@ -1178,11 +1183,6 @@ toolchain_src_configure() {
export ac_cv_std_swap_in_utility=no
fi
- # Workaround -march=native not working for stage1 with non-GCC (bug #933772).
- if ! tc-is-gcc && [[ "${CFLAGS}${CXXFLAGS}" == *-march=native* ]] ; then
- CLANG_DISABLE_CET_HACK=1
- fi
-
local flag
for flag in $(all-flag-vars) ; do
einfo "${flag}=\"${!flag}\""