summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Herbein <SteVwonder@users.noreply.github.com>2020-05-25 06:18:47 -0700
committerGitHub <noreply@github.com>2020-05-25 15:18:47 +0200
commitc4031f04551264d627a3cc6a30b25e005cf1f6b5 (patch)
tree1c679984afbd030752d05fa352f932ca13833cb7
parent17e4a7219114c743ea7cf34ef8b6f139b3eb2f92 (diff)
downloadspack-c4031f04551264d627a3cc6a30b25e005cf1f6b5.tar.gz
spack-c4031f04551264d627a3cc6a30b25e005cf1f6b5.tar.bz2
spack-c4031f04551264d627a3cc6a30b25e005cf1f6b5.tar.xz
spack-c4031f04551264d627a3cc6a30b25e005cf1f6b5.zip
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`
-rw-r--r--lib/spack/spack/build_environment.py2
1 files changed, 1 insertions, 1 deletions
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: