From 225927c1c3e087e420fa232c32e171129b17f500 Mon Sep 17 00:00:00 2001 From: Nikolay Simakov Date: Mon, 4 Oct 2021 07:42:33 -0400 Subject: graph500: added option -fcommon for gcc@10.2 (#25367) * graph500: added option -fcommon for gcc@10.2:, otherwise failed to build with "multiple definition of `column'" * graph500: moved setting cflag to flag_handler --- var/spack/repos/builtin/packages/graph500/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/graph500/package.py b/var/spack/repos/builtin/packages/graph500/package.py index c423bb722d..aa9e90126e 100644 --- a/var/spack/repos/builtin/packages/graph500/package.py +++ b/var/spack/repos/builtin/packages/graph500/package.py @@ -18,6 +18,15 @@ class Graph500(MakefilePackage): build_directory = 'src' + def flag_handler(self, name, flags): + wrapper_flags = None + + if name == 'cflags': + if self.spec.satisfies('%gcc@10:'): + wrapper_flags = ['-fcommon'] + + return (wrapper_flags, None, flags) + def edit(self, spec, prefix): makefile = FileFilter(join_path(self.build_directory, 'Makefile')) makefile.filter(r'^MPICC\s*=.*', 'MPICC={0}'.format(spec['mpi'].mpicc)) -- cgit v1.2.3-60-g2f50