From 2fd721bbe437b1aa9d3452a98c79c2442e8f014e Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Thu, 22 Apr 2021 14:28:30 +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: Icf4a211f682a8c54c641e6312a9e3cc77ff005d2 Signed-off-by: Chanwoo Choi --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 678f955..03d3264 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIE") +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC") SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -fno-omit-frame-pointer -finstrument-functions") SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC -Wall -Wextra -Wno-array-bounds -Wno-empty-body -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-but-set-parameter -Wno-unused-but-set-variable") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -lrt") -- 2.34.1