Add relro compile option 21/168521/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 sandbox/backup/attr-2.4.47_20201112 sandbox/backup/attr_2.4.47_20200109 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 accepted/tizen/5.0/base/20181101.091412 accepted/tizen/5.5/base/20191030.084834 accepted/tizen/5.5/base/mobile/hotfix/20201023.090126 accepted/tizen/5.5/base/wearable/hotfix/20201023.082300 accepted/tizen/6.0/base/20201029.110127 accepted/tizen/6.0/base/20230713.142742 accepted/tizen/6.0/base/tool/20201029.111757 accepted/tizen/6.0/base/tool/hotfix/20201030.124608 accepted/tizen/6.0/base/tool/hotfix/20201102.085740 accepted/tizen/base/20180209.132450 submit/tizen_5.0_base/20181101.000001 submit/tizen_5.5_base/20191030.000001 submit/tizen_5.5_base_mobile_hotfix/20201023.171501 submit/tizen_5.5_base_wearable_hotfix/20201023.155601 submit/tizen_6.0_base/20201029.184801 submit/tizen_6.0_base_hotfix/20201030.192501 submit/tizen_6.0_base_hotfix/20201102.162701 submit/tizen_base/20180205.004117 submit/tizen_base/20200113.233420 submit/tizen_base/20201208.051231 submit/tizen_base/20201208.051733 tizen_5.5.m2_release tizen_6.0.m2_release
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 29 Jan 2018 06:54:36 +0000 (15:54 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 29 Jan 2018 06:54:36 +0000 (15:54 +0900)
[Model] All
[BinType] AP
[Customer] OPEN

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

[Problem] not adjust relro compile option
[Cause & Measure] add relro compile option at spec file
[Checking Method]

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

Change-Id: I251b28e52cb7675f4afa669f47e7556f2ad2a755
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
packaging/attr.spec

index 809726e..23490f9 100644 (file)
@@ -57,7 +57,9 @@ cp %{SOURCE1001} .
 %build
 export OPTIMIZER="$RPM_OPT_FLAGS"
 export DEBUG=-DNDEBUG
-CFLAGS="$RPM_OPT_FLAGS" \
+export CFLAGS="$RPM_OPT_FLAGS -fPIC"
+export LDFLAGS="${LDFLAGS} -Wl,-z,relro -pie"
+
 %configure \
        --prefix=/ \
        --enable-gettext=no \
@@ -66,8 +68,8 @@ CFLAGS="$RPM_OPT_FLAGS" \
        --libdir=%{_libdir} \
        --libexecdir=%{_libdir} \
        --with-pic
+
 %{__make} libattr %{?_smp_mflags}
-CFLAGS="$CFLAGS -fPIE" LDFLAGS="$LDFLAGS -pie" \
 %{__make} attr getfattr setfattr %{?_smp_mflags}
 
 %install