diff -r 4b99400f6d17 -r 84cdfb476431 MozillaFirefox/MozillaFirefox.spec --- a/MozillaFirefox/MozillaFirefox.spec Mon Oct 22 11:26:41 2018 +0200 +++ b/MozillaFirefox/MozillaFirefox.spec Sun Mar 17 10:00:10 2019 +0100 @@ -1,8 +1,8 @@ # # spec file for package MozillaFirefox # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. -# 2006-2018 Wolfgang Rosenauer +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# 2006-2019 Wolfgang Rosenauer # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -13,21 +13,24 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # changed with every update -%define major 62 -%define mainver %major.99 -%define orig_version 63.0 -%define orig_suffix b14 +%define major 65 +%define mainver %major.0.1 +%define orig_version 65.0.1 +%define orig_suffix %{nil} %define update_channel beta %define branding 1 -%define releasedate 20181011200118 +%define releasedate 20190211233335 %define source_prefix firefox-%{orig_version} -# PIE, full relro (x86_64 for now) +# always build with GCC as SUSE Security Team requires that +%define clang_build 0 + +# PIE, full relro %define build_hardened 1 # Firefox only supports i686 @@ -66,7 +69,7 @@ %else BuildRequires: gcc-c++ %endif -BuildRequires: cargo +BuildRequires: cargo >= 1.30 BuildRequires: libXcomposite-devel BuildRequires: libcurl-devel BuildRequires: libidl-devel @@ -75,12 +78,13 @@ BuildRequires: libproxy-devel BuildRequires: makeinfo BuildRequires: mozilla-nspr-devel >= 4.20 -BuildRequires: mozilla-nss-devel >= 3.39 +BuildRequires: mozilla-nss-devel >= 3.41 +BuildRequires: nodejs >= 8.11 BuildRequires: python-devel BuildRequires: python2-xml BuildRequires: python3 >= 3.5 -BuildRequires: rust >= 1.28 -BuildRequires: rust-std +BuildRequires: rust >= 1.30 +BuildRequires: rust-cbindgen >= 0.6.7 BuildRequires: startup-notification-devel BuildRequires: unzip BuildRequires: update-desktop-files @@ -155,9 +159,10 @@ Patch2: mozilla-kde.patch Patch3: mozilla-ntlm-full-path.patch Patch4: mozilla-openaes-decl.patch -Patch6: mozilla-reduce-files-per-UnifiedBindings.patch Patch7: mozilla-aarch64-startup-crash.patch Patch8: mozilla-bmo256180.patch +Patch9: mozilla-bmo1463035.patch +Patch10: mozilla-cubeb-noreturn.patch # Firefox/browser Patch101: firefox-kde.patch Patch102: firefox-branded-icons.patch @@ -261,11 +266,10 @@ %patch2 -p1 %patch3 -p1 %patch4 -p1 -%ifarch %ix86 -%patch6 -p1 -%endif %patch7 -p1 %patch8 -p1 +%patch9 -p1 +%patch10 -p1 # Firefox %patch101 -p1 %patch102 -p1 @@ -293,31 +297,25 @@ export MOZ_TELEMETRY_REPORTING=1 %if 0%{?suse_version} <= 1320 export CC=gcc-7 +%else +%if 0%{?clang_build} == 0 +export CC=gcc +export CXX=g++ %endif -export CFLAGS="%{optflags} -fno-strict-aliasing" -# boo#986541: add -fno-delete-null-pointer-checks for gcc6 -%if 0%{?suse_version} > 1320 -export CFLAGS="$CFLAGS -fno-delete-null-pointer-checks" -%endif -%ifarch %arm -export CFLAGS="${CFLAGS/-g / }" %endif %ifarch %arm %ix86 # 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 +export LDFLAGS="${LDFLAGS} -fPIC -Wl,-z,relro,-z,now" %endif %ifarch ppc64 ppc64le +%if 0%{?clang_build} == 0 export CFLAGS="$CFLAGS -mminimal-toc" %endif +%endif export CXXFLAGS="$CFLAGS" -%ifarch %{arm} -export RUSTFLAGS="-Cdebuginfo=0" -%endif export MOZCONFIG=$RPM_BUILD_DIR/mozconfig %limit_build -m 1500 cat << EOF > $MOZCONFIG @@ -334,24 +332,16 @@ %if 0%{?suse_version} >= 1550 ac_add_options --disable-gconf %endif -%if 0%{?build_hardened} -ac_add_options --enable-pie -%endif -# gcc7 (boo#104105) -%if 0%{?suse_version} > 1320 -ac_add_options --enable-optimize="-g -O2" +# bmo#1441155 - Disable the generation of Rust debug symbols on Linux32 +%ifarch %ix86 %arm +ac_add_options --disable-debug-symbols +%else +ac_add_options --enable-debug-symbols %endif -%ifarch %arm -%if 0%{?suse_version} > 1230 -ac_add_options --disable-optimize -%endif +%if 0%{?suse_version} > 1549 +%ifnarch aarch64 ppc64 ppc64le +ac_add_options --disable-elf-hack %endif -# bmo#1441155 - Disable the generation of Rust debug symbols on Linux32 -%ifarch %ix86 -ac_add_options --disable-debug-symbols -%endif -%ifarch %arm -ac_add_options --disable-elf-hack %endif ac_add_options --with-system-nspr ac_add_options --with-system-nss @@ -390,6 +380,12 @@ %ifarch aarch64 %arm s390x ac_add_options --disable-webrtc %endif +%ifarch x86_64 +# LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506) +%if 0%{?suse_version} > 1500 +ac_add_options --enable-lto +%endif +%endif EOF ./mach build