From af778aac0a0439241eabf91a4eb1af3b3f1570cc Mon Sep 17 00:00:00 2001 From: Robert Pavel Date: Wed, 29 Jul 2020 19:03:12 -0600 Subject: Tweak to EOSPAC for gcc@10 Support (#17777) Eospac's build breaks on gcc@10: due to dependence on -fcommon behavior and gnu changing to -fno-common. Added conditional argument to support bleeding edge compilers --- var/spack/repos/builtin/packages/eospac/package.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/eospac/package.py b/var/spack/repos/builtin/packages/eospac/package.py index 0d9221e7df..34f2e00632 100644 --- a/var/spack/repos/builtin/packages/eospac/package.py +++ b/var/spack/repos/builtin/packages/eospac/package.py @@ -33,17 +33,22 @@ class Eospac(Package): def install(self, spec, prefix): with working_dir('Source'): + compilerArgs = [] + compilerArgs.append('CC={0}'.format(spack_cc)) + compilerArgs.append('CXX={0}'.format(spack_cxx)) + compilerArgs.append('F77={0}'.format(spack_f77)) + compilerArgs.append('F90={0}'.format(spack_fc)) + # Eospac depends on fcommon behavior + # but gcc@10 flipped to default fno-common + if "%gcc@10:" in spec: + compilerArgs.append('CFLAGS=-fcommon') make('install', - 'CC={0}'.format(spack_cc), - 'CXX={0}'.format(spack_cxx), - 'F77={0}'.format(spack_f77), - 'F90={0}'.format(spack_fc), 'prefix={0}'.format(prefix), 'INSTALLED_LIBRARY_DIR={0}'.format(prefix.lib), 'INSTALLED_INCLUDE_DIR={0}'.format(prefix.include), 'INSTALLED_EXAMPLE_DIR={0}'.format(prefix.example), - 'INSTALLED_BIN_DIR={0}'.format(prefix.bin)) - + 'INSTALLED_BIN_DIR={0}'.format(prefix.bin), + *compilerArgs) # fix conflict with linux's getopt for 6.4.0beta.2 if spec.satisfies('@6.4.0beta.2'): with working_dir(prefix.bin): -- cgit v1.2.3-70-g09d2