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:
parent
bf9cf87d9b
commit
225927c1c3
@ -18,6 +18,15 @@ class Graph500(MakefilePackage):
|
|||||||
|
|
||||||
build_directory = 'src'
|
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):
|
def edit(self, spec, prefix):
|
||||||
makefile = FileFilter(join_path(self.build_directory, 'Makefile'))
|
makefile = FileFilter(join_path(self.build_directory, 'Makefile'))
|
||||||
makefile.filter(r'^MPICC\s*=.*', 'MPICC={0}'.format(spec['mpi'].mpicc))
|
makefile.filter(r'^MPICC\s*=.*', 'MPICC={0}'.format(spec['mpi'].mpicc))
|
||||||
|
Loading…
Reference in New Issue
Block a user