mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
trees: correction on check_gnu_path
i intend for this function to work generically, matching gnat to gcc or gcc to gnat, but there was a hangover from the previous code where it specifically assumed we were matching gnat this bug manifested when i tested with gnat being v13 and gcc being v14 in path, where gcc-13 was also available in path. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+2
-2
@@ -232,7 +232,7 @@ check_gnu_path()
|
||||
eval "[ \"\$$_gnuarg\" = \"gnat\" ] && continue"
|
||||
$err "check_gnu_path: Invalid argument \"$_gnuarg\""
|
||||
done
|
||||
command -v $1 1>/dev/null || $err "Host gcc unavailable"
|
||||
command -v $1 1>/dev/null || $err "Host '$1' unavailable"
|
||||
|
||||
eval `setvars "" gccver gccfull gnatver gnatfull gccdir gnatdir`
|
||||
gnu_setver "$1" "$1" || $err "Command '$1' unavailable."
|
||||
@@ -246,7 +246,7 @@ check_gnu_path()
|
||||
for _gnubin in "$_gnudir/$2-"*; do
|
||||
[ -f "$_gnubin" ] || continue
|
||||
[ "${_gnubin#"$_gnudir/$2-"}" = "$_gnuver" ] || continue
|
||||
gnatver="${_gnubin#"$_gnudir/$2-"}"; break
|
||||
_gnuver="${_gnubin#"$_gnudir/$2-"}"; break
|
||||
done
|
||||
gnu_setver "$2" "$_gnudir/$2-$_gnuver" || return 1
|
||||
[ "$gnatfull" = "$gccfull" ] || return 1
|
||||
|
||||
Reference in New Issue
Block a user