Changeset 59564e6 in mainline
- Timestamp:
- 2018-12-21T20:42:09Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- accdbd8
- Parents:
- a49c39c8 (diff), cb15b49c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jakub Jermář <jakub@…> (2018-12-21 20:42:09)
- git-committer:
- GitHub <noreply@…> (2018-12-21 20:42:09)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/toolchain.sh
ra49c39c8 r59564e6 61 61 echo "Syntax:" 62 62 echo " $0 [--no-install] [--non-helenos-target] <platform>" 63 echo " $0 --test-version [<platform>]" 63 64 echo 64 65 echo "Possible target platforms are:" … … 95 96 } 96 97 98 test_version() { 99 echo "Cross-compiler toolchain build script" 100 echo 101 echo "Start testing the version of the installed software" 102 echo 103 104 if [ -z "$1" ] || [ "$1" == "all" ] ; then 105 PLATFORMS=("amd64" "arm32" "ia32" "ia64" "mips32" "mips32eb" "ppc32" "riscv64" "sparc64") 106 else 107 PLATFORMS=("$1") 108 fi 109 110 111 if [ -z "${CROSS_PREFIX}" ] ; then 112 CROSS_PREFIX="/usr/local/cross" 113 fi 114 115 for i in "${PLATFORMS[@]}" 116 do 117 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 done 126 127 exit 128 } 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 ]; then 139 echo "- $PKGNAME is missing" 140 else 141 { 142 OUT=$(${APP} -v 2>&1) 143 } &> /dev/null 144 145 if [[ "$OUT" =~ $REGEX ]]; then 146 VERSION="${BASH_REMATCH[1]}" 147 if [ "$INS_VERSION" = "$VERSION" ]; then 148 echo "+ $PKGNAME is uptodate ($INS_VERSION)" 149 else 150 echo "- $PKGNAME ($VERSION) is outdated ($INS_VERSION)" 151 fi 152 else 153 echo "- $PKGNAME Unexpected output" 154 fi 155 fi 156 } 157 158 159 97 160 change_title() { 98 161 echo -en "\e]0;$1\a" … … 408 471 while [ "$#" -gt 1 ] ; do 409 472 case "$1" in 473 --test-version) 474 test_version "$2" 475 exit 476 ;; 410 477 --no-install) 411 478 REAL_INSTALL=false … … 427 494 428 495 case "$1" in 496 --test-version) 497 test_version 498 ;; 429 499 amd64|arm32|ia32|ia64|mips32|mips32eb|ppc32|riscv64|sparc64) 430 500 prepare
Note:
See TracChangeset
for help on using the changeset viewer.