gmp: fix make check on catalina (#13201)

This commit is contained in:
Adam J. Stewart 2019-10-12 20:21:45 -05:00 committed by GitHub
parent 08d448bc54
commit ea4f9ebbde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,10 +30,15 @@ class Gmp(AutotoolsPackage):
# shared library support. Regenerating it fixes the issue.
force_autoreconf = True
def configure_args(self):
args = ['--enable-cxx']
def flag_handler(self, name, flags):
# Work around macOS Catalina / Xcode 11 code generation bug
# (test failure t-toom53, due to wrong code in mpn/toom53_mul.o)
if self.spec.satisfies('os=catalina') and name == 'cflags':
flags.append('-fno-stack-check')
# This flag is necessary for the Intel build to pass `make check`
if self.spec.compiler.name == 'intel':
args.append('CXXFLAGS=-no-ftz')
elif self.spec.satisfies('%intel') and name == 'cxxflags':
flags.append('-no-ftz')
return (flags, None, None)
return args
def configure_args(self):
return ['--enable-cxx']