Created
July 13, 2016 00:28
-
-
Save rofl0r/6de66b479c97381e5e8cb69d730eba39 to your computer and use it in GitHub Desktop.
config.sh for musl-cross
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
# musl-cross config template to build a cross-compiler for sabotage | |
# set your ARCH | |
#ARCH=i486 | |
#ARCH=x86_64 | |
#ARCH=powerpc | |
#ARCH=arm | |
#ARCH=microblaze | |
#ARCH=mips | |
#ARCH=mipsel | |
#ARCH=armv7hf | |
#ARCH=armv7 | |
#ARCH=sh | |
# set number of cores to use for build | |
CORES=2 | |
# leave the rest as is, save, and run ./build.sh | |
if [ "$ARCH" = armv7hf ] ; then | |
TRIPLE=arm-linux-musleabihf | |
GCC_BOOTSTRAP_CONFFLAGS="--with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16" | |
GCC_CONFFLAGS="--with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16" | |
ARCH=arm | |
elif [ "$ARCH" = armv7 ] ; then | |
TRIPLE=arm-linux-musleabi | |
GCC_BOOTSTRAP_CONFFLAGS="--with-arch=armv7-a --with-float=softfp" | |
GCC_CONFFLAGS="--with-arch=armv7-a --with-float=softfp" | |
ARCH=arm | |
elif [ "$ARCH" = sh ] ; then | |
TRIPLE=sh4-linux-musl | |
elif [ "$ARCH" = sheb ] ; then | |
TRIPLE=sh4eb-linux-musl | |
fi | |
GCC_STAGE1_NOOPT=1 | |
GCC_VERSION=4.7.4 | |
CC_BASE_PREFIX=$HOME/musl-cross-$GCC_VERSION | |
MUSL_CONFFLAGS=--enable-optimize=size | |
WITH_SYSROOT=0 | |
MAKEFLAGS=-j$CORES | |
BINUTILS_URL=ftp://sourceware.org/pub/binutils/snapshots/binutils-2.24.90.tar.bz2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment