foxgirl-linux/deb_patches/armhf-reduce-linker-memory-use.patch

28 lines
1,002 B
Diff
Raw Normal View History

Description: starting with firefox 66, armhf builds on Launchpad frequently
fail with "/usr/bin/ld: final link failed: memory exhausted" when linking
libxul.so. This is an attempt to reduce the memory used by ld.
Author: Olivier Tilloy <olivier.tilloy@canonical.com>
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -2056,15 +2056,16 @@ def select_linker(linker, c_compiler, de
2020-12-20 20:49:13 +01:00
set_config("LINKER_KIND", select_linker.KIND)
-@depends_if(select_linker, macos_sdk)
-def linker_ldflags(linker, macos_sdk):
+@depends_if(select_linker, macos_sdk, host)
+def linker_ldflags(linker, macos_sdk, host):
2020-08-27 10:03:03 +02:00
flags = list((linker and linker.LINKER_FLAG) or [])
if macos_sdk:
2020-12-20 20:49:13 +01:00
if linker and linker.KIND == "ld64":
flags.append("-Wl,-syslibroot,%s" % macos_sdk)
else:
2020-12-20 20:49:13 +01:00
flags.append("-Wl,--sysroot=%s" % macos_sdk)
-
2020-12-20 20:49:13 +01:00
+ elif host.cpu == "arm":
+ flags.append("-Wl,--no-keep-memory")
return flags