cpio: add --rtlib=compiler-rt for %fj (#18619)

* cpio: add --rtlib=compiler-rt for %fj

* cpio: simplify if

* Update var/spack/repos/builtin/packages/cpio/package.py

This seems better.

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
ketsubouchi 2020-09-14 23:55:47 +09:00 committed by GitHub
parent a250006449
commit 41b68741ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,10 +22,11 @@ class Cpio(AutotoolsPackage, GNUMirrorPackage):
def flag_handler(self, name, flags):
spec = self.spec
if '%intel' in spec and name == 'cflags':
flags.append('-no-gcc')
if name == 'cflags':
if '%intel' in spec:
flags.append('-no-gcc')
if '%clang' in spec and name == 'cflags':
flags.append('--rtlib=compiler-rt')
elif '%clang' in spec or '%fj' in spec:
flags.append('--rtlib=compiler-rt')
return (flags, None, None)