diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2024-01-11 18:25:02 -0500 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2024-01-19 23:08:36 -0500 |
commit | a4f99c0c578d8759435ca4f823a94fc8d4699363 (patch) | |
tree | 1cc26f499f39fea50ca74455d892ed490745f0b8 /libre/iceweasel/PKGBUILD | |
parent | db65c0e0cf191aa91913f0d891863de0f1d0bb85 (diff) |
iceweasel: tweak for armv7h
Diffstat (limited to 'libre/iceweasel/PKGBUILD')
-rw-r--r-- | libre/iceweasel/PKGBUILD | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD index 6888b6238..ea1782bf2 100644 --- a/libre/iceweasel/PKGBUILD +++ b/libre/iceweasel/PKGBUILD @@ -238,7 +238,7 @@ readonly _SKIP_PGO=$(case "${CARCH}" in armv7h|i686) echo 1 ;; *) echo 0 ;; esac # use GCC vs LLVM # trying one or the other, may resolve sporadic compiler/linker discrepancies -readonly _USE_ALT_COMPILER=$(case "${CARCH}" in armv7h) echo 1 ;; *) echo 0 ;; esac) +readonly _USE_ALT_COMPILER=$(case "${CARCH}" in armv7h) echo 0 ;; *) echo 0 ;; esac) # use 'bfd' linker vs 'lld' # most significantly, this also disables LTO and debugging @@ -258,10 +258,6 @@ armv7h) makedepends=( ${makedepends[*]/wasi-*/} ) # armv7h has no wasi compiler depends+=( libicudata.so libicui18n.so libicuuc.so ) # --with-system-icu - - # warning: obj/dist/system_wrappers/cmath:3:15: fatal error: 'cmath' file not found - (( _USE_ALT_COMPILER )) || makedepends=( ${makedepends[*]/llvm/llvm15} llvm15-libs ) - # still FTBS ;; i686) # NOTE: due to python incompatabilities in arch32, @@ -361,9 +357,19 @@ prepare() { echo "deleting vendored 'python-typing-extensions'" rm -rfv third_party/python/typing_extensions | grep -Fq '' - # arch-specific technical patching + + ## [ARCH-SPECIFIC PATCHING] ## + case ${CARCH} in aarch64|armv7h) + # FTBS with LLVM: + # intl/lwbrk/LineBreaker.cpp:453:3: error: static assertion failed due to requirement 'U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass)': Gecko vs ICU LineBreak class mismatch + # appears to be: https://bugzilla.mozilla.org/show_bug.cgi?id=1843007#c1 + # but --with-system-icu is still needed + # crude fix, adapted from linuxfromscratch https://wiki.linuxfromscratch.org/blfs/ticket/18799 + for i in {43..47}; do + sed '/ZWJ/s/}/,CLASS_CHARACTER&/' -i intl/lwbrk/LineBreaker.cpp + done ;; i686) # readelf: Error: Unable to seek to 0x801db328 for section headers @@ -521,7 +527,7 @@ END # archarm `export` commands are under the '[ARCH-SPECIFIC BUILD ENV]' section - # archarm patching is under the 'technical patching' section + # archarm patching is under the '[ARCH-SPECIFIC PATCHING]' section # At this point in the recipe, the arch, arch32, and parabola PKGBUILDs # have prepared a temporary ${srcdir}/mozconfig; but the archarm PKGBUILD @@ -545,7 +551,7 @@ END ac_add_options --disable-webrtc END - # arch32 patching is under the 'technical patching' section + # arch32 patching is under the '[ARCH-SPECIFIC PATCHING]' section ;; x86_64) ;; @@ -727,6 +733,17 @@ build() { export CXXFLAGS+=" -g0" export LDFLAGS+=" -Wl,--no-keep-memory" export RUSTFLAGS="-Cdebuginfo=0" + + # clang-16: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument] + export CFLAGS+=' -Wno-unused-command-line-argument' + export CXXFLAGS+=' -Wno-unused-command-line-argument' + + # FTBS with LLVM: + # warning: obj/dist/system_wrappers/cmath:3:15: fatal error: 'cmath' file not found + if ! (( _USE_ALT_COMPILER )) + then export CFLAGS+=" -I/usr/include/c++/12.1.0 -I/usr/include/c++/12.1.0/armv7l-unknown-linux-gnueabihf" + export CXXFLAGS+=" -I/usr/include/c++/12.1.0 -I/usr/include/c++/12.1.0/armv7l-unknown-linux-gnueabihf" + fi ;; i686) # -fno-plt with cross-LTO -> LLVM ERROR: Function Import: link error |