Commit 7dda5809 authored by Rafael Kitover's avatar Rafael Kitover
Browse files

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: default avatarRafael Kitover <rkitover@gmail.com>
parent 3c28a189
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment