From 7a7791c99f5d23722c04dbfa222bad9de1ab7e66 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Thu, 30 Apr 2020 00:52:22 -0400 Subject: [iceweasel]: refactor build env vars --- libre/iceweasel/PKGBUILD | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'libre') diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD index c8284fb5f..49b3be530 100644 --- a/libre/iceweasel/PKGBUILD +++ b/libre/iceweasel/PKGBUILD @@ -289,20 +289,18 @@ build() { # LTO needs more open files ulimit -n 4096 + ## [ARCH-SPECIFIC BUILD ENV] ## if [[ $CARCH != armv7h ]]; then # -fno-plt with cross-LTO causes obscure LLVM errors # LLVM ERROR: Function Import: link error CFLAGS="${CFLAGS/-fno-plt/}" CXXFLAGS="${CXXFLAGS/-fno-plt/}" fi - if [[ $CARCH != i686 ]]; then # DEBUG: clang-9: error: unknown argument: '-fvar-tracking-assignments' CFLAGS="${CFLAGS/-fvar-tracking-assignments/}" CXXFLAGS="${CXXFLAGS/-fvar-tracking-assignments/}" fi - - ## [ARCH-SPECIFIC CONFIG] ## case ${CARCH} in armv7h) export MOZ_DEBUG_FLAGS=" " @@ -310,7 +308,17 @@ build() { export CXXFLAGS+=" -g0" export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" export RUSTFLAGS="-Cdebuginfo=0" + ;; + i686) + # disable LTO (clang has issues on IA32) + export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off" + export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" + ;; + esac + ## [ARCH-SPECIFIC BUILD CONFIG] ## + case ${CARCH} in + armv7h) # skipping PGO "instrumented browser"; so we have the final .mozconfig now cp ../mozconfig .mozconfig ;; @@ -320,10 +328,6 @@ build() { # libmozsandbox.so: cannot open shared object file: No such file or directory # Couldn't load XPCOM." - # disable LTO and use gcc toolchain (clang has issues on IA32) - export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off" - export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" - # avoid excessive debug symbols in rust leading to out-of-memory situations sed -i "s/debug_info = '\''2'\''/debug_info = '\''0'\''/" build/moz.configure/toolchain.configure @@ -365,12 +369,12 @@ ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog END ;; - *) echo "no [ARCH-SPECIFIC CONFIG] for arch: ${CARCH}" ; return 1 ; + *) echo "no [ARCH-SPECIFIC BUILD CONFIG] for arch: ${CARCH}" ; return 1 ; ;; esac # sanity checks - # each of the [ARCH-SPECIFIC CONFIG] branches above should have created .mozconfig + # each of the [ARCH-SPECIFIC BUILD CONFIG] branches above should have created .mozconfig [[ ! -f .mozconfig ]] && echo ".mozconfig file not found in source root" && return 1 echo "Building optimized browser..." -- cgit v1.2.3