Changeset a42be38 in mainline


Ignore:
Timestamp:
2019-08-18T15:36:21Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
08c851ce
Parents:
521669d
Message:

Don't require the cross toolchain to be in $PATH

The toolchain in $PATH is still used when present, otherwise $CROSS_PREFIX, and finally /usr/local/cross are tried.

Files:
12 edited

Legend:

Unmodified
Added
Removed
  • configure.sh

    r521669d ra42be38  
    106106fi
    107107
    108 meson "${SOURCE_DIR}" '.' --cross-file "${SOURCE_DIR}/meson/cross/${cross_target}" || exit 1
     108cross_def="${SOURCE_DIR}/meson/cross/${cross_target}"
     109cc_arch=`sed -n "s:cc_arch = '\(.*\)':\1:p" "$cross_def"`
     110
     111compname="$cc_arch-helenos-gcc"
     112
     113if which "$compname"; then
     114        # Compiler is in PATH
     115        compprefix="$cc_arch-helenos-"
     116
     117elif [ -n "$CROSS_PREFIX" ]; then
     118        if ! which "$CROSS_PREFIX/bin/$compname"; then
     119                echo "ERROR: \$CROSS_PREFIX defined but $compname is not present in $CROSS_PREFIX/bin."
     120                echo "Run tools/toolchain.sh to build cross-compiling toolchain."
     121                exit 1
     122        fi
     123
     124        compprefix="$CROSS_PREFIX/bin/$cc_arch-helenos-"
     125else
     126        if ! which "/usr/local/cross/bin/$compname"; then
     127                echo "ERROR: \$CROSS_PREFIX is not defined and $compname is not present in /usr/local/cross/bin."
     128                echo "Run tools/toolchain.sh to build cross-compiling toolchain."
     129                exit 1
     130        fi
     131
     132        compprefix="/usr/local/cross/bin/$cc_arch-helenos-"
     133fi
     134
     135sed "s:@COMPPREFIX@:$compprefix:g" "$cross_def" > crossfile || exit 1
     136
     137meson "${SOURCE_DIR}" '.' --cross-file crossfile || exit 1
    109138
    110139echo
  • meson/cross/amd64

    r521669d ra42be38  
    22
    33[binaries]
    4 c = 'amd64-helenos-gcc'
    5 cpp = 'amd64-helenos-g++'
    6 ar = 'amd64-helenos-ar'
    7 strip = 'amd64-helenos-strip'
    8 nm = 'amd64-helenos-nm'
    9 objcopy = 'amd64-helenos-objcopy'
    10 objdump = 'amd64-helenos-objdump'
    11 as = 'amd64-helenos-as'
    12 ld = 'amd64-helenos-ld'
     4c = '@COMPPREFIX@gcc'
     5cpp = '@COMPPREFIX@g++'
     6ar = '@COMPPREFIX@ar'
     7strip = '@COMPPREFIX@strip'
     8nm = '@COMPPREFIX@nm'
     9objcopy = '@COMPPREFIX@objcopy'
     10objdump = '@COMPPREFIX@objdump'
     11as = '@COMPPREFIX@as'
     12ld = '@COMPPREFIX@ld'
    1313
    1414[properties]
  • meson/cross/amd64_clang

    r521669d ra42be38  
    22
    33[binaries]
    4 c = 'amd64-helenos-clang'
    5 cpp = 'amd64-helenos-clang++'
    6 ar = 'amd64-helenos-ar'
    7 strip = 'amd64-helenos-strip'
    8 nm = 'amd64-helenos-nm'
    9 objcopy = 'amd64-helenos-objcopy'
    10 objdump = 'amd64-helenos-objdump'
    11 as = 'amd64-helenos-as'
    12 ld = 'amd64-helenos-ld'
     4c = '@COMPPREFIX@clang'
     5cpp = '@COMPPREFIX@clang++'
     6ar = '@COMPPREFIX@ar'
     7strip = '@COMPPREFIX@strip'
     8nm = '@COMPPREFIX@nm'
     9objcopy = '@COMPPREFIX@objcopy'
     10objdump = '@COMPPREFIX@objdump'
     11as = '@COMPPREFIX@as'
     12ld = '@COMPPREFIX@ld'
    1313
    1414[properties]
  • meson/cross/arm32

    r521669d ra42be38  
    22
    33[binaries]
    4 c = 'arm-helenos-gcc'
    5 cpp = 'arm-helenos-g++'
    6 ar = 'arm-helenos-ar'
    7 strip = 'arm-helenos-strip'
    8 nm = 'arm-helenos-nm'
    9 objcopy = 'arm-helenos-objcopy'
    10 objdump = 'arm-helenos-objdump'
    11 as = 'arm-helenos-as'
    12 ld = 'arm-helenos-ld'
     4c = '@COMPPREFIX@gcc'
     5cpp = '@COMPPREFIX@g++'
     6ar = '@COMPPREFIX@ar'
     7strip = '@COMPPREFIX@strip'
     8nm = '@COMPPREFIX@nm'
     9objcopy = '@COMPPREFIX@objcopy'
     10objdump = '@COMPPREFIX@objdump'
     11as = '@COMPPREFIX@as'
     12ld = '@COMPPREFIX@ld'
    1313
    1414[properties]
  • meson/cross/arm64

    r521669d ra42be38  
    22
    33[binaries]
    4 c = 'aarch64-helenos-gcc'
    5 cpp = 'aarch64-helenos-g++'
    6 ar = 'aarch64-helenos-ar'
    7 strip = 'aarch64-helenos-strip'
    8 nm = 'aarch64-helenos-nm'
    9 objcopy = 'aarch64-helenos-objcopy'
    10 objdump = 'aarch64-helenos-objdump'
    11 as = 'aarch64-helenos-as'
    12 ld = 'aarch64-helenos-ld'
     4c = '@COMPPREFIX@gcc'
     5cpp = '@COMPPREFIX@g++'
     6ar = '@COMPPREFIX@ar'
     7strip = '@COMPPREFIX@strip'
     8nm = '@COMPPREFIX@nm'
     9objcopy = '@COMPPREFIX@objcopy'
     10objdump = '@COMPPREFIX@objdump'
     11as = '@COMPPREFIX@as'
     12ld = '@COMPPREFIX@ld'
    1313
    1414[properties]
  • meson/cross/ia32

    r521669d ra42be38  
    22
    33[binaries]
    4 c = 'i686-helenos-gcc'
    5 cpp = 'i686-helenos-g++'
    6 ar = 'i686-helenos-ar'
    7 strip = 'i686-helenos-strip'
    8 nm = 'i686-helenos-nm'
    9 objcopy = 'i686-helenos-objcopy'
    10 objdump = 'i686-helenos-objdump'
    11 as = 'i686-helenos-as'
    12 ld = 'i686-helenos-ld'
     4c = '@COMPPREFIX@gcc'
     5cpp = '@COMPPREFIX@g++'
     6ar = '@COMPPREFIX@ar'
     7strip = '@COMPPREFIX@strip'
     8nm = '@COMPPREFIX@nm'
     9objcopy = '@COMPPREFIX@objcopy'
     10objdump = '@COMPPREFIX@objdump'
     11as = '@COMPPREFIX@as'
     12ld = '@COMPPREFIX@ld'
    1313
    1414[properties]
  • meson/cross/ia64

    r521669d ra42be38  
    22
    33[binaries]
    4 c = 'ia64-helenos-gcc'
    5 cpp = 'ia64-helenos-g++'
    6 ar = 'ia64-helenos-ar'
    7 strip = 'ia64-helenos-strip'
    8 nm = 'ia64-helenos-nm'
    9 objcopy = 'ia64-helenos-objcopy'
    10 objdump = 'ia64-helenos-objdump'
    11 as = 'ia64-helenos-as'
    12 ld = 'ia64-helenos-ld'
     4c = '@COMPPREFIX@gcc'
     5cpp = '@COMPPREFIX@g++'
     6ar = '@COMPPREFIX@ar'
     7strip = '@COMPPREFIX@strip'
     8nm = '@COMPPREFIX@nm'
     9objcopy = '@COMPPREFIX@objcopy'
     10objdump = '@COMPPREFIX@objdump'
     11as = '@COMPPREFIX@as'
     12ld = '@COMPPREFIX@ld'
    1313
    1414[properties]
  • meson/cross/mips32

    r521669d ra42be38  
    22
    33[binaries]
    4 c = 'mipsel-helenos-gcc'
    5 cpp = 'mipsel-helenos-g++'
    6 ar = 'mipsel-helenos-ar'
    7 strip = 'mipsel-helenos-strip'
    8 nm = 'mipsel-helenos-nm'
    9 objcopy = 'mipsel-helenos-objcopy'
    10 objdump = 'mipsel-helenos-objdump'
    11 as = 'mipsel-helenos-as'
    12 ld = 'mipsel-helenos-ld'
     4c = '@COMPPREFIX@gcc'
     5cpp = '@COMPPREFIX@g++'
     6ar = '@COMPPREFIX@ar'
     7strip = '@COMPPREFIX@strip'
     8nm = '@COMPPREFIX@nm'
     9objcopy = '@COMPPREFIX@objcopy'
     10objdump = '@COMPPREFIX@objdump'
     11as = '@COMPPREFIX@as'
     12ld = '@COMPPREFIX@ld'
    1313
    1414[properties]
  • meson/cross/mips32eb

    r521669d ra42be38  
    22
    33[binaries]
    4 c = 'mips-helenos-gcc'
    5 cpp = 'mips-helenos-g++'
    6 ar = 'mips-helenos-ar'
    7 strip = 'mips-helenos-strip'
    8 nm = 'mips-helenos-nm'
    9 objcopy = 'mips-helenos-objcopy'
    10 objdump = 'mips-helenos-objdump'
    11 as = 'mips-helenos-as'
    12 ld = 'mips-helenos-ld'
     4c = '@COMPPREFIX@gcc'
     5cpp = '@COMPPREFIX@g++'
     6ar = '@COMPPREFIX@ar'
     7strip = '@COMPPREFIX@strip'
     8nm = '@COMPPREFIX@nm'
     9objcopy = '@COMPPREFIX@objcopy'
     10objdump = '@COMPPREFIX@objdump'
     11as = '@COMPPREFIX@as'
     12ld = '@COMPPREFIX@ld'
    1313
    1414[properties]
  • meson/cross/ppc32

    r521669d ra42be38  
    22
    33[binaries]
    4 c = 'ppc-helenos-gcc'
    5 cpp = 'ppc-helenos-g++'
    6 ar = 'ppc-helenos-ar'
    7 strip = 'ppc-helenos-strip'
    8 nm = 'ppc-helenos-nm'
    9 objcopy = 'ppc-helenos-objcopy'
    10 objdump = 'ppc-helenos-objdump'
    11 as = 'ppc-helenos-as'
    12 ld = 'ppc-helenos-ld'
     4c = '@COMPPREFIX@gcc'
     5cpp = '@COMPPREFIX@g++'
     6ar = '@COMPPREFIX@ar'
     7strip = '@COMPPREFIX@strip'
     8nm = '@COMPPREFIX@nm'
     9objcopy = '@COMPPREFIX@objcopy'
     10objdump = '@COMPPREFIX@objdump'
     11as = '@COMPPREFIX@as'
     12ld = '@COMPPREFIX@ld'
    1313
    1414[properties]
  • meson/cross/riscv64

    r521669d ra42be38  
    22
    33[binaries]
    4 c = 'riscv64-helenos-gcc'
    5 cpp = 'riscv64-helenos-g++'
    6 ar = 'riscv64-helenos-ar'
    7 strip = 'riscv64-helenos-strip'
    8 nm = 'riscv64-helenos-nm'
    9 objcopy = 'riscv64-helenos-objcopy'
    10 objdump = 'riscv64-helenos-objdump'
    11 as = 'riscv64-helenos-as'
    12 ld = 'riscv64-helenos-ld'
     4c = '@COMPPREFIX@gcc'
     5cpp = '@COMPPREFIX@g++'
     6ar = '@COMPPREFIX@ar'
     7strip = '@COMPPREFIX@strip'
     8nm = '@COMPPREFIX@nm'
     9objcopy = '@COMPPREFIX@objcopy'
     10objdump = '@COMPPREFIX@objdump'
     11as = '@COMPPREFIX@as'
     12ld = '@COMPPREFIX@ld'
    1313
    1414[properties]
  • meson/cross/sparc64

    r521669d ra42be38  
    22
    33[binaries]
    4 c = 'sparc64-helenos-gcc'
    5 cpp = 'sparc64-helenos-g++'
    6 ar = 'sparc64-helenos-ar'
    7 strip = 'sparc64-helenos-strip'
    8 nm = 'sparc64-helenos-nm'
    9 objcopy = 'sparc64-helenos-objcopy'
    10 objdump = 'sparc64-helenos-objdump'
    11 as = 'sparc64-helenos-as'
    12 ld = 'sparc64-helenos-ld'
     4c = '@COMPPREFIX@gcc'
     5cpp = '@COMPPREFIX@g++'
     6ar = '@COMPPREFIX@ar'
     7strip = '@COMPPREFIX@strip'
     8nm = '@COMPPREFIX@nm'
     9objcopy = '@COMPPREFIX@objcopy'
     10objdump = '@COMPPREFIX@objdump'
     11as = '@COMPPREFIX@as'
     12ld = '@COMPPREFIX@ld'
    1313
    1414[properties]
Note: See TracChangeset for help on using the changeset viewer.