diff options
author | Sam James <sam@gentoo.org> | 2022-05-03 00:17:29 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-05-03 00:18:51 +0100 |
commit | cb41e7e05c55f6ef64e7a617869bbb644899e724 (patch) | |
tree | e3829f39a90092aa9961f5ce99d3bb94d36097de | |
parent | crossdev: Add support for LoongArch (ARCH=loong) (diff) | |
download | crossdev-cb41e7e05c55f6ef64e7a617869bbb644899e724.tar.gz crossdev-cb41e7e05c55f6ef64e7a617869bbb644899e724.tar.bz2 crossdev-cb41e7e05c55f6ef64e7a617869bbb644899e724.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-x | crossdev | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 } |