Replace fPIE gcc option with fPIC 93/257293/1 accepted/tizen_6.5_unified accepted/tizen_7.0_unified_hotfix tizen_6.5 tizen_7.0_hotfix accepted/tizen/6.5/unified/20211028.115215 accepted/tizen/7.0/unified/20221110.062923 accepted/tizen/7.0/unified/hotfix/20221116.110346 accepted/tizen/8.0/unified/20231005.094432 accepted/tizen/unified/20210602.122419 submit/tizen/20210517.062810 submit/tizen/20210531.070503 submit/tizen/20210601.065659 submit/tizen_6.5/20211028.163201 tizen_6.5.m2_release tizen_7.0_m2_release tizen_8.0_m2_release
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:00:39 +0000 (15:00 +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: Id4ccffe6a1ce89cbc8e50d314114092ab9806fb4
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
CMakeLists.txt

index 6651b70..9928b15 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")