mirror of https://github.com/microsoft/vcpkg.git
[linux x86] Set -m32 in Linker flags too (#31811)
When cross-compiling for x86 Linux, the -m32 flag must also be passed to the linker otherwise it complains about trying to link code built for the wrong architecture.
This commit is contained in:
parent
93b7a0d701
commit
95b51560e7
|
|
@ -10,6 +10,7 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|||
set(CMAKE_SYSTEM_PROCESSOR x86 CACHE STRING "")
|
||||
string(APPEND VCPKG_C_FLAGS " -m32")
|
||||
string(APPEND VCPKG_CXX_FLAGS " -m32")
|
||||
string(APPEND VCPKG_LINKER_FLAGS " -m32")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
||||
set(CMAKE_SYSTEM_PROCESSOR armv7l CACHE STRING "")
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
|
|
|
|||
Loading…
Reference in New Issue