In particular, I'm trying to cross-compile Firefox 69.0.3 from x64 Ubuntu 19.10 to SPARC Solaris 11.4. The one-page document on how to do this (
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Cross-compiling_Mozilla) is somewhat limited. I'd appreciate any help I can get.
1. Is it mozconfig or .mozconfig?
2. Do I need to set CC and CXX? Do I set them in mozconfig or as shell env vars?
3. Do CC and CXX refer to the host C compiler, the target C compiler, or the C cross-compiler on the host?
4. Should I use gcc or clang?
5. How do I point the build to where my Rust cross-compiler on the Ubuntu machine is located?
6. Do I need to set FORCE_GCC?
This is the mozconfig I'm using. Does this look right?
# sh
# Build configuration script
#
# See
http://www.mozilla.org/build/unix.html for build instructions.
#
export CROSS_COMPILE=1
FORCE_GCC=
# CC=clang
CC=/usr/sparcv9-solaris/solaris/cross/bin/sparcv9-solaris2.11-gcc
# CXX=g++
CXX=/usr/sparcv9-solaris/solaris/cross/bin/sparcv9-solaris2.11-g++
GCC_USE_GNU_LD=
CARGO=/home/michele/rust/src/tools/cargo/src/bin/cargo
RUST=/usr/local/bin/rustc
SYSROOT=/usr/sparcv9-solaris/solaris/cross/sysroot
PKG_CONFIG_PATH=/usr/sparcv9-solaris/solaris/cross/sysroot/usr/lib/pkgconfig
export BINDGEN_CFLAGS="--sysroot=/usr/sparcv9-solaris/solaris/cross/sysroot"
ac_add_options --prefix=/usr/sparcv9-solaris/solaris/cross/sysroot/usr/lib
ac_add_options --target=sparcv9-sun-solaris
# Options for 'configure' (same as command-line options).
# all are listed so that one can manually tweak this config file.
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-release
mk_add_options SYSROOT=/usr/sparcv9-solaris/solaris/cross/sysroot
ac_add_options --enable-application=browser
# ac_add_options --enable-tests
ac_add_options --disable-jemalloc
# ac_add_options --enable-dtrace
ac_add_options --disable-debug
# ac_add_options --enable-optimize
ac_add_options --disable-ipc
ac_add_options --disable-crashreporter
ac_add_options --disable-verify-mar