From: Damjan Marion Date: Fri, 3 Dec 2021 13:07:41 +0000 (+0100) Subject: build: leave to CMake to deal with -fPIE X-Git-Tag: v22.06-rc0~148 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=9c412e9ee58ae4a2671d63f70add6fd2c6c15a2b;p=vpp.git build: leave to CMake to deal with -fPIE Type: make Change-Id: Icced0e09b75b3114b1652d552e288091968ee7cc Signed-off-by: Damjan Marion --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 46948a2aff3..32f0e7edcdc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -74,7 +74,7 @@ set(VPP_BINARY_DIR ${CMAKE_BINARY_DIR}/CMakeFiles) set(PYENV PYTHONPYCACHEPREFIX=${CMAKE_BINARY_DIR}/CMakeFile/__pycache__) if (CMAKE_BUILD_TYPE) - add_compile_options(-g -fPIC -Werror -Wall) + add_compile_options(-g -Werror -Wall) endif() if (compiler_flag_no_address_of_packed_member) @@ -90,7 +90,6 @@ set(CMAKE_C_FLAGS_DEBUG "") if (${CMAKE_BUILD_TYPE_LC} MATCHES "release") add_compile_options(-O3 -fstack-protector -fno-common) add_compile_definitions(_FORTIFY_SOURCE=2) - add_link_options("-pie") elseif (${CMAKE_BUILD_TYPE_LC} MATCHES "debug") add_compile_options(-O0 -fstack-protector -fno-common) add_compile_definitions(CLIB_DEBUG)