gcc-version.sh: Cygwin fix
On Cygwin, "echo __GNUC__ __GNUC_MINOR__ | gcc -E -xc -" can print extra empty trailing line. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
b65e7f629e
commit
d9136efd7a
@ -8,5 +8,5 @@
|
||||
|
||||
compiler="$*"
|
||||
|
||||
MAJ_MIN=$(echo __GNUC__ __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
|
||||
MAJ_MIN=$(echo __GNUC__ __GNUC_MINOR__ | $compiler -E -xc - | grep . | tail -n 1)
|
||||
printf '%02d%02d\n' $MAJ_MIN
|
||||
|
Loading…
Reference in New Issue
Block a user