Changeset 367db39a in mainline


Ignore:
Timestamp:
2017-10-21T22:33:29Z (7 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c8fbbe7, e160bfe8
Parents:
5265c1eb
Message:

If isl is not found on the system, build it ourselves.

This is useful because, for example,
Arch Linux does not provide an official package for isl.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/toolchain.sh

    r5265c1eb r367db39a  
    6464GDB_VERSION="7.12.1"
    6565## GDB_PATCHES="toolchain-gdb-7.6.1.patch"
     66ISL_VERSION="0.18"
    6667
    6768BASEDIR="`pwd`"
     
    7071GCC="gcc-${GCC_VERSION}.tar.bz2"
    7172GDB="gdb-${GDB_VERSION}.tar.gz"
     73ISL="isl-${ISL_VERSION}.tar.bz2"
    7274
    7375REAL_INSTALL=true
    7476USE_HELENOS_TARGET=false
     77BUILD_ISL=false
    7578
    7679#
     
    97100       
    98101        if [ "$RC" -ne "0" ] ; then
    99                 echo " ${DEPENDENCY} not found, too old or compiler error."
    100                 echo " Please recheck manually the source file \"${FNAME}.c\"."
    101                 echo " The compilation of the toolchain is probably going to fail,"
    102                 echo " you have been warned."
    103                 echo
    104                 echo " ===== Compiler output ====="
    105                 cat "${FNAME}.log"
    106                 echo " ==========================="
    107                 echo
     102                if [ "${DEPENDENCY}" == "isl" ]; then
     103                        BUILD_ISL=true
     104                       
     105                        echo " isl not found. Will be downloaded and built with GCC."
     106                else
     107                        echo " ${DEPENDENCY} not found, too old or compiler error."
     108                        echo " Please recheck manually the source file \"${FNAME}.c\"."
     109                        echo " The compilation of the toolchain is probably going to fail,"
     110                        echo " you have been warned."
     111                        echo
     112                        echo " ===== Compiler output ====="
     113                        cat "${FNAME}.log"
     114                        echo " ==========================="
     115                        echo
     116                fi
    108117        else
    109118                echo " ${DEPENDENCY} found"
     
    352361        GCC_SOURCE="ftp://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/"
    353362        GDB_SOURCE="ftp://ftp.gnu.org/gnu/gdb/"
     363        ISL_SOURCE="http://isl.gforge.inria.fr/"
    354364       
    355365        download_fetch "${BINUTILS_SOURCE}" "${BINUTILS}" "9e8340c96626b469a603c15c9d843727"
    356366        download_fetch "${GCC_SOURCE}" "${GCC}" "6bf56a2bca9dac9dbbf8e8d1036964a8"
    357367        download_fetch "${GDB_SOURCE}" "${GDB}" "06c8f40521ed65fe36ebc2be29b56942"
     368       
     369        if $BUILD_ISL ; then
     370                download_fetch "${ISL_SOURCE}" "${ISL}" "11436d6b205e516635b666090b94ab32"
     371        fi
    358372}
    359373
     
    425439        BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}"
    426440        GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}"
     441        ISLDIR="${WORKDIR}/isl-${ISL_VERSION}"
    427442        OBJDIR="${WORKDIR}/gcc-obj"
    428443        GDBDIR="${WORKDIR}/gdb-${GDB_VERSION}"
     
    438453        source_check "${BASEDIR}/${GCC}"
    439454        source_check "${BASEDIR}/${GDB}"
     455        if $BUILD_ISL ; then
     456                source_check "${BASEDIR}/${ISL}"
     457        fi
    440458       
    441459        echo ">>> Removing previous content"
     
    453471        unpack_tarball "${BASEDIR}/${GCC}" "GCC"
    454472        unpack_tarball "${BASEDIR}/${GDB}" "GDB"
     473        if $BUILD_ISL ; then
     474                unpack_tarball "${BASEDIR}/${ISL}" "isl"
     475                mv "${ISLDIR}" "${GCCDIR}"/isl
     476        fi
    455477       
    456478        echo ">>> Applying patches"
Note: See TracChangeset for help on using the changeset viewer.