Python: fix build with AOCC compiler (#28708)
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
parent
714573cdbc
commit
ae76834f3d
@ -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 @@ def flag_handler(self, name, flags):
|
||||
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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user