diff options
Diffstat (limited to 'deb_patches')
-rw-r--r-- | deb_patches/armhf-reduce-linker-memory-use.patch | 27 | ||||
-rw-r--r-- | deb_patches/build-with-libstdc++-7.patch | 39 | ||||
-rw-r--r-- | deb_patches/fix-armhf-webrtc-build.patch | 4 |
3 files changed, 47 insertions, 23 deletions
diff --git a/deb_patches/armhf-reduce-linker-memory-use.patch b/deb_patches/armhf-reduce-linker-memory-use.patch new file mode 100644 index 0000000..3f20011 --- /dev/null +++ b/deb_patches/armhf-reduce-linker-memory-use.patch @@ -0,0 +1,27 @@ +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 + 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): + flags = list(linker.LINKER_FLAG or []) + if macos_sdk: + if linker.KIND == 'ld64': + flags.append('-Wl,-syslibroot,%s' % macos_sdk) + else: + flags.append('-Wl,--sysroot=%s' % macos_sdk) +- ++ elif host.cpu == 'arm': ++ flags.append('-Wl,--no-keep-memory') + return flags + + diff --git a/deb_patches/build-with-libstdc++-7.patch b/deb_patches/build-with-libstdc++-7.patch index 55d0036..82cf9cc 100644 --- a/deb_patches/build-with-libstdc++-7.patch +++ b/deb_patches/build-with-libstdc++-7.patch @@ -1,5 +1,7 @@ -diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure -index ce42ab7..b07514f 100755 +Description: point clang to the toolchain provided by the gcc-mozilla package (version 7 required for C++ 17), and statically link against libstdc++ +Author: Olivier Tilloy <olivier.tilloy@canonical.com> +Bug-Ubuntu: https://launchpad.net/bugs/1856861 + --- a/build/moz.configure/toolchain.configure +++ b/build/moz.configure/toolchain.configure @@ -1252,6 +1252,7 @@ try_compile(includes=['cstddef'], @@ -10,7 +12,7 @@ index ce42ab7..b07514f 100755 check_msg='for new enough STL headers from libstdc++', when=needs_libstdcxx_newness_check, onerror=die_on_old_libstdcxx) -@@ -1433,6 +1434,10 @@ set_config('_DEPEND_CFLAGS', depend_cflags(c_compiler)) +@@ -1433,6 +1434,10 @@ set_config('_DEPEND_CFLAGS', depend_cfla set_config('_HOST_DEPEND_CFLAGS', depend_cflags(host_c_compiler)) @@ -21,29 +23,14 @@ index ce42ab7..b07514f 100755 @depends(c_compiler) def preprocess_option(compiler): # The uses of PREPROCESS_OPTION depend on the spacing for -o/-Fi. -@@ -2133,7 +2138,7 @@ def linker_ldflags(linker, macos_sdk): - flags.append('-Wl,-syslibroot,%s' % macos_sdk) - else: +@@ -2137,6 +2142,7 @@ def linker_ldflags(linker, macos_sdk, ho flags.append('-Wl,--sysroot=%s' % macos_sdk) -- + elif host.cpu == 'arm': + flags.append('-Wl,--no-keep-memory') + flags.append('-static-libstdc++') return flags -diff --git a/layout/style/test/moz.build b/layout/style/test/moz.build -index 5b77bd8..3b8f869 100644 ---- a/layout/style/test/moz.build -+++ b/layout/style/test/moz.build -@@ -18,6 +18,7 @@ DIRS += ['gtest'] - HostSimplePrograms([ - 'host_ListCSSProperties', - ]) -+HOST_CXXFLAGS += ['--gcc-toolchain=/usr/lib/gcc-mozilla'] - - MOCHITEST_MANIFESTS += [ - 'mochitest.ini', -diff --git a/servo/components/style/build_gecko.rs b/servo/components/style/build_gecko.rs -index dfd2a21..5696e2a 100644 --- a/servo/components/style/build_gecko.rs +++ b/servo/components/style/build_gecko.rs @@ -149,6 +149,8 @@ impl BuilderExt for Builder { @@ -55,3 +42,13 @@ index dfd2a21..5696e2a 100644 for dir in SEARCH_PATHS.iter() { builder = builder.clang_arg("-I").clang_arg(dir.to_str().unwrap()); } +--- a/layout/style/test/moz.build ++++ b/layout/style/test/moz.build +@@ -18,6 +18,7 @@ DIRS += ['gtest'] + HostSimplePrograms([ + 'host_ListCSSProperties', + ]) ++HOST_CXXFLAGS += ['--gcc-toolchain=/usr/lib/gcc-mozilla'] + + MOCHITEST_MANIFESTS += [ + 'mochitest.ini', diff --git a/deb_patches/fix-armhf-webrtc-build.patch b/deb_patches/fix-armhf-webrtc-build.patch index 44e88a6..7f56b3e 100644 --- a/deb_patches/fix-armhf-webrtc-build.patch +++ b/deb_patches/fix-armhf-webrtc-build.patch @@ -37,9 +37,9 @@ diff -r 53fd96ca5aa4 media/webrtc/trunk/webrtc/system_wrappers/cpu_features_linu - "/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c" -] - - if not CONFIG["MOZ_DEBUG"]: + if CONFIG["MOZ_DEBUG"] == "1": - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" + DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" @@ -53,20 +49,36 @@ DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True |