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
This commit is contained in:
Nikolay Simakov 2021-10-04 07:42:33 -04:00 committed by GitHub
parent bf9cf87d9b
commit 225927c1c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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