summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTiziano Müller <tiziano.mueller@chem.uzh.ch>2021-07-02 02:37:14 +0200
committerGitHub <noreply@github.com>2021-07-01 18:37:14 -0600
commitf54fad40bac0f600ec86527712cffe8e619f22fa (patch)
tree60090105bc990783b69b2bf0e864955044612797 /var
parent38a010b5805db4f66312fbd3835a763bc543404b (diff)
downloadspack-f54fad40bac0f600ec86527712cffe8e619f22fa.tar.gz
spack-f54fad40bac0f600ec86527712cffe8e619f22fa.tar.bz2
spack-f54fad40bac0f600ec86527712cffe8e619f22fa.tar.xz
spack-f54fad40bac0f600ec86527712cffe8e619f22fa.zip
amdlibflame: fix build with gcc from CrayPE (#24358)
fixes #24210
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/amdlibflame/cray-compiler-wrapper.patch28
-rw-r--r--var/spack/repos/builtin/packages/amdlibflame/package.py1
2 files changed, 29 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/amdlibflame/cray-compiler-wrapper.patch b/var/spack/repos/builtin/packages/amdlibflame/cray-compiler-wrapper.patch
new file mode 100644
index 0000000000..bae772f365
--- /dev/null
+++ b/var/spack/repos/builtin/packages/amdlibflame/cray-compiler-wrapper.patch
@@ -0,0 +1,28 @@
+commit 8c06c4fd8b3f5b41431a06eb72bcc827b729db86
+Author: Tiziano Müller <tiziano.mueller@chem.uzh.ch>
+Date: Mon Jun 14 22:20:17 2021 +0200
+
+ use separate whole-archive/no-whole-archive to fix build with Cray compiler wrappers
+
+diff --git a/Makefile b/Makefile
+index d50f9d19..0c7c15c4 100644
+--- a/Makefile
++++ b/Makefile
+@@ -566,7 +566,7 @@ ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes)
+ ifeq ($(OS_NAME),Darwin)
+ $(LINKER) $(SOFLAGS) -o $@ -Wl,-force_load,$(LIBFLAME_A) $(LDFLAGS)
+ else
+- $(LINKER) $(SOFLAGS) -o $@ -Wl,--whole-archive,$(LIBFLAME_A),--no-whole-archive $(LDFLAGS)
++ $(LINKER) $(SOFLAGS) -o $@ -Wl,--whole-archive $(LIBFLAME_A) -Wl,--no-whole-archive $(LDFLAGS)
+ endif
+ else
+ # NOTE: Can't use $^ automatic variable as long as $(AR_OBJ_LIST_FILE) is in
+@@ -580,7 +580,7 @@ ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes)
+ ifeq ($(OS_NAME),Darwin)
+ @$(LINKER) $(SOFLAGS) -o $@ -Wl,-force_load,$(LIBFLAME_A) $(LDFLAGS)
+ else
+- @$(LINKER) $(SOFLAGS) -o $@ -Wl,--whole-archive,$(LIBFLAME_A),--no-whole-archive $(LDFLAGS)
++ @$(LINKER) $(SOFLAGS) -o $@ -Wl,--whole-archive $(LIBFLAME_A) -Wl,--no-whole-archive $(LDFLAGS)
+ endif
+ else
+ # NOTE: Can't use $^ automatic variable as long as $(AR_OBJ_LIST_FILE) is in
diff --git a/var/spack/repos/builtin/packages/amdlibflame/package.py b/var/spack/repos/builtin/packages/amdlibflame/package.py
index 308d925c3d..a29a21f6b4 100644
--- a/var/spack/repos/builtin/packages/amdlibflame/package.py
+++ b/var/spack/repos/builtin/packages/amdlibflame/package.py
@@ -40,6 +40,7 @@ class Amdlibflame(LibflameBase):
version('2.2', sha256='12b9c1f92d2c2fa637305aaa15cf706652406f210eaa5cbc17aaea9fcfa576dc')
patch('aocc-2.2.0.patch', when="@:2.999", level=1)
+ patch('cray-compiler-wrapper.patch')
provides('flame@5.2', when='@2:')