From 9cc3ef30346da96f3dd7f2e328e8a5ff46a37fd9 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Wed, 22 Aug 2007 03:11:56 +0200 Subject: kbuild: ver_linux fix glibc version print Fix ver_linux glibc version printing (for real this time) Alexey Dobriyan reported that commit 4a645d5ea65baaa5736bcb566673bf4a351b2ad8 broke ver_linux when glibc has a 3 digit version number, and proposed a patch. Al Viro then suggested a simpler way to solve the problem which I've then simply put into patch form. Signed-off-by: Alexey Dobriyan Signed-off-by: Al Viro Signed-off-by: Jesper Juhl Signed-off-by: Sam Ravnborg --- scripts/ver_linux | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts/ver_linux') diff --git a/scripts/ver_linux b/scripts/ver_linux index 8f8df93141a9..5a16bad72595 100755 --- a/scripts/ver_linux +++ b/scripts/ver_linux @@ -65,9 +65,8 @@ isdnctrl 2>&1 | grep version | awk \ showmount --version 2>&1 | grep nfs-utils | awk \ 'NR==1{print "nfs-utils ", $NF}' -ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \ --e 's/\.so$//' | sed -e 's/>//' | \ -awk -F'[.-]' '{print "Linux C Library "$(NF-1)"."$NF}' +echo -n "Linux C Library " +sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \ 'NR==1{print "Dynamic linker (ldd) ", $NF}' -- cgit v1.2.3 From cc9eefdb9ed5603e2ab0b77fc1f6b671332ceeed Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Thu, 2 Aug 2007 01:21:15 +0200 Subject: 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 --- scripts/ver_linux | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scripts/ver_linux') diff --git a/scripts/ver_linux b/scripts/ver_linux index 5a16bad72595..ab69ecefedbd 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/\)$// -- cgit v1.2.3