summaryrefslogtreecommitdiff
path: root/scripts/gcc-version.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gcc-version.sh')
-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 9376ed4fb..0eb27c7a6 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