summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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:')