[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 04/21] configure: Avoid use of param. expansion when using gdb
From: |
Alex Bennée |
Subject: |
[PATCH v2 04/21] configure: Avoid use of param. expansion when using gdb_version |
Date: |
Tue, 13 Aug 2024 21:23:12 +0100 |
From: Gustavo Romero <gustavo.romero@linaro.org>
$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 <gustavo.romero@linaro.org>
Message-Id: <20240804161850.2646299-3-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240807114059.2339021-5-alex.bennee@linaro.org>
---
configure | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
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
--
2.39.2
- [PATCH v2 00/21] Various fixes and tweaks for 9.1-rc2/3, Alex Bennée, 2024/08/13
- [PATCH v2 02/21] Makefile: trigger re-configure on updated pythondeps, Alex Bennée, 2024/08/13
- [PATCH v2 04/21] configure: Avoid use of param. expansion when using gdb_version,
Alex Bennée <=
- [PATCH v2 01/21] tests/avocado: Re-enable gdbsim-r5f562n8 testing U-Boot, Alex Bennée, 2024/08/13
- [PATCH v2 06/21] scripts/checkpatch: more checks on files imported from Linux, Alex Bennée, 2024/08/13
- [PATCH v2 05/21] configure: Fix GDB version detection for GDB_HAS_MTE, Alex Bennée, 2024/08/13
- [PATCH v2 03/21] configure: Fix arch detection for GDB_HAS_MTE, Alex Bennée, 2024/08/13
- [PATCH v2 08/21] buildsys: Fix building without plugins on Darwin, Alex Bennée, 2024/08/13
- [PATCH v2 09/21] scripts/replay-dump.py: Update to current rr record format, Alex Bennée, 2024/08/13
- [PATCH v2 07/21] target/i386: allow access_ptr to force slow path on failed probe, Alex Bennée, 2024/08/13
- [PATCH v2 11/21] tests/avocado: excercise scripts/replay-dump.py in replay tests, Alex Bennée, 2024/08/13
- [PATCH v2 14/21] tests/avocado: replay_kernel.py add x86-64 q35 machine test, Alex Bennée, 2024/08/13