amdlibflame: fix build with gcc from CrayPE (#24358)

fixes #24210
This commit is contained in:
Tiziano Müller 2021-07-02 02:37:14 +02:00 committed by GitHub
parent 38a010b580
commit f54fad40ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

View File

@ -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

View File

@ -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:')