summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNisarg Patel <33021055+hpcnpatel@users.noreply.github.com>2023-04-14 03:02:43 +0200
committerGitHub <noreply@github.com>2023-04-13 21:02:43 -0400
commite2812a6e96d3b8b76d8abf0c3b29f8d823f7f45c (patch)
tree4634708172c9915033470c56e3f1110b064ba5c9
parent2b47a7a22fe61eb9245412b080d9c7ae5ff17600 (diff)
downloadspack-e2812a6e96d3b8b76d8abf0c3b29f8d823f7f45c.tar.gz
spack-e2812a6e96d3b8b76d8abf0c3b29f8d823f7f45c.tar.bz2
spack-e2812a6e96d3b8b76d8abf0c3b29f8d823f7f45c.tar.xz
spack-e2812a6e96d3b8b76d8abf0c3b29f8d823f7f45c.zip
Update m4 (#36835)
* 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
-rw-r--r--var/spack/repos/builtin/packages/m4/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py
index f5bb11cee3..dede047da1 100644
--- a/var/spack/repos/builtin/packages/m4/package.py
+++ b/var/spack/repos/builtin/packages/m4/package.py
@@ -78,6 +78,13 @@ class M4(AutotoolsPackage, GNUMirrorPackage):
# 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)