OSDN Git Service

[PATCH] scripts : ver_linux does not report recent binutils version
authorWilly TARREAU <willy@pcw.(none)>
Sun, 7 May 2006 19:53:31 +0000 (21:53 +0200)
committerWilly TARREAU <willy@pcw.(none)>
Sun, 7 May 2006 19:53:31 +0000 (21:53 +0200)
The 'ver_linux' script expects 'ld' to output a line starting with
'BFD', while recent versions of 'ld' print 'GNU ld'. The effect is
that binutils version is not listed in reports based on ver_linux.

The following trivial fix makes it do the right thing as 2.6 does.
Initially reported by Joshua Kwan. Tested and works.

Signed-off-by: Willy Tarreau <willy@w.ods.org>
- Willy

scripts/ver_linux

index 7c32eec..f9194b2 100644 (file)
@@ -22,7 +22,8 @@ make --version 2>&1 | awk -F, '{print $1}' | awk \
       '/GNU Make/{print "Gnu make              ",$NF}'
 
 ld -v 2>&1 | awk -F\) '{print $1}' | awk \
-      '/BFD/{print "binutils              ",$NF}'
+      '/BFD/{print "binutils              ",$NF} \
+       /^GNU/{print "binutils              ",$4}'
 
 fdformat --version | awk -F\- '{print "util-linux            ", $NF}'