Replace fPIE gcc option with fPIC 89/257289/1
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 22 Apr 2021 05:52:24 +0000 (14:52 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 22 Apr 2021 05:52:48 +0000 (14:52 +0900)
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: I64dfc54035b198b8d79913d47c51cae4cb8acad8
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
CMakeLists.txt

index 16203b8..5df1c9f 100644 (file)
@@ -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")