summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2020-08-09 15:45:53 +0200
committerGitHub <noreply@github.com>2020-08-09 15:45:53 +0200
commit512fa8e4607d85bf4ef3ebae638ae649e9580420 (patch)
treee084925e81db468dbd788e3135003c25f880fda5
parent0642216c317be6400f4274e8fafd1209c45a7d51 (diff)
downloadspack-512fa8e4607d85bf4ef3ebae638ae649e9580420.tar.gz
spack-512fa8e4607d85bf4ef3ebae638ae649e9580420.tar.bz2
spack-512fa8e4607d85bf4ef3ebae638ae649e9580420.tar.xz
spack-512fa8e4607d85bf4ef3ebae638ae649e9580420.zip
Fix cpio clang build error (#17963)
undefined reference to '__muloti4', using the proposed fix from https://bugs.llvm.org/show_bug.cgi?id=16404
-rw-r--r--var/spack/repos/builtin/packages/cpio/package.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/cpio/package.py b/var/spack/repos/builtin/packages/cpio/package.py
index ecaf2531ea..d5238cff1c 100644
--- a/var/spack/repos/builtin/packages/cpio/package.py
+++ b/var/spack/repos/builtin/packages/cpio/package.py
@@ -20,6 +20,12 @@ class Cpio(AutotoolsPackage, GNUMirrorPackage):
build_directory = 'spack-build'
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')
+
+ if '%clang' in spec and name == 'cflags':
+ flags.append('--rtlib=compiler-rt')
+
return (flags, None, None)