aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-03 00:17:29 +0100
committerSam James <sam@gentoo.org>2022-05-03 00:18:51 +0100
commitcb41e7e05c55f6ef64e7a617869bbb644899e724 (patch)
treee3829f39a90092aa9961f5ce99d3bb94d36097de
parentcrossdev: Add support for LoongArch (ARCH=loong) (diff)
downloadcrossdev-cb41e7e0.tar.gz
crossdev-cb41e7e0.tar.bz2
crossdev-cb41e7e0.zip
crossdev: force off USE=hardened where no SSP
This fixes e.g. hppa2.0-unknown-linux-gnu where the stack grows up and hence we lack SSP, but also -fstack-clash-protection which is forced on by USE=hardened. glibc failed to build before this with: ``` checking for broken __attribute__((alias()))... yes configure: error: working alias attribute support required * ERROR: cross-hppa2.0-unknown-linux-gnu/glibc-2.35-r4::crossdev failed (configure phase): ``` config.log: ``` configure:4199: checking if compiler warns about alias for function with incompatible types cc1: error: '-fstack-clash-protection' is not supported on targets where the stack grows from lower to higher addresses [-Werror] conftest.c:9:34: error: 'foo_alias' alias between functions of incompatible types 'int(const void *, int)' and 'int (*(void))(const void *, int)' [-Werror=attribute-alias=] 9 | extern __typeof (__redirect_foo) foo_alias __attribute__ ((alias ("foo"))); | ^~~~~~~~~ conftest.c:4:28: note: aliased declaration here 4 | __typeof (__redirect_foo) *foo_impl (void) | ^~~~~~~~ cc1: all warnings being treated as errors ``` Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-xcrossdev3
1 files changed, 2 insertions, 1 deletions
diff --git a/crossdev b/crossdev
index 7ec9a9d..a7566ba 100755
--- a/crossdev
+++ b/crossdev
@@ -437,7 +437,8 @@ parse_target() {
# Running a hardened profile on the host forces ssp #831165
if [[ $ssp_support = "no" ]]; then
# ssp is >=gcc-6, nossp is <gcc-6
- GMASK+=" ssp -nossp"
+ # blacklist hardened too because it'll force -fstack-clash-protection
+ GMASK+=" ssp hardened -nossp"
GFORCE+=" nossp"
fi
}