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
This commit is contained in:
Michael Kuhn 2020-06-16 15:30:56 +02:00 committed by Peter Scheibel
parent 01b277ad0f
commit f7008f37d4

View File

@ -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