Replace fPIE gcc option with fPIC 95/257295/1
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 22 Apr 2021 05:56:25 +0000 (14:56 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 22 Apr 2021 06:02:12 +0000 (15:02 +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: I3dc02f18f57b6b97acccfd56700b85bc3b20c525
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
CMakeLists.txt

index a8142be2949fdb3908967bd3a8660ee65086a2e8..49182fefb8b4f093b9d8d71153ee0cac02a37955 100644 (file)
@@ -30,7 +30,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")