]> xenbits.xensource.com Git - livepatch-build-tools.git/commitdiff
livepatch-gcc: Allow toolchain command with versions
authorPawel Wieczorkiewicz <wipawel@amazon.de>
Wed, 21 Aug 2019 08:20:37 +0000 (08:20 +0000)
committerRoss Lagerwall <ross.lagerwall@citrix.com>
Thu, 22 Aug 2019 14:27:25 +0000 (15:27 +0100)
Xen build system may enforce particular gcc version (e.g. gcc72).
Make sure the livepatch-gcc script accepts all input toolchain gcc
commands with or without version specified.

Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Reviewed-by: Martin Mazein <amazein@amazon.de>
Reviewed-by: Bjoern Doebel <doebel@amazon.de>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
livepatch-gcc

index 634157a98b0a5bfc1733e5c6c980beb85a232ec6..617f86565dcc2e200ddf7dd72e2683ec423b0170 100755 (executable)
@@ -25,7 +25,8 @@ shift
 declare -a args=("$@")
 keep=no
 
-if [[ "$TOOLCHAINCMD" = "gcc" ]] ; then
+declare -r GCC_RE='gcc.*'
+if [[ "$TOOLCHAINCMD" =~ $GCC_RE ]] ; then
     while [ "$#" -gt 0 ]; do
         if [ "$1" = "-o" ]; then
             obj=$2