halapi: Replace fPIE gcc option with fPIC 76/257276/2
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 22 Apr 2021 05:19:35 +0000 (14:19 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 22 Apr 2021 07:03:01 +0000 (16:03 +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: Id27d4a31080477415d9bc2bbaa0210039ff27233
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
CMakeLists.txt

index df8d137..062835b 100644 (file)
@@ -27,7 +27,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")