diff options
author | B Stack <bgstack15@gmail.com> | 2018-12-13 10:15:53 -0500 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2018-12-13 10:15:53 -0500 |
commit | 7b13ff701067e683a5cf846781638a01284fdc12 (patch) | |
tree | eb372a96fd5e43ba4457891b6d22a269deda1b41 | |
parent | Merge branch 'palemoon-bump' into 'master' (diff) | |
download | stackrpms-7b13ff701067e683a5cf846781638a01284fdc12.tar.gz stackrpms-7b13ff701067e683a5cf846781638a01284fdc12.tar.bz2 stackrpms-7b13ff701067e683a5cf846781638a01284fdc12.zip |
waterfox 56.2.5
like normal, import from chinforpms
-rw-r--r-- | waterfox/mozilla-1336978.patch | 99 | ||||
-rw-r--r-- | waterfox/waterfox-mozconfig | 3 | ||||
-rw-r--r-- | waterfox/waterfox.spec | 158 |
3 files changed, 193 insertions, 67 deletions
diff --git a/waterfox/mozilla-1336978.patch b/waterfox/mozilla-1336978.patch new file mode 100644 index 0000000..136eb83 --- /dev/null +++ b/waterfox/mozilla-1336978.patch @@ -0,0 +1,99 @@ + +# HG changeset patch +# User Sylvestre Ledru <sledru@mozilla.com> +# Date 1501074847 -7200 +# Node ID 342812d23eb995a19b391f7bcd48d03db092709a +# Parent 2980183d98fb2513d41209c5a9e08bfc519b68fa +Bug 1336978 - Add support of lld by adding a configure option --enable-linker='bfd', 'gold', 'lld', 'other' r=glandium + +MozReview-Commit-ID: 7LI2lMXO2lG + +diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure +--- a/build/moz.configure/toolchain.configure ++++ b/build/moz.configure/toolchain.configure +@@ -1136,23 +1136,23 @@ def build_not_win_mac(target): + return True + + + option('--enable-gold', + env='MOZ_FORCE_GOLD', + help='Enable GNU Gold Linker when it is not already the default', + when=build_not_win_mac) + ++imply_option('--enable-linker', ++ depends_if('--enable-gold', when=build_not_win_mac)(lambda x: 'gold'), ++ when=build_not_win_mac) + +-@depends('--enable-gold', c_compiler, developer_options, check_build_environment, when=build_not_win_mac) +-@checking('for ld', lambda x: x.KIND) + @imports('os') + @imports('shutil') +-def enable_gold(enable_gold_option, c_compiler, developer_options, build_env): +- linker = None ++def enable_gnu_linker(enable_gold_option, c_compiler, developer_options, build_env, linker_name): + # Used to check the kind of linker + version_check = ['-Wl,--version'] + cmd_base = c_compiler.wrapper + [c_compiler.compiler] + c_compiler.flags + + def resolve_gold(): + # Try to force the usage of gold + targetDir = os.path.join(build_env.topobjdir, 'build', 'unix', 'gold') + +@@ -1177,17 +1177,17 @@ def enable_gold(enable_gold_option, c_co + return namespace( + KIND='gold', + LINKER_FLAG=linker, + ) + else: + # The -B trick didn't work, removing the directory + shutil.rmtree(targetDir) + +- if enable_gold_option or developer_options: ++ if (enable_gold_option or developer_options) and linker_name != 'bfd': + result = resolve_gold() + + if result: + return result + # gold is only required if --enable-gold is used. + elif enable_gold_option: + die('Could not find gold') + # Else fallthrough. +@@ -1208,10 +1208,35 @@ def enable_gold(enable_gold_option, c_co + KIND='gold' + ) + + # For other platforms without gold or the GNU linker + return namespace( + KIND='other' + ) + +-set_config('LD_IS_BFD', depends(enable_gold.KIND)(lambda x: x == 'bfd' or None)) +-set_config('LINKER_LDFLAGS', enable_gold.LINKER_FLAG) ++js_option('--enable-linker', nargs=1, ++ choices=('bfd', 'gold', 'lld', 'other'), ++ help='Select the linker', ++ when=build_not_win_mac) ++ ++@depends('--enable-linker', c_compiler, developer_options, check_build_environment, when=build_not_win_mac) ++@checking('for linker', lambda x: x.KIND) ++def select_linker(linker, c_compiler, developer_options, build_env): ++ linker = linker[0] if linker else 'other' ++ if linker in ('gold', 'bfd', 'other'): ++ return enable_gnu_linker(linker == 'gold', c_compiler, developer_options, build_env, linker) ++ if linker == 'lld': ++ version_check = ['-Wl,--version'] ++ cmd_base = c_compiler.wrapper + [c_compiler.compiler] + c_compiler.flags ++ lld = "-fuse-ld=" + linker ++ cmd = cmd_base + [lld] + version_check ++ if 'LLD' in check_cmd_output(*cmd).decode('utf-8'): ++ return namespace( ++ KIND='lld', ++ LINKER_FLAG=lld, ++ ) ++ else: ++ die("Could not use lld as linker") ++ ++ ++set_config('LD_IS_BFD', depends(select_linker.KIND)(lambda x: x == 'bfd' or None)) ++set_config('LINKER_LDFLAGS', select_linker.LINKER_FLAG) + diff --git a/waterfox/waterfox-mozconfig b/waterfox/waterfox-mozconfig index bd17381..57b40bb 100644 --- a/waterfox/waterfox-mozconfig +++ b/waterfox/waterfox-mozconfig @@ -16,10 +16,8 @@ ac_add_options --disable-updater ac_add_options --enable-url-classifier ac_add_options --enable-chrome-format=omni ac_add_options --enable-pulseaudio -ac_add_options --with-system-icu ac_add_options --enable-release ac_add_options --enable-pie -ac_add_options --enable-gold ac_add_options --disable-gconf # Workaround for mozbz#1341234 ac_add_options BINDGEN_CFLAGS="$(pkg-config nspr pixman-1 --cflags)" @@ -37,7 +35,6 @@ ac_add_options --disable-profiling ac_add_options --disable-signmar ac_add_options --disable-verify-mar -#ac_add_options --enable-rust-simd # on x86 requires SSE2, breaks with system llvm ac_add_options --enable-stylo=build ac_add_options --with-app-name=waterfox diff --git a/waterfox/waterfox.spec b/waterfox/waterfox.spec index 43687e7..5882681 100644 --- a/waterfox/waterfox.spec +++ b/waterfox/waterfox.spec @@ -1,6 +1,6 @@ -%global commit 475fed0269120a3673ac55d8384022dc7f44eacf +%global commit 3e2c786a657a0b2e6e7a82c155a8ff6030888c4a %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global date 20181030 +%global date 20181211 %global with_snapshot 1 %global freebsd_rev 480450 @@ -10,68 +10,59 @@ %global gver .%{date}git%{shortcommit} %endif -# Build with clang only? -%global with_clang 0 -# Use ALSA backend? %global alsa_backend 1 - -# Use system nspr/nss? %global system_nss 1 - -# Use system hunspell? %global system_hunspell 1 - -# Use system libevent? %global system_libevent 1 - -# Use system sqlite? %global system_sqlite 1 - %global system_ffi 1 - -# Use system cairo? %global system_cairo 0 - -# Use system graphite2/harfbuzz? %global system_harfbuzz 1 - -# Use system libvpx? %global system_libvpx 1 - -# Use system webp? %global system_webp 1 - -# Use system libvpx? %global system_vorbis 1 - -# Use system libicu? %global system_libicu 0 +%global system_jpeg 1 + +%global run_tests 0 + +%global hardened_build 1 + +%global build_with_clang 0 +%if 0%{?fedora} >= 29 +%ifarch x86_64 aarch64 +%global build_with_clang 1 +%endif +%endif +%global build_with_pgo 0 # Big endian platforms %ifarch ppc64 s390x -# Javascript Intl API is not supported on big endian platforms right now: -# https://bugzilla.mozilla.org/show_bug.cgi?id=1322212 %global big_endian 1 %endif -# Hardened build? -%global hardened_build 1 - -%global system_jpeg 1 +%if 0%{?build_with_pgo} +%global use_xvfb 1 +%global build_tests 1 +%endif -%ifarch %{ix86} x86_64 -%global run_tests 0 -%else -%global run_tests 0 +%if !0%{?run_tests} +%global use_xvfb 1 +%global build_tests 1 %endif -# Build as a debug package? +%bcond_without debug_build +%if %{with debug_build} +%else +%global debug_build 1 +%else %global debug_build 0 +%endif -%global disable_elfhack 0 -%if 0%{?fedora} > 28 -%global disable_elfhack 1 +%global disable_elfhack 0 +%if !0%{?build_with_clang} || 0%{?fedora} > 28 +%global disable_elfhack 1 %endif %global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html @@ -184,13 +175,12 @@ Patch414: mozilla-1435695.patch Patch415: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch Patch416: bug1375074-save-restore-x28.patch Patch417: mozilla-1436242.patch +Patch418: https://hg.mozilla.org/integration/autoland/raw-rev/342812d23eb9#/mozilla-1336978.patch # Upstream updates %global wf_url https://github.com/MrAlex94/Waterfox #Patch???: %%{wf_url}/commit/commit.patch#/wf-commit.patch -# Revert this until figure out -Patch490: %{wf_url}/commit/a89c49043079c720ea09ea3c7c523a5ef5db00e5.patch#/wf-a89c49043079c720ea09ea3c7c523a5ef5db00e5.patch # Debian patches Patch500: mozilla-440908.patch @@ -261,7 +251,10 @@ BuildRequires: llvm BuildRequires: llvm-devel BuildRequires: clang BuildRequires: clang-libs -%if !0%{?with_clang} +%if 0%{?build_with_clang} +#BuildRequires: lld +BuildRequires: libstdc++-static +%else BuildRequires: gcc-c++ %endif BuildRequires: patchutils @@ -274,6 +267,7 @@ Requires: nspr >= %{nspr_build_version} Requires: nss >= %{nss_build_version} %endif BuildRequires: python2-devel +Requires: u2f-hidraw-policy BuildRequires: nss-devel >= 3.29.1-2.1 Requires: nss >= 3.29.1-2.1 @@ -289,7 +283,7 @@ Requires: sqlite >= %{sqlite_build_version} BuildRequires: pkgconfig(libffi) %endif -%if %{?run_tests} +%if 0%{?use_xvfb} BuildRequires: xorg-x11-server-Xvfb %endif BuildRequires: rust @@ -304,7 +298,7 @@ Waterfox is an open-source web browser, specialised modification of the Mozilla platform, designed for privacy and user choice in mind. %if %{run_tests} -%global testsuite_pkg_name mozilla-%{name}-testresults +%global testsuite_pkg_name %{name}-testresults %package -n %{testsuite_pkg_name} Summary: Results of testsuite %description -n %{testsuite_pkg_name} @@ -374,8 +368,7 @@ This package contains results of tests executed during build. %endif %patch416 -p1 -b .bug1375074-save-restore-x28 %patch417 -p1 -b .mozilla-1436242 - -%patch490 -p1 -R -b .1420171 +%patch418 -p1 -b .mozilla-1336978 # Debian extension patch %patch500 -p1 -b .440908 @@ -400,7 +393,7 @@ done # 2: no apply # 3: uncertain for i in \ - 702179 991253 1021761 1144632 1288587 1452576 \ + 702179 991253 1021761 1144632 1288587 1395486 1452576 \ 1388744 1413143 \ 1447519 do @@ -431,9 +424,22 @@ done rm -f .mozconfig cp %{SOURCE10} .mozconfig -%if 0%{?with_clang} +%if 0%{?build_with_clang} +echo 'export LLVM_PROFDATA="llvm-profdata"' >> .mozconfig echo 'export CC=clang' >> .mozconfig echo 'export CXX=clang++' >> .mozconfig +echo 'export AR="llvm-ar"' >> .mozconfig +echo 'export NM="llvm-nm"' >> .mozconfig +echo 'export RANLIB="llvm-ranlib"' >> .mozconfig +echo "ac_add_options --enable-linker=gold" >> .mozconfig +echo "ac_add_options --enable-rust-simd" >> .mozconfig +%else +echo 'export CC=gcc' >> .mozconfig +echo 'export CXX=g++' >> .mozconfig +echo "ac_add_options --enable-linker=gold" >> .mozconfig +%endif +%if 0%{?build_with_pgo} +echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif %if %{?system_nss} @@ -497,10 +503,6 @@ echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig %else %global optimize_flags "none" -# Fedora 26 (gcc7) needs to disable default build flags (mozbz#1342344) -%ifnarch s390 s390x -%global optimize_flags "-g -O2" -%endif %ifarch armv7hl # ARMv7 need that (rhbz#1426850) %global optimize_flags "-g -O2 -fno-schedule-insns" @@ -564,6 +566,9 @@ echo "ac_add_options --without-system-icu" >> .mozconfig echo "ac_add_options --disable-ion" >> .mozconfig %endif +# Remove executable bit to make brp-mangle-shebangs happy. +chmod -x third_party/rust/itertools/src/lib.rs + #--------------------------------------------------------------------- @@ -589,13 +594,6 @@ echo "Generate big endian version of config/external/icu/data/icud58l.dat" # Update the various config.guess to upstream release for aarch64 support find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' -# -fpermissive is needed to build with gcc 4.6+ which has become stricter -# -# Mozilla builds with -Wall with exception of a few warnings which show up -# everywhere in the code; so, don't override that. -# -# Disable C++ exceptions since Mozilla code is not exception-safe -# MOZ_OPT_FLAGS=$(echo "%{optflags}" | %{__sed} -e 's/-Wall//') #rhbz#1037063 # -Werror=format-security causes build failures when -Wno-format is explicitly given @@ -603,9 +601,6 @@ MOZ_OPT_FLAGS=$(echo "%{optflags}" | %{__sed} -e 's/-Wall//') # Explicitly force the hardening flags for Waterfox so it passes the checksec test; # See also https://fedoraproject.org/wiki/Changes/Harden_All_Packages MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" -# Disable null pointer gcc6 optimization in gcc6 (rhbz#1328045) -MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fno-delete-null-pointer-checks" -# Use hardened build? %if %{?hardened_build} MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now" %endif @@ -619,9 +614,19 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') # (OOM when linking, rhbz#1238225) export MOZ_DEBUG_FLAGS=" " %endif +%ifarch %{arm} +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g0/') +export MOZ_DEBUG_FLAGS=" " +%endif +%if !0%{?build_with_clang} %ifarch s390 %{arm} ppc aarch64 MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif +%endif + +%ifarch %{arm} %{ix86} +export RUSTFLAGS="-Cdebuginfo=0" +%endif export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS export LDFLAGS=$MOZ_LINK_FLAGS @@ -629,6 +634,16 @@ export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' export LIBDIR='%{_libdir}' +%if 0%{?build_with_clang} +export CC=clang +export CXX=clang++ +export AR="llvm-ar" +export NM="llvm-nm" +%else +export CC=gcc +export CXX=g++ +%endif + MOZ_SMP_FLAGS=-j1 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. @@ -640,7 +655,14 @@ MOZ_SMP_FLAGS=-j1 [ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 %endif -make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" +export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" +export MOZ_SERVICES_SYNC="1" +export STRIP=/bin/true +%if 0%{?build_with_pgo} +xvfb-run ./mach build +%else +./mach build +%endif %if %{?run_tests} %if %{?system_nss} @@ -909,6 +931,14 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Dec 13 2018 B Stack <bgstack15@gmail.com> 56.2.5.-3.20181211git3e2c786 +- repackage for stackrpms + +* Wed Dec 12 2018 Phantom X <megaphantomx at bol dot com dot br> - 56.2.5-2.20181211git3e2c786 +- New snapshot +- Updated spec, more like Fedora Firefox one +- clang build + * Tue Oct 30 2018 Phantom X <megaphantomx at bol dot com dot br> - 56.2.5-1.20181030git475fed0 - New release/snapshot |