summaryrefslogtreecommitdiff
path: root/armhf-reduce-linker-memory-use.patch
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2021-11-16 11:49:11 -0500
committerB. Stack <bgstack15@gmail.com>2021-11-16 11:49:11 -0500
commit265ad9632ddde05291545c156d2273bd60424d99 (patch)
tree5423a396696a4928cc6c2db7484fffeb6d6399a4 /armhf-reduce-linker-memory-use.patch
parentDisable aarch64 due to build failures bugzilla.redhat.com/show_bug.cgi?id=201... (diff)
downloadlibrewolf-fedora-ff-265ad9632ddde05291545c156d2273bd60424d99.tar.gz
librewolf-fedora-ff-265ad9632ddde05291545c156d2273bd60424d99.tar.bz2
librewolf-fedora-ff-265ad9632ddde05291545c156d2273bd60424d99.zip
94.0 attempt 1
Diffstat (limited to 'armhf-reduce-linker-memory-use.patch')
-rw-r--r--armhf-reduce-linker-memory-use.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/armhf-reduce-linker-memory-use.patch b/armhf-reduce-linker-memory-use.patch
new file mode 100644
index 0000000..a9afe2d
--- /dev/null
+++ b/armhf-reduce-linker-memory-use.patch
@@ -0,0 +1,22 @@
+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
+@@ -2287,10 +2287,12 @@
+ set_config("LINKER_KIND", select_linker.KIND)
+
+
+-@depends_if(select_linker, target, target_sysroot, target_multiarch_dir, c_compiler)
++@depends_if(select_linker, target, target_sysroot, target_multiarch_dir, c_compiler, host)
+ @imports("os")
+-def linker_ldflags(linker, target, sysroot, multiarch_dir, c_compiler):
++def linker_ldflags(linker, target, sysroot, multiarch_dir, 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"):
bgstack15