Fix cpio clang build error (#17963)

undefined reference to '__muloti4', using the proposed fix from
https://bugs.llvm.org/show_bug.cgi?id=16404
This commit is contained in:
Harmen Stoppels 2020-08-09 15:45:53 +02:00 committed by GitHub
parent 0642216c31
commit 512fa8e460
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,12 @@ class Cpio(AutotoolsPackage, GNUMirrorPackage):
build_directory = 'spack-build' build_directory = 'spack-build'
def flag_handler(self, name, flags): def flag_handler(self, name, flags):
if self.spec.satisfies('%intel') and name == 'cflags': spec = self.spec
if '%intel' in spec and name == 'cflags':
flags.append('-no-gcc') flags.append('-no-gcc')
if '%clang' in spec and name == 'cflags':
flags.append('--rtlib=compiler-rt')
return (flags, None, None) return (flags, None, None)