Changes in tools/toolchain.sh [cb15b49c:6ae5e3f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/toolchain.sh
rcb15b49c r6ae5e3f 61 61 echo "Syntax:" 62 62 echo " $0 [--no-install] [--non-helenos-target] <platform>" 63 echo " $0 --test-version [<platform>]"64 63 echo 65 64 echo "Possible target platforms are:" … … 96 95 } 97 96 98 test_version() {99 echo "Cross-compiler toolchain build script"100 echo101 echo "Start testing the version of the installed software"102 echo103 104 if [ -z "$1" ] || [ "$1" == "all" ] ; then105 PLATFORMS=("amd64" "arm32" "ia32" "ia64" "mips32" "mips32eb" "ppc32" "riscv64" "sparc64")106 else107 PLATFORMS=("$1")108 fi109 110 111 if [ -z "${CROSS_PREFIX}" ] ; then112 CROSS_PREFIX="/usr/local/cross"113 fi114 115 for i in "${PLATFORMS[@]}"116 do117 PLATFORM="$i"118 set_target_from_platform "$PLATFORM"119 PREFIX="${CROSS_PREFIX}/bin/${HELENOS_TARGET}"120 121 echo "== $PLATFORM =="122 test_app_version "Binutils" "ld" "GNU\ ld\ \(GNU\ Binutils\)\ ((\.|[0-9])+)" "$BINUTILS_VERSION"123 test_app_version "GCC" "gcc" "gcc\ version\ ((\.|[0-9])+)" "$GCC_VERSION"124 test_app_version "GDB" "gdb" "GNU\ gdb\ \(GDB\)\s+((\.|[0-9])+)" "$GDB_VERSION"125 done126 127 exit128 }129 130 test_app_version() {131 PKGNAME="$1"132 APPNAME="$2"133 REGEX="$3"134 INS_VERSION="$4"135 136 137 APP="${PREFIX}-${APPNAME}"138 if [ ! -e $APP ]; then139 echo "- $PKGNAME is missing"140 else141 {142 OUT=$(${APP} -v 2>&1)143 } &> /dev/null144 145 if [[ "$OUT" =~ $REGEX ]]; then146 VERSION="${BASH_REMATCH[1]}"147 if [ "$INS_VERSION" = "$VERSION" ]; then148 echo "+ $PKGNAME is uptodate ($INS_VERSION)"149 else150 echo "- $PKGNAME ($VERSION) is outdated ($INS_VERSION)"151 fi152 else153 echo "- $PKGNAME Unexpected output"154 fi155 fi156 }157 158 159 160 97 change_title() { 161 98 echo -en "\e]0;$1\a" … … 471 408 while [ "$#" -gt 1 ] ; do 472 409 case "$1" in 473 --test-version)474 test_version "$2"475 exit476 ;;477 410 --no-install) 478 411 REAL_INSTALL=false … … 494 427 495 428 case "$1" in 496 --test-version)497 test_version498 ;;499 429 amd64|arm32|ia32|ia64|mips32|mips32eb|ppc32|riscv64|sparc64) 500 430 prepare
Note:
See TracChangeset
for help on using the changeset viewer.