summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com>2022-04-11 14:20:29 +0530
committerGitHub <noreply@github.com>2022-04-11 02:50:29 -0600
commitae76834f3d491bc682b26734a20d733abb6e727d (patch)
tree418adaf289b385cf0acba7cd15ebc23b69824328 /var
parent714573cdbcc53121a4581310cf647369231f74a8 (diff)
downloadspack-ae76834f3d491bc682b26734a20d733abb6e727d.tar.gz
spack-ae76834f3d491bc682b26734a20d733abb6e727d.tar.bz2
spack-ae76834f3d491bc682b26734a20d733abb6e727d.tar.xz
spack-ae76834f3d491bc682b26734a20d733abb6e727d.zip
Python: fix build with AOCC compiler (#28708)
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/python/package.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index 719e5dd56b..2281e9665c 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -270,9 +270,7 @@ class Python(Package):
)
conflicts('+tix', when='~tkinter',
msg='python+tix requires python+tix+tkinter')
-
conflicts('%nvhpc')
-
conflicts('@:2.7', when='platform=darwin target=aarch64:',
msg='Python 2.7 is too old for Apple Silicon')
@@ -455,6 +453,13 @@ class Python(Package):
if name == 'cflags':
flags.append('-fwrapv')
+ # Fix for following issues for python with aocc%3.2.0:
+ # https://github.com/spack/spack/issues/29115
+ # https://github.com/spack/spack/pull/28708
+ if self.spec.satisfies('%aocc@3.2.0', strict=True):
+ if name == 'cflags':
+ flags.extend(['-mllvm', '-disable-indvar-simplify=true'])
+
# allow flags to be passed through compiler wrapper
return (flags, None, None)