From 16dbbb9b26f9c466742f992f144f3b15c941022a Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 24 Jan 2023 18:47:33 +0100 Subject: 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 --- var/spack/repos/builtin/packages/libgcrypt/package.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/libgcrypt/package.py b/var/spack/repos/builtin/packages/libgcrypt/package.py index 00a2bf62d5..a1aeafb305 100644 --- a/var/spack/repos/builtin/packages/libgcrypt/package.py +++ b/var/spack/repos/builtin/packages/libgcrypt/package.py @@ -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 -- cgit v1.2.3-70-g09d2