From 4741d0043a469f16b96d2debfc3643f5aed8ebfb0001604e652e4555bbb57170 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 19 Dec 2014 10:06:36 +0000 Subject: [PATCH 1/2] - build with PIE OBS-URL: https://build.opensuse.org/package/show/Base:System/gzip?expand=0&rev=37 --- gzip.changes | 5 +++++ gzip.spec | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gzip.changes b/gzip.changes index d35fb2e..d9378f9 100644 --- a/gzip.changes +++ b/gzip.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Dec 19 10:05:17 UTC 2014 - meissner@suse.com + +- build with PIE + ------------------------------------------------------------------- Mon May 12 15:44:03 UTC 2014 - vdziewiecki@suse.com diff --git a/gzip.spec b/gzip.spec index 260d450..f3a497c 100644 --- a/gzip.spec +++ b/gzip.spec @@ -57,8 +57,9 @@ times. %patch7 -p1 %build -CFLAGS="%{optflags} -fomit-frame-pointer \ --W -Wall -Wno-unused-parameter -Wstrict-prototypes -Wpointer-arith" +export CFLAGS="%{optflags} -fomit-frame-pointer \ +-W -Wall -Wno-unused-parameter -Wstrict-prototypes -Wpointer-arith -fPIE" +export LDFLAGS="-pie" %configure --disable-silent-rules \ gl_cv_func_printf_directive_n=yes \ gl_cv_func_printf_infinite_long_double=yes From 416edfac4c4c4525ee7e03e390b079ce41651fdf6a7219235d3548bd98e44b09 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 19 Dec 2014 10:35:31 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/Base:System/gzip?expand=0&rev=38 --- gzip.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gzip.spec b/gzip.spec index f3a497c..6ab899d 100644 --- a/gzip.spec +++ b/gzip.spec @@ -72,12 +72,12 @@ profile_gzip() time ./gzip -d < $tmpfile.gz > /dev/null } %if %{do_profiling} -make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-generate" +make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-generate" LDFLAGS="-pie" profile_gzip make clean %{?_smp_mflags} -make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-use" +make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-use" LDFLAGS="-pie" %else -make %{?_smp_mflags} +make %{?_smp_mflags} LDFLAGS="-pie" %endif %check