3 Revīzijas f3232010f3 ... 174733e289

Autors SHA1 Ziņojums Datums
  Jeremy Rand 174733e289 Bug 32355: firefox / linux-arm: fix for Bug 23656 2 gadi atpakaļ
  Jeremy Rand e278f6b6ef Bug 32355: mmdebstrap-image: Re-add buster 2 gadi atpakaļ
  Jeremy Rand f3232010f3 Bug 32355: mmdebstrap-image: Re-add buster 2 gadi atpakaļ
2 mainītis faili ar 75 papildinājumiem un 89 dzēšanām
  1. 75 9
      projects/firefox/mozconfig
  2. 0 80
      projects/firefox/mozconfig-linux-arm

+ 75 - 9
projects/firefox/mozconfig

@@ -1,15 +1,56 @@
 . $topsrcdir/mozconfig-[% IF c("var/osx"); GET 'macos-x86_64'; ELSE; GET c("var/osname"); END; %][% IF c("var/asan") %]-asan[% END %]
 
 [% IF c("var/linux") -%]
-  # We want to build with clang now and point to the GCC toolchain until #29041 is
-  # fixed. We explicitly need to define the host compiler as well as for some
-  # reason the gcc-toolchain argument does not get passed along otherwise.
-  CC="clang --gcc-toolchain=/var/tmp/dist/gcc"
-  CXX="clang++ --gcc-toolchain=/var/tmp/dist/gcc"
-  HOST_CC=$CC
-  HOST_CXX=$CXX
-
-  export BINDGEN_CFLAGS='--gcc-toolchain=/var/tmp/dist/gcc'
+  [% IF c("var/linux-cross") %]
+    CROSS_COMPILE=1
+
+    CC="clang -B /var/tmp/dist/binutils/bin"
+    CXX="clang++ -B /var/tmp/dist/binutils/bin"
+    HOST_CC="clang"
+    HOST_CXX="clang++"
+
+    export LDFLAGS="-Wl,-rpath-link=/lib/[% c('var/crosstarget') %] -Wl,-rpath-link=/usr/lib/[% c('var/crosstarget') %]"
+
+    ac_add_options --target=[% c('var/crosstarget') %]
+    ac_add_options --with-toolchain-prefix=[% c('var/crosstarget') %]-
+    mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-[% c("arch") %]
+
+    # From Mozilla MDN "Compiling 32-bit Firefox on a Linux 64-bit OS" docs
+    # Fixes "error: Can't find header fontconfig/fcfreetype.h"
+    mk_add_options MOZ_TREE_FREETYPE=1
+
+    # Bug 31448: ld.gold fails if we don't disable debug-symbols
+    ac_add_options --disable-debug-symbols
+
+    [% IF c("var/linux-arm") %]
+      # Architecture flags from Debian armhf compiler
+      ac_add_options --with-arch=armv7-a
+      # TODO: Consider enabling NEON here?
+      # Debian does not, but Arch Linux ARM does.
+      ac_add_options --with-fpu=vfpv3-d16
+      ac_add_options --with-float-abi=hard
+      ac_add_options --with-thumb=yes
+
+      # From Arch Linux ARM for ESR91
+      # https://github.com/archlinuxarm/PKGBUILDs/blob/2242af725c21a82a8e9ecc1d38f1b94cd6ea01ef/extra/firefox/PKGBUILD
+      ac_add_options --disable-elf-hack
+      ac_add_options --disable-av1
+      ac_add_options --enable-optimize="-g0 -O2"
+      # One of the following two lines (not sure which) prevents "read-only segment has dynamic relocations" linker error.
+      export MOZ_DEBUG_FLAGS=" "
+      export RUSTFLAGS="-Cdebuginfo=0"
+    [% END %]
+  [% ELSE %]
+    # We want to build with clang now and point to the GCC toolchain until #29041 is
+    # fixed. We explicitly need to define the host compiler as well as for some
+    # reason the gcc-toolchain argument does not get passed along otherwise.
+    CC="clang --gcc-toolchain=/var/tmp/dist/gcc"
+    CXX="clang++ --gcc-toolchain=/var/tmp/dist/gcc"
+    HOST_CC=$CC
+    HOST_CXX=$CXX
+
+    export BINDGEN_CFLAGS='--gcc-toolchain=/var/tmp/dist/gcc'
+  [% END %]
 [% END -%]
 
 [% IF c("var/windows") -%]
@@ -63,6 +104,31 @@
   ac_add_options --enable-verify-mar
 [% END -%]
 
