From patchwork Thu Aug 15 14:48:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 819425 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp1197281wrm; Thu, 15 Aug 2024 07:51:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU1meJ/T6Cs5e6TVh1O4aBGmS87vpUNT0bnIbeQn9YqMiyPCi8uvWcMC4MPETKsPR1iRkqGcOsIYUryKGeqrjGe X-Google-Smtp-Source: AGHT+IFOeFdJsijCEhMI3QAieUf6jyHxHF5ossnXXBqi4BS3nn2GSMGhzh+ENW8nBLBdFQyDgiV5 X-Received: by 2002:a05:6214:c68:b0:6af:c2ec:3313 with SMTP id 6a1803df08f44-6bf6de85cf7mr52380966d6.26.1723733468249; Thu, 15 Aug 2024 07:51:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723733468; cv=none; d=google.com; s=arc-20160816; b=m5Thqxv7J+gxow5TE0UaX32T+o4VX7PalL2JYOFUVGqNun7ueBwsEfNmU/2Ihjzche qHqbCBt0C0ZhsiYc2KVf1Z5mQrb/rX5W4Fmz8T7WSVE8MwEizm+sug5Zq7yS3APvS+eK IC+4jipmTu4CAIPsK/OTLB54rfn3MYhUlidB7z8xiRJ8c2mWCtG1YbHaEpJqExG8vQYJ qPMa2Gw5V7IgCEd/uCo+leiYFAeyeQ/XcejzdFefEuSCdOIFRucvno8Nyo/GZ4IT2EVH OWgCL3eTQHFuXxQmOv4XS7saSY7/6hs5JLZotgH/fElwgI7sBIEMuyaO6fLvCSxR4fXz US7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=t1sXjiCdRpLULlo+gpPa91iiSnoCu2OdnjrYlFXOa+Q=; fh=+M+8gO26t5vlbWcGapebAnMZlKU/cMZ//ycVIxef2Bs=; b=iQQVnEG3L/c6RCSyCFfGMyWqBUV1x85+G1Szsl/yOR4WeRIfHqg6b4oXGRAgkVjdP5 59uQeFLkgYH6AAEwlmC9C+P4PHTZr+9i4/14Z3V/NgKLiH8Kq5T75fu1egznXSksA08U yrAmCyXEixcQsoY4oFyb4leYZOhNvHIYm6pteA8KQik+aQiaZUFNnF+XF6wGdmXsLOpR AKBG3JkunB2Egu41KET6+n1+jpY1IhaIbZdWURTcYrk0filoC8ddDK8Hhs4sgkUyhsFh WE1i7aVUxfkmC3+1aTuGaV9YvsexpArGx8Hq5KZCoU904qh/Dl52Lk1DloFS1aFKr3Q6 jP/w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lOG23gpL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bf6feec61bsi18716266d6.367.2024.08.15.07.51.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Aug 2024 07:51:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lOG23gpL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sebnE-0003vQ-0w; Thu, 15 Aug 2024 10:49:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sebmw-00035D-AZ for qemu-devel@nongnu.org; Thu, 15 Aug 2024 10:49:18 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sebmu-0000Bv-Du for qemu-devel@nongnu.org; Thu, 15 Aug 2024 10:49:18 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a7a975fb47eso138617766b.3 for ; Thu, 15 Aug 2024 07:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723733355; x=1724338155; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=t1sXjiCdRpLULlo+gpPa91iiSnoCu2OdnjrYlFXOa+Q=; b=lOG23gpLo3XMNzOGnFpSxr7y3AtiipuXJA/VCXYAlNy1ognpMMvvowoeWdxLnzh/QU OIDv7rm2RtxNThlRWr/rxriz9I5SUB3T1SzriEVbf3opSiS3yEPHcdTzPQJD1DjkoaRG jH0v8+xeT7S0QoOirR0Jn9SkOffXTn6jOUcOCZ89G81dr912BOSmkYtfraFNGURuFpgF a1Q+lfdAGXEjHrsIueOqtZRt2Va85NnNk9CdD/XmePzZ8sBoEpk2/3EVm92eWFnL+C3s Qg4RnxA5vbZK7G/rMF2waKgD4BKhXpT/PO9YgkLbphqHVX71juvJHd3PKlwpGdFJwGk3 +NQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723733355; x=1724338155; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t1sXjiCdRpLULlo+gpPa91iiSnoCu2OdnjrYlFXOa+Q=; b=skOgIYPHOC2B/s9UzrgbfZakg0AuA6JFh2jtXtoX0fUsomxHN8rY2gUFqCaxfa3luE hnxAekESEchj8CdDh2kQW2aeVgWM2mUtPXdfRz1N8906eQ0/3InDxMNUp8r16CtyZMUi +wBYOZ7Ywz6KuG2e666DvG9PS8cQ47vDgjPR3XDmSW1YOA8epkCkdAc3+osWKreFYoZJ y00M/YcYgcwr3JY+ALciZWYr7GHqPhsNeuWnvPG3RGCLTrmFUQe5znmqY0JngV6/UF/+ eLZWPXlG48JWWKY92T1S3/TteZupxO9swIbT3i05rVz60xWwmZP4/M+lTOvYvBTwVkLp 0jYA== X-Gm-Message-State: AOJu0YxRpyzJOazoagy9unlBhO5AfiHHaGuqF3nZPMLs7HQC51v2gTmZ PBGp/uVyzOrArSX9ZgPLrJjwhbXyABO34RKwxFhsd7qCf+hJprG9xR3gGpCJE9/AXWi+YQEt6or d X-Received: by 2002:a17:907:9448:b0:a80:f893:51bb with SMTP id a640c23a62f3a-a83670bf179mr374746266b.68.1723733354494; Thu, 15 Aug 2024 07:49:14 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a838394723asm114024166b.171.2024.08.15.07.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 07:49:12 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 16B0A5F920; Thu, 15 Aug 2024 15:49:12 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Thomas Huth Subject: [PULL 04/21] configure: Avoid use of param. expansion when using gdb_version Date: Thu, 15 Aug 2024 15:48:54 +0100 Message-Id: <20240815144911.1931487-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240815144911.1931487-1-alex.bennee@linaro.org> References: <20240815144911.1931487-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Gustavo Romero $gdb_version is now used in more than one conditional case and its usage in such cases may increase in the future. Therefore, avoid using shell parameter expansion when using it by setting gdb_version to its final form. Signed-off-by: Gustavo Romero Message-Id: <20240804161850.2646299-3-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240813202329.1237572-5-alex.bennee@linaro.org> diff --git a/configure b/configure index a3aa257fd3..97de85d710 100755 --- a/configure +++ b/configure @@ -1103,8 +1103,10 @@ fi # gdb test if test -n "$gdb_bin"; then - gdb_version=$($gdb_bin --version | head -n 1) - if version_ge ${gdb_version##* } 9.1; then + gdb_version_string=$($gdb_bin --version | head -n 1) + # Extract last field in the version string + gdb_version=${gdb_version_string##* } + if version_ge $gdb_version 9.1; then gdb_arches=$($python "$source_path/scripts/probe-gdb-support.py" $gdb_bin) else gdb_bin="" @@ -1673,7 +1675,7 @@ for target in $target_list; do echo "GDB=$gdb_bin" >> $config_target_mak fi - if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge ${gdb_version##* } 15.0; then + if test "${gdb_arches#*aarch64}" != "$gdb_arches" && version_ge $gdb_version 15.0; then echo "GDB_HAS_MTE=y" >> $config_target_mak fi