Skip to content

Commit 656a3f7

Browse files
Gabriel Csravnborg
authored andcommitted
scripts/ver_linux use 'gcc -dumpversion'
These magic greps and hacks in ver_linux to get the gcc version always break after some gcc releases. Since now gcc >4.3 allows compiling with '--with-pkgversion' ( which can be everything 'My Cool Gcc' or something ) ver_linux will report random junk for these. Simply use 'gcc -dumpversion' to get the gcc version which should always work. Signed-off-by: Gabriel C <nix.or.die@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent eb90d81 commit 656a3f7

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎scripts/ver_linux‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@ echo ' '
1212
uname -a
1313
echo ' '
1414

15-
gcc --version 2>&1| head -n 1 | grep -v gcc | awk \
15+
gcc -dumpversion 2>&1| awk \
1616
'NR==1{print "Gnu C ", $1}'
1717

18-
gcc --version 2>&1| grep gcc | awk \
19-
'NR==1{print "Gnu C ", $3}'
20-
2118
make --version 2>&1 | awk -F, '{print $1}' | awk \
2219
'/GNU Make/{print "Gnu make ",$NF}'
2320

0 commit comments

Comments
 (0)