diff --git a/testing/firefox/build b/testing/firefox/build index abd96dfc..772894c3 100755 --- a/testing/firefox/build +++ b/testing/firefox/build @@ -18,13 +18,18 @@ export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox" export CC=${CC:-gcc} export CXX=${CXX:-g++} +# Keep memory usage as low as possible. +export LDFLAGS="$LDFLAGS -Wl,--as-needed -Wl,--no-keep-memory -Wl,--stats" +export MOZ_LINK_FLAGS=$LDFLAGS +export MOZ_DEBUG_FLAGS=-g0 +export RUSTFLAGS=-Cdebuginfo=0 + for patch in *.patch; do patch -p1 < "$patch" done -# Fix OOM errors. -cores=$(nproc) -printf '%s\n' "mk_add_options MOZ_MAKE_FLAGS=\"-j$cores -l$cores\"" >> mozconfig +printf 'mk_add_options MOZ_MAKE_FLAGS="%s"\n' \ + "${MAKEFLAGS:--j1 -l1}" >> mozconfig ./mach build DESTDIR="$1" ./mach install diff --git a/testing/firefox/checksums b/testing/firefox/checksums index 3fc2b9df..340d479f 100644 --- a/testing/firefox/checksums +++ b/testing/firefox/checksums @@ -7,4 +7,5 @@ b5e70b12cc9dd18fffd7924a7d3a2e11574136fe0764359d08eba0755f1c5d4c mozconfig b19aaae7fc45db643f8d2540d96919c745ea341e36d9aea2df40e3e90eb951f0 fix-toolkit.patch e24f71a6a0d8d4637b2081780c66b01be4eeb4dd496031270d0ae0b898be94d2 fix-tools.patch 5e0fcfde375837074baad21a8ab26aa442a7940617ebd074a6b238a48f2ceb63 fix-webrtc-glibcisms.patch +800965f5071d6f84ca99382f1ffd41b0683e3e9e704acbd415923a8b2d209761 fix-bug-1261392.patch 1d4a8f110d34da478f5597727eda9acacebd443dd86cce5bb64f898c01feabce mallinfo.patch diff --git a/testing/firefox/patches/fix-bug-1261392.patch b/testing/firefox/patches/fix-bug-1261392.patch new file mode 100644 index 00000000..fa40914d --- /dev/null +++ b/testing/firefox/patches/fix-bug-1261392.patch @@ -0,0 +1,25 @@ +--- a/tools/profiler/core/platform.h 2017-05-27 11:44:06.733119794 +0000 ++++ b/tools/profiler/core/platform.h 2017-05-27 11:46:16.004253520 +0000 +@@ -54,10 +54,11 @@ + #include + #include "StackTop.h" + +-// We need a definition of gettid(), but old glibc versions don't provide a +-// wrapper for it. +-#if defined(__GLIBC__) ++// We need a definition of gettid(), but Linux libc implementations don't ++// provide a wrapper for it (except for Bionic) ++#if defined(__linux__) + # include ++#if !defined(__BIONIC__) + # include + # define gettid() static_cast(syscall(SYS_gettid)) ++#endif +@@ -71,6 +72,7 @@ + return (pid_t) syscall(SYS_thread_selfid); + } + #endif ++#endif + + #ifdef XP_WIN + #include diff --git a/testing/firefox/sources b/testing/firefox/sources index 97b3fcd7..d6fbce80 100644 --- a/testing/firefox/sources +++ b/testing/firefox/sources @@ -7,4 +7,5 @@ patches/fix-seccomp-bpf.patch patches/fix-toolkit.patch patches/fix-tools.patch patches/fix-webrtc-glibcisms.patch +patches/fix-bug-1261392.patch patches/mallinfo.patch