Changeset 8f6c7785 in mainline for tools


Ignore:
Timestamp:
2013-04-26T02:55:32Z (12 years ago)
Author:
Dominik Taborsky (AT DOT) <brembyseznamcz>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
700f89e
Parents:
d617050
Message:

logical write functional

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/toolchain.sh

    rd617050 r8f6c7785  
    5656BINUTILS_RELEASE=""
    5757#GCC_VERSION="4.7.2"
    58 GCC_VERSION="4.8.0"
     58GCC_VERSION="4.7.3"
     59#GCC_VERSION="4.8.0"
    5960GDB_VERSION="7.5"
    6061
     
    7273        HEADER="$2"
    7374        BODY="$3"
    74        
     75
    7576        FNAME="/tmp/conftest-$$"
    76        
     77
    7778        echo "#include ${HEADER}" > "${FNAME}.c"
    7879        echo >> "${FNAME}.c"
     
    8283        echo "  return 0;" >> "${FNAME}.c"
    8384        echo "}" >> "${FNAME}.c"
    84        
     85
    8586        cc -c -o "${FNAME}.o" "${FNAME}.c" 2> "${FNAME}.log"
    8687        RC="$?"
    87        
     88
    8889        if [ "$RC" -ne "0" ] ; then
    8990                echo " ${DEPENDENCY} not found, too old or compiler error."
     
    114115                echo
    115116                echo "Script failed: $2"
    116                
     117
    117118                exit 1
    118119        fi
     
    122123        FILE="$1"
    123124        SUM="$2"
    124        
     125
    125126        COMPUTED="`md5sum "${FILE}" | cut -d' ' -f1`"
    126127        if [ "${SUM}" != "${COMPUTED}" ] ; then
    127128                echo
    128129                echo "Checksum of ${FILE} does not match."
    129                
     130
    130131                exit 2
    131132        fi
     
    157158        echo "defined, /usr/local/cross will be used by default."
    158159        echo
    159        
     160
    160161        exit 3
    161162}
     
    167168show_countdown() {
    168169        TM="$1"
    169        
     170
    170171        if [ "${TM}" -eq 0 ] ; then
    171172                echo
    172173                return 0
    173174        fi
    174        
     175
    175176        echo -n "${TM} "
    176177        change_title "${TM}"
    177178        sleep 1
    178        
     179
    179180        TM="`expr "${TM}" - 1`"
    180181        show_countdown "${TM}"
     
    212213        FILE="$2"
    213214        CHECKSUM="$3"
    214        
     215
    215216        if [ ! -f "${FILE}" ]; then
    216217                change_title "Downloading ${FILE}"
     
    218219                check_error $? "Error downloading ${FILE}."
    219220        fi
    220        
     221
    221222        check_md5 "${FILE}" "${CHECKSUM}"
    222223}
     
    224225source_check() {
    225226        FILE="$1"
    226        
     227
    227228        if [ ! -f "${FILE}" ]; then
    228229                echo
    229230                echo "File ${FILE} not found."
    230                
     231
    231232                exit 4
    232233        fi
     
    235236cleanup_dir() {
    236237        DIR="$1"
    237        
     238
    238239        if [ -d "${DIR}" ]; then
    239240                change_title "Removing ${DIR}"
     
    246247        DIR="$1"
    247248        DESC="$2"
    248        
     249
    249250        change_title "Creating ${DESC}"
    250251        echo ">>> Creating ${DESC}"
    251        
     252
    252253        mkdir -p "${DIR}"
    253254        test -d "${DIR}"
     
    258259        FILE="$1"
    259260        DESC="$2"
    260        
     261
    261262        change_title "Unpacking ${DESC}"
    262263        echo " >>> Unpacking ${DESC}"
    263        
     264
    264265        tar -xjf "${FILE}"
    265266        check_error $? "Error unpacking ${DESC}."
     
    270271        check_dependecies
    271272        show_countdown 10
    272        
     273
    273274        BINUTILS_SOURCE="ftp://ftp.gnu.org/gnu/binutils/"
    274275        GCC_SOURCE="ftp://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/"
    275276        GDB_SOURCE="ftp://ftp.gnu.org/gnu/gdb/"
    276        
     277
    277278        download_fetch "${BINUTILS_SOURCE}" "${BINUTILS}" "ee0f10756c84979622b992a4a61ea3f5"
    278279        download_fetch "${GCC_SOURCE}" "${GCC}" "cc308a0891e778cfda7a151ab8a6e762"
     
    283284        PLATFORM="$1"
    284285        TARGET="$2"
    285        
     286
    286287        WORKDIR="${BASEDIR}/${PLATFORM}"
    287288        BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}"
     
    289290        OBJDIR="${WORKDIR}/gcc-obj"
    290291        GDBDIR="${WORKDIR}/gdb-${GDB_VERSION}"
    291        
     292
    292293        if [ -z "${CROSS_PREFIX}" ] ; then
    293294                CROSS_PREFIX="/usr/local/cross"
    294295        fi
    295        
     296
    296297        PREFIX="${CROSS_PREFIX}/${PLATFORM}"
    297        
     298
    298299        echo ">>> Downloading tarballs"
    299300        #source_check "${BASEDIR}/${BINUTILS}"
    300301        source_check "${BASEDIR}/${GCC}"
    301302        #source_check "${BASEDIR}/${GDB}"
    302        
     303
    303304        echo ">>> Removing previous content"
    304305        #cleanup_dir "${PREFIX}"
    305306        #cleanup_dir "${WORKDIR}"
    306        
     307
    307308        create_dir "${PREFIX}" "destination directory"
    308309        create_dir "${OBJDIR}" "GCC object directory"
    309        
     310
    310311        echo ">>> Unpacking tarballs"
    311312        cd "${WORKDIR}"
    312313        check_error $? "Change directory failed."
    313        
    314         unpack_tarball "${BASEDIR}/${BINUTILS}" "binutils"
    315         #unpack_tarball "${BASEDIR}/${GCC}" "GCC"
    316         unpack_tarball "${BASEDIR}/${GDB}" "GDB"
    317        
    318         echo ">>> Processing binutils (${PLATFORM})"
    319         cd "${BINUTILSDIR}"
     314
     315        #unpack_tarball "${BASEDIR}/${BINUTILS}" "binutils"
     316        unpack_tarball "${BASEDIR}/${GCC}" "GCC"
     317        #unpack_tarball "${BASEDIR}/${GDB}" "GDB"
     318
     319        #echo ">>> Processing binutils (${PLATFORM})"
     320        #cd "${BINUTILSDIR}"
     321        #check_error $? "Change directory failed."
     322
     323        #change_title "binutils: configure (${PLATFORM})"
     324        #CFLAGS=-Wno-error ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --disable-nls --disable-werror
     325        #check_error $? "Error configuring binutils."
     326
     327        #change_title "binutils: make (${PLATFORM})"
     328        #make all install
     329        #check_error $? "Error compiling/installing binutils."
     330
     331        echo ">>> Processing GCC (${PLATFORM})"
     332        cd "${OBJDIR}"
    320333        check_error $? "Change directory failed."
    321        
    322         change_title "binutils: configure (${PLATFORM})"
    323         CFLAGS=-Wno-error ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --disable-nls --disable-werror
    324         check_error $? "Error configuring binutils."
    325        
    326         change_title "binutils: make (${PLATFORM})"
    327         make all install
    328         check_error $? "Error compiling/installing binutils."
    329        
    330         echo ">>> Processing GCC (${PLATFORM})"
    331         #cd "${OBJDIR}"
     334
     335        change_title "GCC: configure (${PLATFORM})"
     336        "${GCCDIR}/configure" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --with-gnu-as --with-gnu-ld --disable-nls --disable-threads --enable-languages=c,objc,c++,obj-c++ --disable-multilib --disable-libgcj --without-headers --disable-shared --enable-lto --disable-werror
     337        check_error $? "Error configuring GCC."
     338
     339        change_title "GCC: make (${PLATFORM})"
     340        PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc
     341        check_error $? "Error compiling/installing GCC."
     342
     343        #echo ">>> Processing GDB (${PLATFORM})"
     344        #cd "${GDBDIR}"
    332345        #check_error $? "Change directory failed."
    333        
    334         change_title "GCC: configure (${PLATFORM})"
    335         #"${GCCDIR}/configure" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --with-gnu-as --with-gnu-ld --disable-nls --disable-threads --enable-languages=c,objc,c++,obj-c++ --disable-multilib --disable-libgcj --without-headers --disable-shared --enable-lto --disable-werror
    336         #check_error $? "Error configuring GCC."
    337        
    338         change_title "GCC: make (${PLATFORM})"
    339         #PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc
    340         #check_error $? "Error compiling/installing GCC."
    341        
    342         echo ">>> Processing GDB (${PLATFORM})"
    343         cd "${GDBDIR}"
    344         check_error $? "Change directory failed."
    345        
    346         change_title "GDB: configure (${PLATFORM})"
    347         ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-"
    348         check_error $? "Error configuring GDB."
    349        
    350         change_title "GDB: make (${PLATFORM})"
    351         make all install
    352         check_error $? "Error compiling/installing GDB."
    353        
     346
     347        #change_title "GDB: configure (${PLATFORM})"
     348        #./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-"
     349        #check_error $? "Error configuring GDB."
     350
     351        #change_title "GDB: make (${PLATFORM})"
     352        #make all install
     353        #check_error $? "Error compiling/installing GDB."
     354
    354355        cd "${BASEDIR}"
    355356        check_error $? "Change directory failed."
    356        
     357
    357358        echo ">>> Cleaning up"
    358359        cleanup_dir "${WORKDIR}"
    359        
     360
    360361        echo
    361362        echo ">>> Cross-compiler for ${TARGET} installed."
     
    439440                build_target "arm32" "arm-linux-gnueabi" &
    440441                wait
    441                
     442
    442443                build_target "ia32" "i686-pc-linux-gnu" &
    443444                build_target "ia64" "ia64-pc-linux-gnu" &
    444445                wait
    445                
     446
    446447                build_target "mips32" "mipsel-linux-gnu" &
    447448                build_target "mips32eb" "mips-linux-gnu" &
    448449                wait
    449                
     450
    450451                build_target "mips64" "mips64el-linux-gnu" &
    451452                build_target "ppc32" "ppc-linux-gnu" &
    452453                wait
    453                
     454
    454455                build_target "ppc64" "ppc64-linux-gnu" &
    455456                build_target "sparc64" "sparc64-linux-gnu" &
Note: See TracChangeset for help on using the changeset viewer.