#! /bin/sh # TARGETS="" if [ $# -ne 0 ] ; then TARGETS="$*" else # primary targets TARGETS="${TARGETS} sparc-rtems4.12" TARGETS="${TARGETS} arm-rtems4.12" TARGETS="${TARGETS} powerpc-rtems4.12" TARGETS="${TARGETS} mips-rtems4.12" TARGETS="${TARGETS} i386-rtems4.12" TARGETS="${TARGETS} m68k-rtems4.12" # secondary targets TARGETS="${TARGETS} bfin-rtems4.12" TARGETS="${TARGETS} h8300-rtems4.12" TARGETS="${TARGETS} lm32-rtems4.12" TARGETS="${TARGETS} m32c-rtems4.12" TARGETS="${TARGETS} moxie-rtems4.12" TARGETS="${TARGETS} nios2-rtems4.12" TARGETS="${TARGETS} or1k-rtems4.12" TARGETS="${TARGETS} sh-rtems4.12" TARGETS="${TARGETS} sparc64-rtems4.12" TARGETS="${TARGETS} v850-rtems4.12" # optimistic targets TARGETS="${TARGETS} aarch64-rtems4.12" TARGETS="${TARGETS} microblaze-rtems4.12" TARGETS="${TARGETS} x86_64-rtems4.12" fi NEWLIB=newlib-cygwin if [ ! -d ${NEWLIB} ] ; then echo "no NEWLIB source present" exit 1 fi PREFIX=/tmp/tools #PREFIX=/users/joel/rtems-4.11-work/tools BASEDIR=`pwd` for target in ${TARGETS} do # Best to avoid iconv on some targets case ${target} in avr*) enable_iconv="--disable-iconv" ;; h8300*) enable_iconv="--disable-iconv" ;; m32c*) enable_iconv="--disable-iconv --disable-libssp" ;; *) enable_iconv="--enable-newlib-iconv \ --enable-newlib-iconv-encodings=big5,cp775,cp850,cp852,cp855,\ cp866,euc_jp,euc_kr,euc_tw,iso_8859_1,iso_8859_10,iso_8859_11,\ iso_8859_13,iso_8859_14,iso_8859_15,iso_8859_2,iso_8859_3,\ iso_8859_4,iso_8859_5,iso_8859_6,iso_8859_7,iso_8859_8,iso_8859_9,\ iso_ir_111,koi8_r,koi8_ru,koi8_u,koi8_uni,ucs_2,ucs_2_internal,\ ucs_2be,ucs_2le,ucs_4,ucs_4_internal,ucs_4be,ucs_4le,us_ascii,\ utf_16,utf_16be,utf_16le,utf_8,win_1250,win_1251,win_1252,\ win_1253,win_1254,win_1255,win_1256,win_1257,win_1258" ;; esac echo Building ${target} cd ${BASEDIR} rm -rf b-${target}-newlib mkdir b-${target}-newlib cd b-${target}-newlib ../${NEWLIB}/configure \ --enable-multilib \ ${enable_iconv} \ --enable-newlib-io-c99-formats \ --enable-threads \ --target=${target} \ --prefix=${PREFIX} >c.log 2>&1 && \ make -j24 >b.log 2>&1 result=$? make install >i.log 2>&1 #test $result -eq 0 && rm -rf ${BASEDIR}/b-${target}-newlib echo $? done exit 0