From: Jesper Juhl Date: Wed, 1 Aug 2007 23:21:15 +0000 (+0200) Subject: kbuild: scripts/ver_linux : correct printing of binutils version X-Git-Tag: v2.6.24-rc1~830^2~30 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc9eefdb9ed5603e2ab0b77fc1f6b671332ceeed;p=linux-2.6 kbuild: scripts/ver_linux : correct printing of binutils version Currently scripts/ver_linux prints "Binutils" or other random information for the version number in the "binutils" output line on some distributions. This patch corrects that. When I initially submitted a patch to correct that, I was not aware that the output from "ld -v" could differ as much as it turned out it can, so my original fix turned out to not cover all bases. This patch works correctly with all the different "ld -v" output that people posted in replys to my first patch, so it should be a clear win over what we have currently. Signed-off-by: Jesper Juhl Signed-off-by: Sam Ravnborg --- diff --git a/scripts/ver_linux b/scripts/ver_linux index 5a16bad725..ab69ecefed 100755 --- a/scripts/ver_linux +++ b/scripts/ver_linux @@ -21,9 +21,7 @@ gcc --version 2>&1| grep gcc | awk \ make --version 2>&1 | awk -F, '{print $1}' | awk \ '/GNU Make/{print "Gnu make ",$NF}' -ld -v | awk -F\) '{print $1}' | awk \ -'/BFD/{print "binutils ",$NF} \ -/^GNU/{print "binutils ",$4}' +echo "binutils $(ld -v | egrep -o '[0-9]+\.[0-9\.]+')" echo -n "util-linux " fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$//