From f7008f37d482deb2adc42c91a09b4987528e9c60 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 16 Jun 2020 15:30:56 +0200 Subject: slurm: Fix build with gcc@10: gcc@10: defaults to -fno-common, which breaks slurm up to version 20-02-1. For more details, see https://gcc.gnu.org/gcc-10/porting_to.html --- var/spack/repos/builtin/packages/slurm/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/slurm/package.py b/var/spack/repos/builtin/packages/slurm/package.py index c0d4cc01a9..ed69d08a77 100644 --- a/var/spack/repos/builtin/packages/slurm/package.py +++ b/var/spack/repos/builtin/packages/slurm/package.py @@ -63,6 +63,15 @@ class Slurm(AutotoolsPackage): depends_on('mariadb', when='+mariadb') depends_on('pmix', when='+pmix') + def flag_handler(self, name, flags): + wrapper_flags = None + + if name == 'cflags': + if self.spec.satisfies('@:20-02-1 %gcc@10:'): + wrapper_flags = ['-fcommon'] + + return (wrapper_flags, None, flags) + def configure_args(self): spec = self.spec -- cgit v1.2.3-70-g09d2