From patchwork Mon Apr 8 08:32:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wieczorkiewicz, Pawel" X-Patchwork-Id: 10889035 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 39DC0139A for ; Mon, 8 Apr 2019 08:59:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21FE528414 for ; Mon, 8 Apr 2019 08:59:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 157C528630; Mon, 8 Apr 2019 08:59:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BB47E28414 for ; Mon, 8 Apr 2019 08:59:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDQ5W-0004wt-DA; Mon, 08 Apr 2019 08:57:10 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDQ5V-0004wo-9D for xen-devel@lists.xen.org; Mon, 08 Apr 2019 08:57:09 +0000 X-Inumbo-ID: 49c26b26-59dc-11e9-b83b-ab0784f4acb5 Received: from smtp-fw-9102.amazon.com (unknown [207.171.184.29]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 49c26b26-59dc-11e9-b83b-ab0784f4acb5; Mon, 08 Apr 2019 08:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1554713828; x=1586249828; h=from:to:cc:subject:date:message-id:mime-version; bh=gMa2Gtx4rS5BNTBrJtnX6EgyYNiBWmPuPBq8/pKN4mY=; b=JsnCy18dnam1o7CsFUffvgdGNzjXZm3Z82gGOZ2559rXO2VVaSL2xU+w B5riEixd8EuXWQIvFuMgH2l/n3NNaN99DVIfJS2iF/tMMrmnVCkhFvTYj bHE6ppV3WmkiZ6p3i8wkOEzTbp8YtxfISPHUvMqBpzMv44cYJ0w5NHXtX o=; X-IronPort-AV: E=Sophos;i="5.60,324,1549929600"; d="scan'208";a="670468171" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-1a-715bee71.us-east-1.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Apr 2019 08:32:45 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1a-715bee71.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id x388Wfek122448 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 8 Apr 2019 08:32:43 GMT Received: from EX13D05EUC003.ant.amazon.com (10.43.164.207) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 08:32:43 +0000 Received: from EX13MTAUEB001.ant.amazon.com (10.43.60.96) by EX13D05EUC003.ant.amazon.com (10.43.164.207) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 08:32:42 +0000 Received: from dev-dsk-wipawel-1a-0c4e6d58.eu-west-1.amazon.com (10.4.134.33) by mail-relay.amazon.com (10.43.60.129) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 8 Apr 2019 08:32:41 +0000 From: Pawel Wieczorkiewicz To: Date: Mon, 8 Apr 2019 08:32:21 +0000 Message-ID: <20190408083224.104802-1-wipawel@amazon.de> X-Mailer: git-send-email 2.16.5 MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [livepatch-build-tools 1/4] livepatch-gcc: Allow toolchain command with versions X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: mpohlack@amazon.de, ross.lagerwall@citrix.com, Pawel Wieczorkiewicz , konrad.wilk@oracle.com Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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