Accepting request 396840 from home:dsterba:branches:mozilla:Factory

- enable build with PIE and full relro on x86_64 (boo#980384)

OBS-URL: https://build.opensuse.org/request/show/396840
OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=513
This commit is contained in:
Wolfgang Rosenauer 2016-05-20 11:04:12 +00:00 committed by Git OBS Bridge
parent 2edefb595d
commit d57a43a1f3
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri May 13 00:00:00 CEST 2016 - dsterba@suse.cz
- enable build with PIE and full relro on x86_64 (boo#980384)
-------------------------------------------------------------------
Wed May 4 10:27:43 UTC 2016 - wr@rosenauer.org

View File

@ -23,6 +23,9 @@
%define update_channel release
%define releasedate 2016050300
# PIE, full relro (x86_64 for now)
%define build_hardened 1
# general build definitions
%if "%{update_channel}" != "aurora"
%define progname firefox
@ -318,6 +321,13 @@ export CFLAGS="${CFLAGS/-g / }"
# Limit RAM usage during link
export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
%endif
%if 0%{?build_hardened}
%ifarch x86_64
export LDFLAGS="${LDFLAGS} -Wl,-z,relro,-z,now"
%endif
%endif
%ifarch ppc64 ppc64le
export CFLAGS="$CFLAGS -mminimal-toc"
%endif
@ -340,6 +350,9 @@ ac_add_options --enable-default-toolkit=cairo-gtk3
%else
ac_add_options --enable-default-toolkit=cairo-gtk2
%endif
%if 0%{?build_hardened}
ac_add_options --enable-pie
%endif
%ifarch %ix86 %arm
%if 0%{?suse_version} > 1230
ac_add_options --disable-optimize