diff --git a/var/spack/repos/builtin/packages/snbone/package.py b/var/spack/repos/builtin/packages/snbone/package.py index eb493d9a16..d1d2a63806 100644 --- a/var/spack/repos/builtin/packages/snbone/package.py +++ b/var/spack/repos/builtin/packages/snbone/package.py @@ -50,7 +50,9 @@ def build(self, spec, prefix): elif self.compiler.name == 'intel': make('COMPILER=intel', 'LDFLAGS=-lm') else: - make('COMPILER=gfortran', 'LDFLAGS=-lm') + # older gcc need link libs after objs, but + # LDFLAGS is in the front, so use IBMLIB instead + make('COMPILER=gfortran', 'IBMLIB=-lm') def install(self, spec, prefix): mkdirp(prefix.bin.C)