summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2020-05-11 16:02:56 -0700
committerGitHub <noreply@github.com>2020-05-11 18:02:56 -0500
commitfa702b8311faf7fa073d9ae852a82c1f50199172 (patch)
treeebea5d9b1622d0d8d111ddf3289ac9426ef67d1e /var
parent35c3478fcd5063199f9d2a45402209c2149a3f51 (diff)
downloadspack-fa702b8311faf7fa073d9ae852a82c1f50199172.tar.gz
spack-fa702b8311faf7fa073d9ae852a82c1f50199172.tar.bz2
spack-fa702b8311faf7fa073d9ae852a82c1f50199172.tar.xz
spack-fa702b8311faf7fa073d9ae852a82c1f50199172.zip
python: add -fwrapv to cflags for python@3.8.0: %intel (#16592)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/python/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index a9b04a2d5b..aac98d11ad 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -258,6 +258,15 @@ class Python(AutotoolsPackage):
env.unset('PYTHONPATH')
env.unset('PYTHONHOME')
+ def flag_handler(self, name, flags):
+ # python 3.8 requires -fwrapv when compiled with intel
+ if self.spec.satisfies('@3.8: %intel'):
+ if name == 'cflags':
+ flags.append('-fwrapv')
+
+ # allow flags to be passed through compiler wrapper
+ return (flags, None, None)
+
def configure_args(self):
spec = self.spec
config_args = []