mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
cc-wrapper: fix detection of unsupported linker flags on cygwin
This commit is contained in:
parent
4f8a1094bd
commit
2b6659e13e
@ -252,10 +252,10 @@ stdenv.mkDerivation {
|
||||
|
||||
# some linkers on some platforms don't support specific -z flags
|
||||
hardening_unsupported_flags=""
|
||||
if [[ "$($ldPath/ld -z now 2>&1 || true)" =~ "unknown option" ]]; then
|
||||
if [[ "$($ldPath/ld -z now 2>&1 || true)" =~ un(recognized|known)\ option ]]; then
|
||||
hardening_unsupported_flags+=" bindnow"
|
||||
fi
|
||||
if [[ "$($ldPath/ld -z relro 2>&1 || true)" =~ "unknown option" ]]; then
|
||||
if [[ "$($ldPath/ld -z relro 2>&1 || true)" =~ un(recognized|known)\ option ]]; then
|
||||
hardening_unsupported_flags+=" relro"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user