cmake: do not use -fPIC on 32 bit x86, breaks asm
Do not add the -fPIC (position independent code) compiler flag on 32 bit x86 architectures because that breaks inline assembly, and some included libraries like fex require inline assembly to work. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
3c28a18976
commit
7dda58097a
|
@ -417,7 +417,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
|||
# common flags
|
||||
set(MY_C_FLAGS -pipe -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -feliminate-unused-debug-types)
|
||||
|
||||
if(NOT WIN32)
|
||||
if(NOT (WIN32 OR X86_32)) # inline asm is not allowed with -fPIC
|
||||
set(MY_C_FLAGS ${MY_C_FLAGS} -fPIC)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue