From a2d6d270d83b9bea7443e4e43489610fa66e5f21 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Thu, 22 Apr 2021 14:56:25 +0900 Subject: [PATCH] Replace fPIE gcc option with fPIC The fPIE option is for the executable binary. It is not proper for shared library files. So that correct the wrong use-case by using fPIC. Change-Id: Id4ccffe6a1ce89cbc8e50d314114092ab9806fb4 Signed-off-by: Chanwoo Choi --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6651b70..9928b15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -fPIE") +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -fPIC") SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -fno-omit-frame-pointer -finstrument-functions") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -lrt") SET(CMAKE_EXE_LINKER_FLAGS "-pie") -- 2.7.4