From 536c94a943b1aa01b2f28a0b32ebd8147c8dc1be Mon Sep 17 00:00:00 2001 From: Christopher Degawa Date: Tue, 19 Nov 2024 20:46:36 -0600 Subject: [PATCH] vulkan-loader: rebase and fix Signed-off-by: Christopher Degawa --- ...ve-CMAKE_CXX_IMPLICIT_LINK_LIBRARIES.patch | 2 +- ...02-loader-CMake-related-static-hacks.patch | 43 ++++++++++++++++--- ...oader-Re-add-private-libs-to-pc-file.patch | 4 +- ...er-Static-library-name-related-hacks.patch | 4 +- 4 files changed, 43 insertions(+), 10 deletions(-) diff --git a/vulkan-loader/0001-pc-remove-CMAKE_CXX_IMPLICIT_LINK_LIBRARIES.patch b/vulkan-loader/0001-pc-remove-CMAKE_CXX_IMPLICIT_LINK_LIBRARIES.patch index 427229e..a88de4a 100644 --- a/vulkan-loader/0001-pc-remove-CMAKE_CXX_IMPLICIT_LINK_LIBRARIES.patch +++ b/vulkan-loader/0001-pc-remove-CMAKE_CXX_IMPLICIT_LINK_LIBRARIES.patch @@ -1,4 +1,4 @@ -From 99ac91114d719c942346620fe1fa143d014f604f Mon Sep 17 00:00:00 2001 +From 74d882efb2694d4a683b7c678dd909dad26fe6b2 Mon Sep 17 00:00:00 2001 From: Christopher Degawa Date: Wed, 18 Aug 2021 11:02:41 -0500 Subject: [PATCH 1/4] pc: remove CMAKE_CXX_IMPLICIT_LINK_LIBRARIES diff --git a/vulkan-loader/0002-loader-CMake-related-static-hacks.patch b/vulkan-loader/0002-loader-CMake-related-static-hacks.patch index fb3885e..2bb57c2 100644 --- a/vulkan-loader/0002-loader-CMake-related-static-hacks.patch +++ b/vulkan-loader/0002-loader-CMake-related-static-hacks.patch @@ -1,4 +1,4 @@ -From 6a0a3777c6ee706fa476958e682fff4de91e43b4 Mon Sep 17 00:00:00 2001 +From 48d958b6ce6e1a34db632048d7be24975071d66d Mon Sep 17 00:00:00 2001 From: Christopher Degawa Date: Mon, 2 Oct 2023 01:16:49 -0500 Subject: [PATCH 2/4] loader: CMake related static hacks @@ -8,14 +8,32 @@ with shinchiro's patch yet. Signed-off-by: Christopher Degawa --- - loader/CMakeLists.txt | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) + loader/CMakeLists.txt | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt -index ed48d051f..9b437060e 100644 +index ed48d051f..e0da5fe5a 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt -@@ -372,8 +372,14 @@ if(WIN32) +@@ -214,7 +214,7 @@ end + + if(ASM_COMPILER_WORKS) + add_executable(asm_offset asm_offset.c) +- target_link_libraries(asm_offset PRIVATE loader_specific_options) ++ target_link_libraries(asm_offset PRIVATE $) + # If am emulator is provided (Like Wine), or running on native, run asm_offset to generate gen_defines.asm + if (CMAKE_CROSSCOMPILING_EMULATOR OR NOT CMAKE_CROSSCOMPILING) + add_custom_command(OUTPUT gen_defines.asm DEPENDS asm_offset COMMAND asm_offset ${LOADER_ASM_DIALECT}) +@@ -309,7 +309,7 @@ elseif(UNIX OR MINGW OR (WIN32 AND USE_GAS)) # i.e.: Linux & Apple & MinGW & Win + + if(ASSEMBLER_WORKS) + add_executable(asm_offset asm_offset.c) +- target_link_libraries(asm_offset loader_specific_options) ++ target_link_libraries(asm_offset PRIVATE $) + # If not cross compiling, run asm_offset to generage gen_defines.asm + if (NOT CMAKE_CROSSCOMPILING) + add_custom_command(OUTPUT gen_defines.asm DEPENDS asm_offset COMMAND asm_offset GAS) +@@ -372,13 +372,19 @@ if(WIN32) set(RC_FILE_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/loader.rc) endif() @@ -31,6 +49,21 @@ index ed48d051f..9b437060e 100644 ${NORMAL_LOADER_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/${API_TYPE}-1.def ${RC_FILE_LOCATION}) + +- target_link_libraries(vulkan PRIVATE loader_specific_options) ++ target_link_libraries(vulkan PRIVATE $) + + # when adding the suffix the import and runtime library names must be consistent + # mingw: libvulkan-1.dll.a / vulkan-1.dll +@@ -458,7 +464,7 @@ else() + endif() + + target_link_libraries(vulkan-framework ${CMAKE_DL_LIBS} Threads::Threads -lm "-framework CoreFoundation") +- target_link_libraries(vulkan-framework loader_specific_options) ++ target_link_libraries(vulkan-framework $) + + if (MODIFY_UNKNOWN_FUNCTION_DECLS) + # Modifies the names of functions as they appearin the assembly code so that the @@ -505,7 +511,7 @@ if (LOADER_USE_UNSAFE_FILE_SEARCH) endif() diff --git a/vulkan-loader/0003-loader-Re-add-private-libs-to-pc-file.patch b/vulkan-loader/0003-loader-Re-add-private-libs-to-pc-file.patch index c8fb482..3dc3903 100644 --- a/vulkan-loader/0003-loader-Re-add-private-libs-to-pc-file.patch +++ b/vulkan-loader/0003-loader-Re-add-private-libs-to-pc-file.patch @@ -1,4 +1,4 @@ -From 1921eaf74268f34e4ef049e99755e57a57d1d81d Mon Sep 17 00:00:00 2001 +From 675075df00417a2f1195761f04f92c8b773e9469 Mon Sep 17 00:00:00 2001 From: Christopher Degawa Date: Mon, 2 Oct 2023 01:35:10 -0500 Subject: [PATCH 3/4] loader: Re-add private libs to pc file @@ -12,7 +12,7 @@ Signed-off-by: Christopher Degawa 2 files changed, 13 insertions(+) diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt -index 9b437060e..075779d45 100644 +index e0da5fe5a..24e138e0c 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -545,6 +545,18 @@ install(FILES "${version_config}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Vulk diff --git a/vulkan-loader/0004-loader-Static-library-name-related-hacks.patch b/vulkan-loader/0004-loader-Static-library-name-related-hacks.patch index 8c34a23..6423d63 100644 --- a/vulkan-loader/0004-loader-Static-library-name-related-hacks.patch +++ b/vulkan-loader/0004-loader-Static-library-name-related-hacks.patch @@ -1,4 +1,4 @@ -From fc17c4cbd6b94f9243352bb41d704a9589cbd7a0 Mon Sep 17 00:00:00 2001 +From fb54de56a777e1b810d2c6d2c744fd39e679ef8b Mon Sep 17 00:00:00 2001 From: Christopher Degawa Date: Mon, 2 Oct 2023 01:38:44 -0500 Subject: [PATCH 4/4] loader: Static library name related hacks @@ -11,7 +11,7 @@ Signed-off-by: Christopher Degawa 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt -index 075779d45..adb6f0cd4 100644 +index 24e138e0c..e7bed5f4d 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -389,14 +389,16 @@ if(WIN32)