From 8e6697690184427d81fc630c4e07a1f6298d8b81 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Mon, 29 Jan 2018 15:54:36 +0900 Subject: [PATCH] Add relro compile option [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 --- packaging/attr.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packaging/attr.spec b/packaging/attr.spec index 809726e..23490f9 100644 --- a/packaging/attr.spec +++ b/packaging/attr.spec @@ -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 -- 2.7.4