Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0f28387 in mainline


Ignore:
Timestamp:
2017-10-03T16:54:50Z (4 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master
Children:
a0a273e
Parents:
b4a9f5d
Message:

toolchain.sh: enable gold linker, disable guile support, only touch install path after finishing build, and symlink clang and lld.

Guile support causes build failure on some systems (at least Archlinux) because of API breakage.
Disabling it for now, until upstream sorts out the issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/toolchain.sh

    rb4a9f5d r0f28387  
    283283        ORIGINAL="`pwd`"
    284284       
     285        mkdir -p "${OUTSIDE}"
     286       
    285287        cd "${OUTSIDE}"
    286288        check_error $? "Unable to change directory to ${OUTSIDE}."
     
    443445       
    444446        echo ">>> Removing previous content"
    445         $REAL_INSTALL && cleanup_dir "${PREFIX}"
    446447        cleanup_dir "${WORKDIR}"
    447448       
    448         $REAL_INSTALL && create_dir "${PREFIX}" "destination directory"
    449449        create_dir "${OBJDIR}" "GCC object directory"
    450450       
     
    478478                "--target=${TARGET}" \
    479479                "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" \
    480                 --disable-nls --disable-werror
     480                --disable-nls --disable-werror --enable-gold
    481481        check_error $? "Error configuring binutils."
    482482       
     
    486486       
    487487        change_title "binutils: install (${PLATFORM})"
    488         if $REAL_INSTALL ; then
    489                 make install
    490         else
    491                 make install "DESTDIR=${INSTALL_DIR}"
    492         fi
     488        make install "DESTDIR=${INSTALL_DIR}"
    493489        check_error $? "Error installing binutils."
    494490       
     
    513509       
    514510        change_title "GCC: install (${PLATFORM})"
    515         if $REAL_INSTALL ; then
    516                 PATH="${PATH}:${PREFIX}/bin" make install-gcc
    517         else
    518                 PATH="${PATH}:${INSTALL_DIR}/${PREFIX}/bin" make install-gcc "DESTDIR=${INSTALL_DIR}"
    519         fi
     511        PATH="${PATH}:${INSTALL_DIR}/${PREFIX}/bin" make install-gcc "DESTDIR=${INSTALL_DIR}"
    520512        check_error $? "Error installing GCC."
    521513       
     
    531523                        "--target=${TARGET}" \
    532524                        "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" \
    533                         --enable-werror=no
     525                        --enable-werror=no --without-guile
    534526                check_error $? "Error configuring GDB."
    535527               
     
    539531               
    540532                change_title "GDB: make (${PLATFORM})"
    541                 if $REAL_INSTALL ; then
    542                         PATH="${PATH}:${PREFIX}/bin" make install
    543                 else
    544                         PATH="${PATH}:${INSTALL_DIR}/${PREFIX}/bin" make install "DESTDIR=${INSTALL_DIR}"
    545                 fi
     533                PATH="${PATH}:${INSTALL_DIR}/${PREFIX}/bin" make install "DESTDIR=${INSTALL_DIR}"
    546534                check_error $? "Error installing GDB."
    547535        fi
    548536       
     537        # Symlink clang and lld to the install path.
     538        CLANG=`which clang 2> /dev/null || echo "/usr/bin/clang"`
     539        LLD=`which ld.lld 2> /dev/null || echo "/usr/bin/ld.lld"`
     540       
     541        ln -s $CLANG "${INSTALL_DIR}/${PREFIX}/bin/${TARGET}-clang"
     542        ln -s $LLD "${INSTALL_DIR}/${PREFIX}/bin/${TARGET}-ld.lld"
     543       
     544        if $REAL_INSTALL ; then
     545                echo ">>> Moving to the destination directory."
     546                cleanup_dir "${PREFIX}"
     547                echo mv "${INSTALL_DIR}/${PREFIX}" "${PREFIX}"
     548                mv "${INSTALL_DIR}/${PREFIX}" "${PREFIX}"
     549        fi
    549550       
    550551        cd "${BASEDIR}"
Note: See TracChangeset for help on using the changeset viewer.