Replace fPIE gcc option with fPIC 77/257277/2
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 22 Apr 2021 05:28:30 +0000 (14:28 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Wed, 12 May 2021 08:57:26 +0000 (08:57 +0000)
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 <cw00.choi@samsung.com>
CMakeLists.txt

index 678f9557b59f257edaa09bd737f2efe8038748be..03d32649c9380883364a75a7dec6eab36c61bca9 100644 (file)
@@ -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")