Fixed: "relocation R_X86_64_32 against.." error when mixing static and shared libraries

This commit is contained in:
kervala 2011-09-10 18:43:21 +02:00
parent 51ecec85e5
commit 75f979fec8

View file

@ -368,6 +368,11 @@ MACRO(NL_SETUP_BUILD)
SET(PLATFORM_CFLAGS "-gdwarf-2 ${PLATFORM_CFLAGS}")
ENDIF(APPLE)
# Fix "relocation R_X86_64_32 against.." error on x64 platforms
IF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS)
SET(PLATFORM_CFLAGS "-fPIC ${PLATFORM_CFLAGS}")
ENDIF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS)
SET(PLATFORM_CXXFLAGS ${PLATFORM_CFLAGS})
IF(NOT APPLE)