From d64843d8357cf752d7bf8e778ebfe86a3991cadc Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 26 Sep 2014 07:33:52 +0200 Subject: [PATCH] chromium: try to fix ld(1) memory exhaustion on x86. --- srcpkgs/chromium/template | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index b34ad0dbef..9dc48aaeb6 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -51,8 +51,13 @@ pre_configure() { do_configure() { local conf="" + if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then + # Use linker flags to reduce memory consumption + LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" + fi + unset CC CXX - export -n CFLAGS CXXFLAGS + export -n CFLAGS CXXFLAGS LDFLAGS # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) # Note: These are for Void Linux use ONLY. @@ -152,7 +157,11 @@ do_configure() { do_build() { unset CC CXX - export -n CFLAGS CXXFLAGS + if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then + # Use linker flags to reduce memory consumption + LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" + fi + export -n CFLAGS CXXFLAGS LDFLAGS ninja -C out/Release ${makejobs} chrome chrome_sandbox chromedriver }