summaryrefslogtreecommitdiff
path: root/graphics/vulkan-loader/files/patch-loader_CMakeLists.txt
blob: 1d2bf1560b606b210787ba222e28e7da50b31ebc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- The ASM compiler identification is Clang
-- Found assembler: /usr/bin/cc
CMake Warning at loader/CMakeLists.txt:252 (message):
  Could not find working amd64 GAS assembler

  The build will fall back on building with C code

  Note that this may be unsafe, as the C code requires tail-call
  optimizations to remove the stack frame for certain calls.  If the compiler
  does not do this, then unknown device extensions will suffer from a
  corrupted stack.

--- loader/CMakeLists.txt.orig	2022-03-15 19:06:40 UTC
+++ loader/CMakeLists.txt
@@ -186,7 +186,7 @@ else() # i.e.: Linux
             if(ASSEMBLER_WORKS)
                 set(OPT_LOADER_SRCS ${OPT_LOADER_SRCS} unknown_ext_chain_gas_aarch64.S)
             endif()
-        elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^i.86$")
+        elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "x86_64|amd64" OR ${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "x86$|i.86")
             check_include_file("cet.h" HAVE_CET_H)
             if(HAVE_CET_H)
                 target_compile_definitions(loader_specific_options INTERFACE HAVE_CET_H)