[livepatch-build-tools,1/4] livepatch-gcc: Allow toolchain command with versions
diff mbox series

Message ID 20190408083224.104802-1-wipawel@amazon.de
State New, archived
Headers show
Series
  • [livepatch-build-tools,1/4] livepatch-gcc: Allow toolchain command with versions
Related show

Commit Message

Wieczorkiewicz, Pawel April 8, 2019, 8:32 a.m. UTC
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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ross Lagerwall April 29, 2019, 12:27 p.m. UTC | #1
On 4/8/19 9:32 AM, Pawel Wieczorkiewicz wrote:
> 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>

Patch
diff mbox series

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