~mozillateam/firefox/firefox-beta.xenial

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
@@ -1699,6 +1699,7 @@
             android_platform,
             c_compiler,
             developer_options,
+            host,
         )
     else:
         deps = depends_if(
@@ -1709,6 +1710,7 @@
             dependable(None),
             host_c_compiler,
             developer_options,
+            host,
         )
 
     @deps
@@ -1721,8 +1723,11 @@
         android_platform,
         c_compiler,
         developer_options,
+        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"):