diff options
author | Zach van Rijn <me@zv.io> | 2023-10-12 11:38:59 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2023-10-12 11:38:59 -0500 |
commit | c1026184b292497a9dd025c0138b26c391c37594 (patch) | |
tree | fd470619240bf0942e1ac7d8f08f900f1a08a41f | |
parent | 36bdfddebba10f293834570557e6f097ab6893e5 (diff) | |
download | packages-c1026184b292497a9dd025c0138b26c391c37594.tar.gz packages-c1026184b292497a9dd025c0138b26c391c37594.tar.bz2 packages-c1026184b292497a9dd025c0138b26c391c37594.tar.xz packages-c1026184b292497a9dd025c0138b26c391c37594.zip |
user/{firefox-esr,thunderbird}: disable debug symbols on 32-bit platforms.
Linking now fails on pmmx even with the kitchen sink:
https://wiki.debian.org/ReduceBuildMemoryOverhead
Change the conditional to include all known 32-bit platforms.
Ref: #1012
Fixes: #1057
-rw-r--r-- | user/firefox-esr/APKBUILD | 24 | ||||
-rw-r--r-- | user/thunderbird/APKBUILD | 22 |
2 files changed, 25 insertions, 21 deletions
diff --git a/user/firefox-esr/APKBUILD b/user/firefox-esr/APKBUILD index 4c9e50068..89989291a 100644 --- a/user/firefox-esr/APKBUILD +++ b/user/firefox-esr/APKBUILD @@ -65,13 +65,13 @@ ldpath="$_mozappdir" prepare() { default_prepare cp "$srcdir"/mozconfig "$builddir"/mozconfig - echo "ac_add_options --enable-optimize=\"$CFLAGS\"" >> "$builddir"/mozconfig echo "ac_add_options --host=\"$CHOST\"" >> "$builddir"/mozconfig echo "ac_add_options --target=\"$CTARGET\"" >> "$builddir"/mozconfig echo "mk_add_options MOZ_MAKE_FLAGS=\"-j$JOBS\"" >> "$builddir"/mozconfig + # arch-specific configuration case "$CARCH" in - pmmx|x86*) + pmmx|x86*|arm*) echo "ac_add_options --disable-elf-hack" >> "$builddir"/mozconfig ;; ppc) @@ -81,6 +81,17 @@ prepare() { echo "ac_add_options --disable-startupcache" >> "$builddir"/mozconfig ;; esac + + # 32-bit memory ceiling, #1012, #1057 + case "${CARCH}" in + pmmx|x86|ppc|i528|m68k|mips32*|arm*) + echo "ac_add_options --disable-debug-symbols" >> "$builddir"/mozconfig + echo "ac_add_options --enable-strip" >> "$builddir"/mozconfig + CFLAGS="${CFLAGS} -g0"; + ;; + esac + + echo "ac_add_options --enable-optimize=\"$CFLAGS\"" >> "$builddir"/mozconfig } build() { @@ -89,15 +100,6 @@ build() { export MOZILLA_OFFICIAL=1 export USE_SHORT_LIBNAME=1 export MACH_USE_SYSTEM_PYTHON=1 - # gcc 6 - export CXXFLAGS="-fno-delete-null-pointer-checks -fno-schedule-insns2" - - case "${CARCH}" in - armv7) - # 32-bit memory ceiling, #1012 - LDFLAGS="${LDFLAGS} -Wl,--strip-debug"; - ;; - esac # set rpath so linker finds the libs export LDFLAGS="$LDFLAGS -Wl,-rpath,${_mozappdir}" diff --git a/user/thunderbird/APKBUILD b/user/thunderbird/APKBUILD index ec73faadd..482d1b57c 100644 --- a/user/thunderbird/APKBUILD +++ b/user/thunderbird/APKBUILD @@ -82,11 +82,11 @@ ldpath="$_mozappdir" prepare() { default_prepare cp "$srcdir"/mozconfig "$builddir"/mozconfig - echo "ac_add_options --enable-optimize=\"$CFLAGS\"" >> "$builddir"/mozconfig echo "ac_add_options --host=\"$CHOST\"" >> "$builddir"/mozconfig echo "ac_add_options --target=\"$CTARGET\"" >> "$builddir"/mozconfig echo "mk_add_options MOZ_MAKE_FLAGS=\"-j$JOBS\"" >> "$builddir"/mozconfig + # arch-specific configuration case "$CARCH" in pmmx|x86*|arm*) echo "ac_add_options --disable-elf-hack" >> "$builddir"/mozconfig @@ -95,6 +95,17 @@ prepare() { echo "ac_add_options --disable-startupcache" >> "$builddir"/mozconfig ;; esac + + # 32-bit memory ceiling, #1012, #1057 + case "${CARCH}" in + pmmx|x86|ppc|i528|m68k|mips32*|arm*) + echo "ac_add_options --disable-debug-symbols" >> "$builddir"/mozconfig + echo "ac_add_options --enable-strip" >> "$builddir"/mozconfig + CFLAGS="${CFLAGS} -g0"; + ;; + esac + + echo "ac_add_options --enable-optimize=\"$CFLAGS\"" >> "$builddir"/mozconfig } build() { @@ -103,15 +114,6 @@ build() { export MOZILLA_OFFICIAL=1 export USE_SHORT_LIBNAME=1 export MACH_USE_SYSTEM_PYTHON=1 - # gcc 6 - export CXXFLAGS="-fno-delete-null-pointer-checks -fno-schedule-insns2" - - case "${CARCH}" in - armv7) - # 32-bit memory ceiling, #1012 - LDFLAGS="${LDFLAGS} -Wl,--strip-debug"; - ;; - esac # set rpath so linker finds the libs export LDFLAGS="$LDFLAGS -Wl,-rpath,${_mozappdir}" |