summaryrefslogtreecommitdiff
path: root/cflags.SH
diff options
context:
space:
mode:
Diffstat (limited to 'cflags.SH')
-rwxr-xr-xcflags.SH4
1 files changed, 3 insertions, 1 deletions
diff --git a/cflags.SH b/cflags.SH
index ab79c983fb..7cb593b368 100755
--- a/cflags.SH
+++ b/cflags.SH
@@ -181,12 +181,14 @@ Intel*) ;;
do
case " $ccflags " in
*"-W$opt "*) ;;
- *) case "`echo | $cc -W$opt -E - 2>&1`" in
+ *) case "`echo >_cflags.c | $cc -W$opt -c _cflags.c -o _cflags.o 2>&1`" in
*"unrecognized"*) ;;
+ *"Invalid"*) ;;
*) warn="$warn -W$opt" ;;
esac
;;
esac
+ rm -f _cflags.c cflags.o
done
;;
esac