mozconfig-linux-arm 3.0 KB

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