* Update m4

For %oneapi & %intel, we explicitly set -O0 so dependents of m4 do not break
        # The default optimization level for icx/icpx is "-O2", 
        # but building m4 with this level breaks the build of dependents. 
        # So we set it explicitely to "-O0".

* [@spackbot] updating style on behalf of hpcnpatel
This commit is contained in:
Nisarg Patel 2023-04-14 03:02:43 +02:00 committed by GitHub
parent 2b47a7a22f
commit e2812a6e96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,6 +78,13 @@ def setup_dependent_build_environment(self, env, dependent_spec):
# https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/autom4te-Invocation.html
env.set("M4", self.prefix.bin.m4)
def setup_build_environment(self, env):
# The default optimization level for icx/icpx is "-O2",
# but building m4 with this level breaks the build of dependents.
# So we set it explicitely to "-O0".
if self.spec.satisfies("%intel") or self.spec.satisfies("%oneapi"):
env.append_flags("CFLAGS", "-O0")
def setup_run_environment(self, env):
env.set("M4", self.prefix.bin.m4)