Changeset 40c0483 in mainline
- Timestamp:
- 2019-08-16T20:58:02Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d3db35b
- Parents:
- 5284faa
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-07-21 14:03:59)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-08-16 20:58:02)
- Location:
- tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/build-ccheck.sh
r5284faa r40c0483 1 #!/bin/ bash1 #!/bin/sh 2 2 # 3 3 # Copyright (c) 2019 Jiri Svoboda -
tools/cc.sh
r5284faa r40c0483 1 #! /bin/bash1 #!/bin/sh 2 2 3 3 # -
tools/ccheck.sh
r5284faa r40c0483 1 #!/bin/ bash1 #!/bin/sh 2 2 # 3 3 # Copyright (c) 2018 Jiri Svoboda … … 33 33 fi 34 34 35 if [ ."$1" = = .--fix ]; then35 if [ ."$1" = .--fix ]; then 36 36 opt=--fix 37 37 else … … 49 49 outfile="$(mktemp)" 50 50 "$ccheck" $opt $fname >"$outfile" 2>&1 51 rc=$? 52 if [ .$rc == .0 ]; then 51 if [ $? -eq 0 ]; then 53 52 if [ -s "$outfile" ] ; then 54 53 srepcnt=$((srepcnt + 1)) … … 65 64 done 66 65 67 if [ $srepcnt == 0 -a $fcnt == 0 ]; then66 if [ $srepcnt -eq 0 ] && [ $fcnt -eq 0 ]; then 68 67 echo "Ccheck passed." 69 68 else -
tools/toolchain.sh
r5284faa r40c0483 1 #! /bin/bash1 #!/bin/sh 2 2 3 3 # … … 103 103 echo 104 104 105 if [ -z "$1" ] || [ "$1" = ="all" ] ; then106 PLATFORMS= ("amd64" "arm32" "arm64" "ia32" "ia64" "mips32" "mips32eb" "ppc32" "riscv64" "sparc64")105 if [ -z "$1" ] || [ "$1" = "all" ] ; then 106 PLATFORMS='amd64 arm32 arm64 ia32 ia64 mips32 mips32eb ppc32 riscv64 sparc64' 107 107 else 108 PLATFORMS= ("$1")108 PLATFORMS="$1" 109 109 fi 110 110 … … 114 114 fi 115 115 116 for i in "${PLATFORMS[@]}"116 for i in $PLATFORMS 117 117 do 118 118 PLATFORM="$i" … … 121 121 122 122 echo "== $PLATFORM ==" 123 test_app_version "Binutils" "ld" "GNU \ ld\ \(GNU\ Binutils\)\ ((\.|[0-9])+)" "$BINUTILS_VERSION"124 test_app_version "GCC" "gcc" "gcc \ version\ ((\.|[0-9])+)" "$GCC_VERSION"125 test_app_version "GDB" "gdb" "GNU \ gdb\ \(GDB\)\s+((\.|[0-9])+)" "$GDB_VERSION"123 test_app_version "Binutils" "ld" "GNU ld (.*) \([.0-9]*\)" "$BINUTILS_VERSION" 124 test_app_version "GCC" "gcc" "gcc version \([.0-9]*\)" "$GCC_VERSION" 125 test_app_version "GDB" "gdb" "GNU gdb (.*)[[:space:]]\+\([.0-9]*\)" "$GDB_VERSION" 126 126 done 127 127 … … 140 140 echo "- $PKGNAME is missing" 141 141 else 142 { 143 OUT=$(${APP} -v 2>&1) 144 } &> /dev/null 145 146 if [[ "$OUT" =~ $REGEX ]]; then 147 VERSION="${BASH_REMATCH[1]}" 148 if [ "$INS_VERSION" = "$VERSION" ]; then 149 echo "+ $PKGNAME is uptodate ($INS_VERSION)" 150 else 151 echo "- $PKGNAME ($VERSION) is outdated ($INS_VERSION)" 152 fi 153 else 154 echo "- $PKGNAME Unexpected output" 155 fi 142 VERSION=`${APP} -v 2>&1 | sed -n "s:^${REGEX}.*:\1:p"` 143 144 if [ -z "$VERSION" ]; then 145 echo "- $PKGNAME Unexpected output" 146 return 1 147 fi 148 149 if [ "$INS_VERSION" = "$VERSION" ]; then 150 echo "+ $PKGNAME is uptodate ($INS_VERSION)" 151 else 152 echo "- $PKGNAME ($VERSION) is outdated ($INS_VERSION)" 153 fi 156 154 fi 157 155 } … … 160 158 161 159 change_title() { 162 echo -en"\e]0;$1\a"160 printf "\e]0;$1\a" 163 161 } 164 162 … … 171 169 fi 172 170 173 echo -n"${TM} "171 printf "${TM} " 174 172 change_title "${TM}" 175 173 sleep 1 … … 222 220 OUTSIDE="$1" 223 221 BASE="$2" 224 ORIGINAL="`pwd`" 222 ORIGINAL="$PWD" 223 224 cd "${BASE}" 225 check_error $? "Unable to change directory to ${BASE}." 226 ABS_BASE="$PWD" 227 cd "${ORIGINAL}" 228 check_error $? "Unable to change directory to ${ORIGINAL}." 225 229 226 230 mkdir -p "${OUTSIDE}" 227 228 231 cd "${OUTSIDE}" 229 232 check_error $? "Unable to change directory to ${OUTSIDE}." 230 ABS_OUTSIDE="`pwd`" 231 232 cd "${BASE}" 233 check_error $? "Unable to change directory to ${BASE}." 234 ABS_BASE="`pwd`" 233 234 while [ "${#PWD}" -gt "${#ABS_BASE}" ]; do 235 cd .. 236 done 237 238 if [ "$PWD" = "$ABS_BASE" ]; then 239 echo 240 echo "CROSS_PREFIX cannot reside within the working directory." 241 242 exit 5 243 fi 235 244 236 245 cd "${ORIGINAL}" 237 246 check_error $? "Unable to change directory to ${ORIGINAL}." 238 239 BASE_LEN="${#ABS_BASE}"240 OUTSIDE_TRIM="${ABS_OUTSIDE:0:${BASE_LEN}}"241 242 if [ "${OUTSIDE_TRIM}" == "${ABS_BASE}" ] ; then243 echo244 echo "CROSS_PREFIX cannot reside within the working directory."245 246 exit 5247 fi248 247 } 249 248
Note:
See TracChangeset
for help on using the changeset viewer.