Consegui obter o conjunto de ferramentas CR16 usando binutils/gcc/newlib
:
#!/bin/sh
TARGET=cr16-elf
BINUTILS=binutils-2.24
MPFR=mpfr-3.1.5
GMP=gmp-6.1.2
GCC=gcc-6.1.0
MPC=mpc-1.0.3
CLOOG=cloog-0.18.1
ISL=isl-0.16.1
PFXDIR=/opt/cr16
NEWLIB=newlib-2.5.0
NEED_BINUTILS=1
NEED_GCC=1
NEED_NEWLIB=1
CONFIG_OPTS="--disable-multilib --disable-shared --disable-threads --prefix=$PFXDIR --target=$TARGET --with-newlib"
MAKE_OPTS=-j4
# build binutils
rm -rf $BINUTILS binutils-build
if [ $NEED_BINUTILS ] ; then
tar xfk $BINUTILS.tar.gz
mkdir -p binutils-build
cd binutils-build
../$BINUTILS/configure $CONFIG_OPTS
make $MAKE_OPTS
make install
cd ..
fi
# build gcc
rm -rf $MPFR $GMP $MPC $ISL $CLOG $GCC gcc-build
if [ $NEED_GCC ] ; then
tar xfk $MPFR.tar.xz
tar xfk $GMP.tar.xz
tar xfk $MPC.tar.gz
tar xfk $ISL.tar.bz2
tar xfk $CLOOG.tar.gz
tar xfk $GCC.tar.bz2
mkdir -p gcc-build
ln -sf ../$MPFR $GCC/mpfr
ln -sf ../$GMP $GCC/gmp
ln -sf ../$MPC $GCC/mpc
ln -sf ../$ISL $GCC/isl
ln -sf ../$CLOOG $GCC/cloog
cd gcc-build
../$GCC/configure $CONFIG_OPTS --enable-languages=c
make $MAKE_OPTS all-gcc
make install-gcc
make $MAKE_OPTS all-target-libgcc
make install-target-libgcc
cd ..
fi
# build newlib
rm -rf $NEWLIB newlib-build
if [ $NEED_NEWLIB ] ; then
tar xfk $NEWLIB.tar.gz
mkdir -p newlib-build
cd newlib-build
../$NEWLIB/configure $CONFIG_OPTS
make $MAKE_OPTS
make install
cd ..
fi