Accepting request 265904 from Base:System

- build with PIE

OBS-URL: https://build.opensuse.org/request/show/265904
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gzip?expand=0&rev=38
This commit is contained in:
Dominique Leuenberger 2014-12-23 11:32:59 +00:00 committed by Git OBS Bridge
commit 631f397b60
2 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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
@ -71,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