mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-14 10:10:12 +01:00
cmake: always set -m32 for 32 bits build
It fixes cross-compilition issue when users/env set CC/CXX variables
This commit is contained in:
1 parent
6b48784709
commit
b5612ec622
1 file changed
+7
-1
@@ -4,9 +4,15 @@ set(CMAKE_SYSTEM_PROCESSOR i686)
|
||||
|
||||
# It could be i?86-*linux-gnu, x86_64-*linux-gnu, x86_64-*linux-gnux32, etc.
|
||||
# Leave it generic to only support amd64 or x32 to i386 with any compiler.
|
||||
if("$ENV{CC}" STREQUAL "" OR "$ENV{CXX}" STREQUAL "")
|
||||
if ("$ENV{CC}" STREQUAL "")
|
||||
set(CMAKE_C_COMPILER cc -m32)
|
||||
else()
|
||||
set(CMAKE_C_COMPILER $ENV{CC} -m32)
|
||||
endif()
|
||||
if ("$ENV{CXX}" STREQUAL "")
|
||||
set(CMAKE_CXX_COMPILER c++ -m32)
|
||||
else()
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX} -m32)
|
||||
endif()
|
||||
|
||||
# cmake 2.8.5 correctly sets CMAKE_LIBRARY_ARCHITECTURE for Debian multiarch.
|
||||
|
||||
Reference in new issue
Block a user