diff options
author | Michael Kuhn <michael.kuhn@informatik.uni-hamburg.de> | 2020-05-25 14:22:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-25 14:22:51 +0200 |
commit | d0e4414bb66805b4526c2320080eed583e32c5b5 (patch) | |
tree | 29146ebe1991343c6fb8cfc1995de231aef8ac6d | |
parent | 232cdb85a5fb97961dde44f9c27a5361407737ab (diff) | |
download | spack-d0e4414bb66805b4526c2320080eed583e32c5b5.tar.gz spack-d0e4414bb66805b4526c2320080eed583e32c5b5.tar.bz2 spack-d0e4414bb66805b4526c2320080eed583e32c5b5.tar.xz spack-d0e4414bb66805b4526c2320080eed583e32c5b5.zip |
libunwind: fix build with gcc@10: (#16782)
-rw-r--r-- | var/spack/repos/builtin/packages/libunwind/package.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/libunwind/package.py b/var/spack/repos/builtin/packages/libunwind/package.py index 1a4ae5524c..dcabc86ec5 100644 --- a/var/spack/repos/builtin/packages/libunwind/package.py +++ b/var/spack/repos/builtin/packages/libunwind/package.py @@ -47,7 +47,15 @@ class Libunwind(AutotoolsPackage): provides('unwind') - flag_handler = AutotoolsPackage.build_system_flags + def flag_handler(self, name, flags): + wrapper_flags = None + + if name == 'cflags': + # https://github.com/libunwind/libunwind/pull/166 + if self.spec.satisfies('@:1.4 %gcc@10:'): + wrapper_flags = ['-fcommon'] + + return (wrapper_flags, None, flags) def configure_args(self): spec = self.spec |