diff options
author | Nikolay Simakov <nikolays@buffalo.edu> | 2021-10-04 07:42:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 13:42:33 +0200 |
commit | 225927c1c3e087e420fa232c32e171129b17f500 (patch) | |
tree | ad9061cba0ec66d17d78b5bbd8e3284906c04093 | |
parent | bf9cf87d9bd5168e5140f54470aec1c785b761bb (diff) | |
download | spack-225927c1c3e087e420fa232c32e171129b17f500.tar.gz spack-225927c1c3e087e420fa232c32e171129b17f500.tar.bz2 spack-225927c1c3e087e420fa232c32e171129b17f500.tar.xz spack-225927c1c3e087e420fa232c32e171129b17f500.zip |
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
-rw-r--r-- | var/spack/repos/builtin/packages/graph500/package.py | 9 |
1 files changed, 9 insertions, 0 deletions
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)) |