bsys5/lw-linux-base/assets/deb_patches/armhf-reduce-linker-memory-use.patch
Bert van der Weerd b07a2cad5b
renamed folder
2022-10-28 21:44:08 +02:00

24 lines
1 KiB
Diff

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
@@ -1631,12 +1631,15 @@ set_config("LINKER_KIND", select_linker.KIND)
target_multiarch_dir,
android_platform,
c_compiler,
+ host,
)
@imports("os")
def linker_ldflags(
- linker, target, sysroot, multiarch_dir, android_platform, c_compiler
+ linker, target, sysroot, multiarch_dir, android_platform, c_compiler, host
):
flags = list((linker and linker.LINKER_FLAG) or [])
+ if host.cpu == "arm":
+ flags.append("-Wl,--no-keep-memory")
# rpath-link is irrelevant to wasm, see for more info https://github.com/emscripten-core/emscripten/issues/11076.
if sysroot.path and multiarch_dir and target.os != "WASI":
for d in ("lib", "usr/lib"):