configure: Avoid use of param. expansion when using gdb_version
$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: <20240813202329.1237572-5-alex.bennee@linaro.org>
This commit is contained in:
parent
819039a5ad
commit
34a4ef1c5c
8
configure
vendored
8
configure
vendored
@ -1103,8 +1103,10 @@ fi
|
|||||||
# gdb test
|
# gdb test
|
||||||
|
|
||||||
if test -n "$gdb_bin"; then
|
if test -n "$gdb_bin"; then
|
||||||
gdb_version=$($gdb_bin --version | head -n 1)
|
gdb_version_string=$($gdb_bin --version | head -n 1)
|
||||||
if version_ge ${gdb_version##* } 9.1; then
|
# 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)
|
gdb_arches=$($python "$source_path/scripts/probe-gdb-support.py" $gdb_bin)
|
||||||
else
|
else
|
||||||
gdb_bin=""
|
gdb_bin=""
|
||||||
@ -1673,7 +1675,7 @@ for target in $target_list; do
|
|||||||
echo "GDB=$gdb_bin" >> $config_target_mak
|
echo "GDB=$gdb_bin" >> $config_target_mak
|
||||||
fi
|
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
|
echo "GDB_HAS_MTE=y" >> $config_target_mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user