mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 13:28:01 +08:00
[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…
x
Reference in New Issue
Block a user