Changeset bbe5e34 in mainline for tools/toolchain.sh


Ignore:
Timestamp:
2018-08-31T14:32:39Z (6 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
58e7b26
Parents:
fa86fff
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-08-31 14:32:39)
git-committer:
GitHub <noreply@…> (2018-08-31 14:32:39)
Message:

Switch completely to HelenOS-specific toolchain target (#44)

As previously discussed, utilizing the compiler-provided headers and libraries would
allow us to avoid a number of problems and reduce the amount of architecture-support
code that we have to implement ourselves. With this change, the support for using
Linux-targeted toolchain, or even the host toolchain itself, is removed, due to the
inherent issues caused by such setup.

Additionally, the toolchain installation is a bit simplified to install all targets into a single
prefix. This prefix can be added to the PATH so that one can simply execute
e.g. amd64-helenos-gcc instead of needing to use the whole path.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/toolchain.sh

    rfa86fff rbbe5e34  
    4545
    4646REAL_INSTALL=true
    47 USE_HELENOS_TARGET=false
     47USE_HELENOS_TARGET=true
    4848
    4949check_error() {
     
    6060        echo
    6161        echo "Syntax:"
    62         echo " $0 [--no-install] [--helenos-target] <platform>"
     62        echo " $0 [--no-install] [--non-helenos-target] <platform>"
    6363        echo
    6464        echo "Possible target platforms are:"
     
    8989        echo "not want to run the script under the super user."
    9090        echo
    91         echo "The --helenos-target will build HelenOS-specific toolchain"
    92         echo "(i.e. it will use *-helenos triplet instead of *-linux-*)."
    93         echo "Using the HelenOS-specific toolchain is still an experimental"
    94         echo "feature that is not fully supported."
     91        echo "The --non-helenos-target will build non-HelenOS-specific toolchain"
     92        echo "(i.e. it will use *-linux-* triplet instead of *-helenos)."
     93        echo "Using this toolchain for building HelenOS is not supported."
    9594        echo
    9695
     
    238237        HELENOS_TARGET="${GNU_ARCH}-helenos"
    239238
    240         # TODO: Clean up this mess.
    241239        case "$1" in
    242                 "amd64")
    243                         LINUX_TARGET="${GNU_ARCH}-unknown-elf"
    244                         ;;
    245                 "ia32" | "ia64")
    246                         LINUX_TARGET="${GNU_ARCH}-pc-linux-gnu"
    247                         ;;
    248240                "arm32")
    249241                        LINUX_TARGET="${GNU_ARCH}-linux-gnueabi"
    250                         ;;
    251                 "riscv64")
    252                         LINUX_TARGET="${GNU_ARCH}-unknown-linux-gnu"
    253242                        ;;
    254243                *)
     
    283272        fi
    284273
    285         PREFIX="${CROSS_PREFIX}/${TARGET}"
     274        PREFIX="${CROSS_PREFIX}"
    286275
    287276        echo ">>> Removing previous content"
     
    408397        if $REAL_INSTALL ; then
    409398                echo ">>> Moving to the destination directory."
    410                 cleanup_dir "${PREFIX}"
    411                 echo mv "${INSTALL_DIR}/${PREFIX}" "${PREFIX}"
    412                 mv "${INSTALL_DIR}/${PREFIX}" "${PREFIX}"
     399                echo cp -r -t "${PREFIX}" "${INSTALL_DIR}/${PREFIX}/"*
     400                cp -r -t "${PREFIX}" "${INSTALL_DIR}/${PREFIX}/"*
    413401        fi
    414402
     
    429417                        shift
    430418                        ;;
    431                 --helenos-target)
    432                         USE_HELENOS_TARGET=true
     419                --non-helenos-target)
     420                        USE_HELENOS_TARGET=false
    433421                        shift
    434422                        ;;
Note: See TracChangeset for help on using the changeset viewer.