[Backport staging-next-26.05] libressl: fix Darwin build (#530907)

This commit is contained in:
Michael Daniels 2026-06-12 02:43:39 +00:00 committed by GitHub
commit 81cee856bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,6 +61,10 @@ let
doCheck = !(stdenv.hostPlatform.isPower64 || stdenv.hostPlatform.isRiscV);
preCheck = ''
export PREVIOUS_${ldLibPathEnvName}=$${ldLibPathEnvName}
export ${ldLibPathEnvName}="$${ldLibPathEnvName}:$(realpath tls/):$(realpath ssl/):$(realpath crypto/)"
''
+ lib.optionalString stdenv.hostPlatform.isElf ''
# Bail if any shared object has executable stack enabled. This can
# happen when an object produced from an assmbly file in libcrypto is
# missing a .note.GNU-stack section. An executable stack is dangerous
@ -76,9 +80,6 @@ let
}
END { exit res }
'
export PREVIOUS_${ldLibPathEnvName}=$${ldLibPathEnvName}
export ${ldLibPathEnvName}="$${ldLibPathEnvName}:$(realpath tls/):$(realpath ssl/):$(realpath crypto/)"
'';
postCheck = ''
export ${ldLibPathEnvName}=$PREVIOUS_${ldLibPathEnvName}