summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gcc-version.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gcc-version.sh b/scripts/gcc-version.sh
index 9376ed4..0eb27c7 100755
--- a/scripts/gcc-version.sh
+++ b/scripts/gcc-version.sh
@@ -7,6 +7,6 @@
#
compiler="$*"
-
-MAJ_MIN=$(echo __GNUC__ __GNUC_MINOR__ | $compiler -E -xc - | grep . | tail -n 1)
+# tr -d '\r': fix up msdos-style line endings (Cygwin et al)
+MAJ_MIN=$(echo __GNUC__ __GNUC_MINOR__ | $compiler -E -xc - | tr -d '\r' | tail -n 1)
printf '%02d%02d\n' $MAJ_MIN