]> xenbits.xensource.com Git - people/wipawel/livepatch-build-tools/commitdiff
livepatch-gcc: Allow toolchain command with versions
authorPawel Wieczorkiewicz <wipawel@amazon.de>
Thu, 20 Sep 2018 17:58:03 +0000 (17:58 +0000)
committerPawel Wieczorkiewicz <wipawel@amazon.de>
Tue, 6 Aug 2019 12:51:17 +0000 (12:51 +0000)
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>
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