Created
October 12, 2017 04:26
-
-
Save sajattack/55fb6a8f57bc83e516949a5142d5c41b to your computer and use it in GitHub Desktop.
mozconfig for cross-compiling from x86_64 to arm-linux-gnueabihf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sh | |
# Build configuration script | |
# | |
# See http://www.mozilla.org/build/unix.html for build instructions. | |
# | |
CROSS_COMPILE=1 | |
BASE=/opt/gcc-7.2.0-rbp/bin | |
SYSROOT=/opt/gcc-7.2.0-rbp/arm-linux-gnueabihf | |
TARGET=arm-linux-gnueabihf | |
COMPILER_PATH="/opt/gcc-7.2.0-rbp/lib/gcc/arm-linux-gnueabihf/7.2.0" | |
CC="/opt/gcc-7.2.0-rbp/bin/arm-linux-gnueabihf-gcc -mfloat-abi=hard" | |
HOST_CC="gcc" | |
CXX="/opt/gcc-7.2.0-rbp/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard" | |
AR="${BASE}/arm-linux-gnueabihf-ar" | |
export CPATH=${SYSROOT}/include | |
export LD_LIBRARY_PATH=${SYSROOT}/lib:/opt/gcc-7.2.0-rbp/lib/gcc:${SYSROOT}/../lib/gcc/${TARGET}/7.2.0 | |
export LD_INCLUDE_PATH=${SYSROOT}/include | |
export CFLAGS="-march=armv7-a -mfpu=neon -mfloat-abi=hard -Wno-coverage-mismatch -L${SYSROOT}/lib -lc -lXdmcp -lXau -luuid -licui18n -licuuc -lSM -lICE -lXext -lXt -lxcb -lX11 -lglib-2.0 -I${SYSROOT}/include -mhard-float" | |
export LDFLAGS=$CFLAGS" -Wl,-rpath-link,${SYSROOT}/lib" | |
export CXXFLAGS="${CFLAGS} -fpermissive" | |
export CPPFLAGS=$CFLAGS | |
export PKG_CONFIG_PATH=${SYSROOT}/lib/pkgconfig | |
ac_add_options --target=arm-linux-gnueabihf | |
ac_add_options --host=x86_64-pc-linux | |
ac_add_options --x-libraries=${SYSROOT}/lib | |
ac_add_options --x-includes=${SYSROOT}/include | |
ac_add_options --disable-tests | |
ac_add_options --without-system-nspr | |
# ac_add_options --with-system-nspr | |
ac_add_options --with-toolchain-prefix=${BASE}/arm-linux-gnueabihf- | |
ac_add_options --without-intl-api | |
ac_add_options --with-float-abi=hard | |
ac_add_options --disable-install-strip | |
# Options for 'configure' (same as command-line options). | |
# all are listed so that one can manually tweak this config file. | |
mk_add_options MOZ_MAKE_FLAGS="-j8" | |
mk_add_options MOZ_FLOAT_ABI="hard" | |
mk_add_options AUTOCLOBBER=1 | |
ac_add_options --enable-application=browser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment