mozconfig-linux-arm 3.2 KB

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