libgcrypt: make sure flags go through env (#35135)

Parts of libgcrypt should not be optimized with -O1/2/3, so it's best to
let the build system do that; the build system cannot know the compiler
wrapper would inject optimization flags
This commit is contained in:
Harmen Stoppels 2023-01-24 18:47:33 +01:00 committed by GitHub
parent 3695200a3c
commit 16dbbb9b26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,12 @@ class Libgcrypt(AutotoolsPackage):
depends_on("libgpg-error@1.25:")
def flag_handler(self, name, flags):
# We should not inject optimization flags through the wrapper, because
# the jitter entropy code should never be compiled with optimization
# flags, and the build system ensures that
return (None, flags, None)
def check(self):
# Without this hack, `make check` fails on macOS when SIP is enabled
# https://bugs.gnupg.org/gnupg/issue2056