summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)