From c4031f04551264d627a3cc6a30b25e005cf1f6b5 Mon Sep 17 00:00:00 2001 From: Stephen Herbein Date: Mon, 25 May 2020 06:18:47 -0700 Subject: lua: fix compilation on Cray (#16713) Problem: when calling `static_to_shared_library` on the `cray` arch, it produces a non-sensical compiler command with no input files. For example, when installing lua@5.2.4, it produced: 'gcc -lm -ldl -o /big-long-spack-path/liblua.so.5.2.4' Solution: do the same thing on `cray` that is done for `linux` --- lib/spack/spack/build_environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 3510ae8ac8..8beedf6c97 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -538,7 +538,7 @@ def _static_to_shared_library(arch, compiler, static_lib, shared_lib=None, # TODO: Compiler arguments should not be hardcoded but provided by # the different compiler classes. - if 'linux' in arch: + if 'linux' in arch or 'cray' in arch: soname = os.path.basename(shared_lib) if compat_version: -- cgit v1.2.3-70-g09d2