From f04837b03ec9ebf29bc1ecd18d8daefe627ae975 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 27 Feb 2018 05:02:04 -0700 Subject: [PATCH] snbone: fix build gcc-4.8 (#7317) --- var/spack/repos/builtin/packages/snbone/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)