configure: Deal with more variations of the 'ld' version output

eg, our current toolchian generates this:

   GNU ld (GNU Binutils) 2.26.1

But the system toolchain on the buildserver generates this:

   GNU ld version 2.37-37.fc36

Change-Id: I0166f12d660654c1456289954fb256db98213618
This commit is contained in:
Solomon Peachy 2023-05-22 15:53:31 -04:00
parent e7cc77e5b8
commit 56fe1129da

2
tools/configure vendored
View file

@ -4360,7 +4360,7 @@ gccver=`$CC -dumpversion`;
if [ $uname = "Darwin" ]; then
ldver=`$LD -v 2>&1 | sed -e 's/[^0-9.-]//g'`
else
ldver=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1`
ldver=`$LD --version | sed -n '1p' | sed -e 's/.* \([0-9]*\)\.\([0-9]*\).*/\1\2/'`
fi
# Convert LD version to a number major*100 + minor