Skip to content

Commit

Permalink
scripts/ver_linux use 'gcc -dumpversion'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gabriel C authored and sravnborg committed May 25, 2008
1 parent eb90d81 commit 656a3f7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/ver_linux
Expand Up @@ -12,12 +12,9 @@ echo ' '
uname -a
echo ' '

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

gcc --version 2>&1| grep gcc | awk \
'NR==1{print "Gnu C ", $3}'

make --version 2>&1 | awk -F, '{print $1}' | awk \
'/GNU Make/{print "Gnu make ",$NF}'

Expand Down

0 comments on commit 656a3f7

Please sign in to comment.