diff options
-rw-r--r-- | 0001-remove-linking-with-whole-archive-v2.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/0001-remove-linking-with-whole-archive-v2.patch b/0001-remove-linking-with-whole-archive-v2.patch new file mode 100644 index 000000000000..92d0aea0205a --- /dev/null +++ b/0001-remove-linking-with-whole-archive-v2.patch @@ -0,0 +1,28 @@ +From ab357c76493b0285f3fca0502085b3766e8e9be1 Mon Sep 17 00:00:00 2001 +From: Laurent Carlier <lordheavym@gmail.com> +Date: Thu, 28 Dec 2017 13:23:36 +0100 +Subject: [PATCH] remove linking with --whole-archive (v2) + +it breaks the build by linking pal twice and duplicating its symbols + +v2: update the patch +--- + icd/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/icd/CMakeLists.txt b/icd/CMakeLists.txt +index fbc125e..0384859 100644 +--- a/icd/CMakeLists.txt ++++ b/icd/CMakeLists.txt +@@ -293,7 +293,7 @@ if (UNIX) + + if(CMAKE_BUILD_TYPE_RELEASE) + execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) +- if (GCC_VERSION VERSION_GREATER 5.3 OR GCC_VERSION VERSION_EQUAL 5.3) ++ if ((GCC_VERSION VERSION_GREATER 5.3 OR GCC_VERSION VERSION_EQUAL 5.3) AND GCC_VERSION VERSION_LESS 7.0) + target_link_libraries(xgl PRIVATE -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/src/libpal.a -Wl,--no-whole-archive) + target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/metrohash/libmetrohash.a -Wl,--no-whole-archive) + target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/gpuopen/libgpuopen.a -Wl,--no-whole-archive) +-- +2.15.1 + |