From 3acf4981dfd4e5460acc8e82d79cccb8a33aa270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Fri, 2 Apr 2021 15:17:30 -0300 Subject: [PATCH] firefox: disable debug packages when built on 32-bit hosts. cc1plus runs out of memory otherwise: cargo:warning=cc1plus: out of memory allocating 65536 bytes after a total of 1010126848 bytes --- srcpkgs/firefox/template | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/srcpkgs/firefox/template b/srcpkgs/firefox/template index 0fd5d573c48..013422c663b 100644 --- a/srcpkgs/firefox/template +++ b/srcpkgs/firefox/template @@ -40,6 +40,12 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then makedepends+=" libatomic-devel" fi +# work around large debug symbols on 32-bit hosts +# cargo:warning=cc1plus: out of memory allocating 65536 bytes after a total of 1010126848 bytes +if [ "$XBPS_WORDSIZE" = "32" ]; then + nodebug=yes +fi + # we need this because cargo verifies checksums of all files in vendor # crates when it builds and gives us no way to override or update the # file sanely... so just clear out the file list @@ -129,8 +135,6 @@ do_build() { # work around large debug symbols on 32-bit hosts if [ "$XBPS_WORDSIZE" = "32" ]; then - export CFLAGS="${CFLAGS/-g/-g1}" - export CXXFLAGS="${CXXFLAGS/-g/-g1}" export LDFLAGS+=" -Wl,--no-keep-memory" # patch the rust debug level, this is hardcoded vsed -i 's/debug_info = "2"/debug_info = "0"/' \