- enabled position independent code

This commit is contained in:
alexey.lysiuk 2020-01-04 15:08:38 +02:00 committed by Christoph Oelckers
parent 2422d06835
commit 26c3c3a1bd

View file

@ -178,9 +178,8 @@ else()
set( ALL_C_FLAGS "-static-libgcc" )
endif()
elseif( NOT MINGW )
# Generic GCC/Clang requires position independent executable to be enabled explicitly
set( ALL_C_FLAGS "${ALL_C_FLAGS} -fPIE" )
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie" )
# Generic GCC/Clang requires position independent code to be enabled explicitly
set( ALL_C_FLAGS "${ALL_C_FLAGS} -fPIC" )
endif( APPLE )
endif()