+[% IF ! c("var/linux-cross") %]
+  # Let's make sure no preference is enabling either Adobe's or Google's CDM.
+  # TODO: Firefox ESR 91 has a stupid bug. The --enable-eme flag is defined
+  # with "when=eme_choices". eme_choices is defined as follows:
+  # def eme_choices(target):
+  #     if (target.kernel in ('Darwin', 'WINNT', 'Linux') and
+  #         target.os not in ('Android', 'iOS') and
+  #         target.cpu in ('x86', 'x86_64')):
+  #         return ('widevine',)
+  #     if target.kernel == 'WINNT' and target.cpu == 'aarch64':
+  #         return ('widevine',)
+  # Which excludes our linux-cross targets. When the "when" condition for
+  # --enable-foo isn't enabled, it's also not enabled for --disable-foo. So
+  # using --disable-eme on linux-cross results in the error
+  # "mozbuild.configure.options.InvalidOptionError: --disable-eme is not
+  # available in this configuration". This means we have to omit --disable-eme
+  # on linux-cross. Which means EME will stay disabled... UNTIL Mozilla
+  # implements EME for one of our linux-cross targets. At which point EME will
+  # silently enable itself in Tor Browser for that target unless the Tor devs
+  # carefully audit all merges from upstream to see if they implement EME for
+  # one of our linux-cross targets. Someone should report this to Mozilla and
+  # get it fixed upstream.
+  ac_add_options --disable-eme
+[% END %]
+
 ac_add_options --with-relative-profile=[% c('var/ProjectName') %]/Data/Browser
 mk_add_options MOZ_APP_DISPLAYNAME="[% c('var/Project_Name') %]"
 

+ 0 - 80
projects/firefox/mozconfig-linux-arm

@@ -1,80 +0,0 @@
-CROSS_COMPILE=1
-
-ac_add_options --enable-application=browser
-
-CC="clang -B /var/tmp/dist/binutils/bin"
-CXX="clang++ -B /var/tmp/dist/binutils/bin"
-HOST_CC="clang"
-HOST_CXX="clang++"
-
-export LDFLAGS="-Wl,-rpath-link=/lib/arm-linux-gnueabihf -Wl,-rpath-link=/usr/lib/arm-linux-gnueabihf"
-
-ac_add_options --target=arm-linux-gnueabihf
-ac_add_options --with-toolchain-prefix=arm-linux-gnueabihf-
-mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-arm
-
-mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
-export MOZILLA_OFFICIAL=1
-
-# From Mozilla MDN "Compiling 32-bit Firefox on a Linux 64-bit OS" docs
-# Should fix "error: Can't find header fontconfig/fcfreetype.h"
-mk_add_options MOZ_TREE_FREETYPE=1
-
-ac_add_options --enable-official-branding
-
-# Let's support GTK3 for ESR60
-ac_add_options --enable-default-toolkit=cairo-gtk3
-
-ac_add_options --enable-tor-browser-update
-ac_add_options --enable-verify-mar
-
-ac_add_options --disable-tests
-ac_add_options --disable-debug
-ac_add_options --disable-crashreporter
-ac_add_options --disable-webrtc
-ac_add_options --disable-parental-controls
-
-# Let's make sure no preference is enabling either Adobe's or Google's CDM.
-# TODO: Firefox ESR 68 has a stupid bug. The --enable-eme flag is defined with
-# "when=eme_choices". eme_choices is defined as follows:
-# def eme_choices(target):
-#     if (target.kernel in ('Darwin', 'WINNT', 'Linux') and
-#         target.os not in ('Android', 'iOS') and
-#         target.cpu in ('x86', 'x86_64')):
-#         return ('widevine',)
-#     if target.kernel == 'WINNT' and target.cpu == 'aarch64':
-#         return ('widevine',)
-# Which excludes GNU/Linux/ARM. When the "when" condition for --enable-foo
-# isn't enabled, it's also not enabled for --disable-foo. So using
-# --disable-eme results in the error
-# "mozbuild.configure.options.InvalidOptionError: --disable-eme is not
-# available in this configuration". This means we have to omit --disable-eme.
-# Which means EME will stay disabled... UNTIL Mozilla implements EME for
-# GNU/Linux/ARM. At which point EME will silently enable itself in Tor Browser
-# unless the Tor devs carefully audit all merges from upstream to see if they
-# implement EME for GNU/Linux/ARM. Someone should report this to Mozilla and
-# get it fixed upstream.
-#ac_add_options --disable-eme
-
-ac_add_options --enable-proxy-bypass-protection
-
-# Bug 31448: ld.gold fails if we don't disable debug-symbols
-ac_add_options --disable-debug-symbols
-
-# Disable telemetry
-ac_add_options MOZ_TELEMETRY_REPORTING=
-
-# Architecture flags for armhf
-ac_add_options --with-arch=armv7-a
-ac_add_options --with-fpu=vfpv3-d16
-ac_add_options --with-float-abi=hard
-ac_add_options --with-thumb=yes
-
-# From Arch Linux ARM for ESR91
-# https://github.com/archlinuxarm/PKGBUILDs/blob/2242af725c21a82a8e9ecc1d38f1b94cd6ea01ef/extra/firefox/PKGBUILD
-ac_add_options --disable-elf-hack
-ac_add_options --disable-av1
-ac_add_options --enable-optimize="-g0 -O2"
-# One of the following two lines (not sure which) prevents "read-only segment has dynamic relocations" linker error.
-export MOZ_DEBUG_FLAGS=" "
-export RUSTFLAGS="-Cdebuginfo=0"