diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-04-18 13:22:26 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-04-18 13:22:26 +0200 |
commit | d9136efd7ac5f7655376057e0ba28498a975216b (patch) | |
tree | 43f285b082353f2224c1054570a54a3d39fbca77 | |
parent | b65e7f629ef3cd655eb9a2a6f47530e5fd098ae3 (diff) | |
download | busybox-w32-d9136efd7ac5f7655376057e0ba28498a975216b.tar.gz busybox-w32-d9136efd7ac5f7655376057e0ba28498a975216b.tar.bz2 busybox-w32-d9136efd7ac5f7655376057e0ba28498a975216b.zip |
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>
-rwxr-xr-x | scripts/gcc-version.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/gcc-version.sh b/scripts/gcc-version.sh index 34510804f..9376ed4fb 100755 --- a/scripts/gcc-version.sh +++ b/scripts/gcc-version.sh | |||
@@ -8,5 +8,5 @@ | |||
8 | 8 | ||
9 | compiler="$*" | 9 | compiler="$*" |
10 | 10 | ||
11 | MAJ_MIN=$(echo __GNUC__ __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1) | 11 | MAJ_MIN=$(echo __GNUC__ __GNUC_MINOR__ | $compiler -E -xc - | grep . | tail -n 1) |
12 | printf '%02d%02d\n' $MAJ_MIN | 12 | printf '%02d%02d\n' $MAJ_MIN |