From f6e9216b7dab9bc990460a085e121f2c3890f52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 2 Sep 2016 21:23:12 +0200 Subject: [PATCH] Use PIC/pie flags to satisfy Launchpad --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3abd48bf87..eddd5bb8cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,10 +214,10 @@ if (APPLE) endif (APPLE) # set necessary flags to compile code as is -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu99 -fno-pie -fstrict-aliasing -Werror -Wno-error=date-time -Wundef -Wmissing-declarations") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++11 -fno-pie -fstrict-aliasing -Werror -Wno-error=date-time -Wundef -Wmissing-declarations") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu99 -fPIC -fstrict-aliasing -Werror -Wno-error=date-time -Wundef -Wmissing-declarations") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++11 -fPIC -fstrict-aliasing -Werror -Wno-error=date-time -Wundef -Wmissing-declarations") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M} -fpie") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} -fpie") if (MINGW) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")