Add pie, relro compile option 14/168514/1 accepted/tizen_5.0_base accepted/tizen_5.5_base accepted/tizen_5.5_base_mobile_hotfix accepted/tizen_5.5_base_wearable_hotfix accepted/tizen_6.0_base accepted/tizen_6.0_base_tool accepted/tizen_6.0_base_tool_hotfix accepted/tizen_6.5_base accepted/tizen_6.5_base_tool accepted/tizen_7.0_base accepted/tizen_7.0_base_hotfix accepted/tizen_7.0_base_tool accepted/tizen_7.0_base_tool_hotfix tizen_5.0_base tizen_5.5_base tizen_5.5_base_mobile_hotfix tizen_5.5_base_wearable_hotfix tizen_5.5_tv tizen_6.0_base tizen_6.0_base_hotfix tizen_6.5_base tizen_7.0_base tizen_7.0_base_hotfix accepted/tizen/5.0/base/20181101.091608 accepted/tizen/5.5/base/20191030.082055 accepted/tizen/5.5/base/mobile/hotfix/20201023.084053 accepted/tizen/5.5/base/wearable/hotfix/20201023.080454 accepted/tizen/6.0/base/20201029.110035 accepted/tizen/6.0/base/20230713.143138 accepted/tizen/6.0/base/tool/20201029.111721 accepted/tizen/6.0/base/tool/hotfix/20201030.124528 accepted/tizen/6.0/base/tool/hotfix/20201102.085646 accepted/tizen/6.5/base/20230714.002758 accepted/tizen/6.5/base/tool/20211027.105624 accepted/tizen/6.5/base/tool/20211027.121749 accepted/tizen/7.0/base/20230714.003206 accepted/tizen/7.0/base/hotfix/20230714.004015 accepted/tizen/7.0/base/tool/20221028.121431 accepted/tizen/7.0/base/tool/hotfix/20221115.085951 accepted/tizen/base/20180209.132447 submit/tizen_5.0_base/20181101.000002 submit/tizen_5.5_base/20191030.000001 submit/tizen_5.5_base_mobile_hotfix/20201023.171502 submit/tizen_5.5_base_wearable_hotfix/20201023.155602 submit/tizen_6.0_base/20201029.184802 submit/tizen_6.0_base_hotfix/20201030.192502 submit/tizen_6.0_base_hotfix/20201102.162702 submit/tizen_6.5_base/20211026.180902 submit/tizen_6.5_base/20211027.183102 submit/tizen_6.5_base/20211027.201201 submit/tizen_7.0_base/20221028.201101 submit/tizen_7.0_base_hotfix/20221115.161601 submit/tizen_base/20180205.003902 tizen_5.5.m2_release tizen_6.0.m2_release tizen_6.5.m2_release tizen_7.0_m2_release
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 29 Jan 2018 06:43:26 +0000 (15:43 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 29 Jan 2018 06:43:26 +0000 (15:43 +0900)
[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] N/A
[Occurrence Version] N/A

[Problem] does not adjust pie,relro compile
[Cause & Measure] fix Makefile, spec file
[Checking Method]

[Team] Open Source Management and Setting Part
[Developer] dh0128.kwak
[Solution company] Samsung
[Change Type] N/A

Change-Id: Idaf520dc114a27e902236d825ef69315ac3b27d1
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Makefile.in
packaging/gdbm.spec

index fec70bb3c5e88fed127083dd9e497947860bf650..f2641ae74963da9dea50b6879a4c8e8c7e6e44b7 100644 (file)
@@ -155,12 +155,12 @@ install-compat:
 
 libgdbm.la: $(LOBJS) gdbm.h
        rm -f libgdbm.la
-       $(LIBTOOL) --mode=link $(CC) -o libgdbm.la -rpath $(libdir) \
+       $(LIBTOOL) --mode=link $(CC) -Wl,-z,relro -o libgdbm.la -rpath $(libdir) \
                -version-info $(SHLIB_VER) $(LOBJS)
 
 libgdbm_compat.la: $(C_LOBJS) gdbm.h
        rm -f libgdbm_compat.la
-       $(LIBTOOL) --mode=link $(CC) -o libgdbm_compat.la -rpath $(libdir) \
+       $(LIBTOOL) --mode=link $(CC) -Wl,-z,relro -o libgdbm_compat.la -rpath $(libdir) \
                -version-info $(SHLIB_VER) $(C_LOBJS)
 
 gdbm.h:        gdbm.proto gdbmerrno.h gdbm.proto2
index 8a2e7649d7d08811acda9fbbde485a07bf9605ab..8c6c7b4cbadcc92263175ac5944910f580363ebd 100644 (file)
@@ -60,10 +60,10 @@ to develop applications that require these.
 %patch5 -p1
 
 %build
+export CFLAGS="${CFLAGS} -Wa,--noexecstack -fPIC"
+export LDFLAGS="${LDFLAGS} -Wl,-z,relro -pie"
 aclocal
 autoreconf --force --install
-export CFLAGS="$RPM_OPT_FLAGS -Wa,--noexecstack"
-
 %configure --disable-static
 make %{?jobs:-j%jobs}