aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rwxr-xr-xcgcc8
1 files changed, 8 insertions, 0 deletions
diff --git a/cgcc b/cgcc
index 33c2ba97..40004425 100755
--- a/cgcc
+++ b/cgcc
@@ -31,6 +31,14 @@ while (@ARGV) {
# Ditto for stdin.
$do_check = 1 if $_ eq '-';
+ if ($_ eq '-o') {
+ # Need to be checked explicitly since '-o -' is
+ # sometimes used and the '-' would otherwise be
+ # processed as an option.
+ die ("$0: missing argument for $_") if !@ARGV;
+ $nargs = 1;
+ }
+
$m32 = 1 if /^-m32$/;
$m64 = 1 if /^-m64$/;
$gendeps = 1 if /^-M$/;