Changes in tools/toolchain.sh [71e3289:7d6f7d2b] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/toolchain.sh

    r71e3289 r7d6f7d2b  
    1 #! /bin/bash
     1#!/bin/bash
    22
    33#
     
    3333                echo
    3434                echo "Script failed: $2"
    35                
    3635                exit 1
    3736        fi
     
    4645                echo
    4746                echo "Checksum of ${FILE} does not match."
    48                
    4947                exit 2
    5048        fi
     
    6260        echo " ia32       IA-32 (x86, i386)"
    6361        echo " ia64       IA-64 (Itanium)"
    64         echo " mips32     MIPS little-endian 32b"
    65         echo " mips32eb   MIPS big-endian 32b"
    66         echo " mips64     MIPS little-endian 64b"
     62        echo " mips32     MIPS little-endian"
     63        echo " mips32eb   MIPS big-endian"
    6764        echo " ppc32      32-bit PowerPC"
    6865        echo " ppc64      64-bit PowerPC"
     
    7471}
    7572
    76 change_title() {
    77         echo -en "\e]0;$1\a"
    78 }
    79 
    80 show_countdown() {
    81         TM="$1"
    82        
    83         if [ "${TM}" -eq 0 ] ; then
    84                 echo
    85                 return 0
    86         fi
    87        
    88         echo -n "${TM} "
    89         change_title "${TM}"
    90         sleep 1
    91        
    92         TM="`expr "${TM}" - 1`"
    93         show_countdown "${TM}"
    94 }
    95 
    96 show_dependencies() {
    97         echo "IMPORTANT NOTICE:"
    98         echo
    99         echo "For a successful compilation and use of the cross-compiler"
    100         echo "toolchain you need at least the following dependencies."
    101         echo
    102         echo "Please make sure that the dependencies are present in your"
    103         echo "system. Otherwise the compilation process might fail after"
    104         echo "a few seconds or minutes."
    105         echo
    106         echo " - SED, AWK, Flex, Bison, gzip, bzip2, Bourne Shell"
    107         echo " - gettext, zlib, Texinfo, libelf, libgomp"
    108         echo " - GNU Multiple Precision Library (GMP)"
    109         echo " - GNU Make"
    110         echo " - GNU tar"
    111         echo " - GNU Coreutils"
    112         echo " - GNU Sharutils"
    113         echo " - MPFR"
    114         echo " - MPC"
    115         echo " - Parma Polyhedra Library (PPL)"
    116         echo " - ClooG-PPL"
    117         echo " - native C compiler, assembler and linker"
    118         echo " - native C library with headers"
    119         echo
    120        
    121         show_countdown 10
    122 }
    123 
    12473download_check() {
    12574        SOURCE="$1"
     
    12877       
    12978        if [ ! -f "${FILE}" ]; then
    130                 change_title "Downloading ${FILE}"
    13179                wget -c "${SOURCE}${FILE}"
    13280                check_error $? "Error downloading ${FILE}."
     
    14088       
    14189        if [ -d "${DIR}" ]; then
    142                 change_title "Removing ${DIR}"
    14390                echo " >>> Removing ${DIR}"
    14491                rm -fr "${DIR}"
     
    15097        DESC="$2"
    15198       
    152         change_title "Creating ${DESC}"
    15399        echo ">>> Creating ${DESC}"
    154100       
     
    162108        DESC="$2"
    163109       
    164         change_title "Unpacking ${DESC}"
    165         echo " >>> Unpacking ${DESC}"
     110        echo " >>> ${DESC}"
    166111       
    167112        tar -xjf "${FILE}"
     
    197142       
    198143        BINUTILS_VERSION="2.20"
    199         GCC_VERSION="4.5.1"
     144        GCC_VERSION="4.4.3"
    200145       
    201146        BINUTILS="binutils-${BINUTILS_VERSION}.tar.bz2"
     
    220165        echo ">>> Downloading tarballs"
    221166        download_check "${BINUTILS_SOURCE}" "${BINUTILS}" "ee2d3e996e9a2d669808713360fa96f8"
    222         download_check "${GCC_SOURCE}" "${GCC_CORE}" "dc8959e31b01a65ce10d269614815054"
    223         download_check "${GCC_SOURCE}" "${GCC_OBJC}" "3c11b7037896e967eddf8178af2ddd98"
    224         download_check "${GCC_SOURCE}" "${GCC_CPP}" "b294953ff0bb2f20c7acb2bf005d832a"
     167        download_check "${GCC_SOURCE}" "${GCC_CORE}" "054b66f315b3d04ad06544ce26e72365"
     168        download_check "${GCC_SOURCE}" "${GCC_OBJC}" "34711c4de46eaf79aa018206dbec4389"
     169        download_check "${GCC_SOURCE}" "${GCC_CPP}" "cd179ec4f05ee17ce76464da25a2674c"
    225170       
    226171        echo ">>> Removing previous content"
     
    239184        unpack_tarball "${GCC_CPP}" "C++"
    240185       
    241         echo ">>> Processing binutils (${PLATFORM})"
     186        echo ">>> Compiling and installing binutils"
    242187        cd "${BINUTILSDIR}"
    243188        check_error $? "Change directory failed."
    244189        patch_binutils "${PLATFORM}"
    245        
    246         change_title "binutils: configure (${PLATFORM})"
    247         ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --disable-nls
     190        ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" "--disable-nls"
    248191        check_error $? "Error configuring binutils."
    249        
    250         change_title "binutils: make (${PLATFORM})"
    251192        make all install
    252193        check_error $? "Error compiling/installing binutils."
    253194       
    254         echo ">>> Processing GCC (${PLATFORM})"
     195        echo ">>> Compiling and installing GCC"
    255196        cd "${OBJDIR}"
    256197        check_error $? "Change directory failed."
    257        
    258         change_title "GCC: configure (${PLATFORM})"
    259         "${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
     198        "${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
    260199        check_error $? "Error configuring GCC."
    261        
    262         change_title "GCC: make (${PLATFORM})"
    263200        PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc
    264201        check_error $? "Error compiling/installing GCC."
     
    280217fi
    281218
    282 show_dependencies
    283 
    284219case "$1" in
    285220        "amd64")
     
    303238        "mips32eb")
    304239                build_target "mips32eb" "mips-linux-gnu"
    305                 ;;
    306         "mips64")
    307                 build_target "mips64" "mips64el-linux-gnu"
    308240                ;;
    309241        "ppc32")
     
    324256                build_target "mips32" "mipsel-linux-gnu"
    325257                build_target "mips32eb" "mips-linux-gnu"
    326                 build_target "mips64" "mips64el-linux-gnu"
    327258                build_target "ppc32" "ppc-linux-gnu"
    328259                build_target "ppc64" "ppc64-linux-gnu"
Note: See TracChangeset for help on using the changeset viewer.