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

index 4d04a91..17c4620 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")