From 0800bf188d7895b0e48de95686b844526601e7df Mon Sep 17 00:00:00 2001 From: Pawel Wieczorkiewicz Date: Wed, 21 Aug 2019 08:20:37 +0000 Subject: [PATCH] livepatch-gcc: Allow toolchain command with versions 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 Reviewed-by: Martin Mazein Reviewed-by: Bjoern Doebel Reviewed-by: Ross Lagerwall Signed-off-by: Ross Lagerwall --- livepatch-gcc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/livepatch-gcc b/livepatch-gcc index 634157a..617f865 100755 --- a/livepatch-gcc +++ b/livepatch-gcc @@ -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 -- 2.39.5