Replace fPIE gcc option with fPIC 78/257278/1 submit/tizen/20210512.071659
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 22 Apr 2021 05:42:50 +0000 (14:42 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 22 Apr 2021 05:44:36 +0000 (14:44 +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: Ib886d236fe1c9373c48fd2ba15ec04f847cb8e15
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
CMakeLists.txt

index 6ab703567a9d9d076b0734a27e64f6e95323ba27..ecc6aa998abc7340fb10ad1f1fb187c8a17de34a 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")