build: leave to CMake to deal with -fPIE 76/34676/2
authorDamjan Marion <damarion@cisco.com>
Fri, 3 Dec 2021 13:07:41 +0000 (14:07 +0100)
committerOle Tr�an <otroan@employees.org>
Mon, 6 Dec 2021 12:27:22 +0000 (12:27 +0000)
Type: make
Change-Id: Icced0e09b75b3114b1652d552e288091968ee7cc
Signed-off-by: Damjan Marion <damarion@cisco.com>
src/CMakeLists.txt

index 46948a2..32f0e7e 100644 (file)
@@ -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)