diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-02-25 18:21:31 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-02-25 21:17:42 +0100 |
commit | 4f21b05f3c28e45d283344a02391c182e0667968 (patch) | |
tree | f0618ee3213276206db92326dc37c129bbd78a16 | |
parent | 4dcaf5388d53e1d1db3188f3eee1d5a3beeceeba (diff) | |
parent | 2fe3af2334733053ba7c0911647e9ba4b16cef55 (diff) | |
download | sparse-4f21b05f3c28e45d283344a02391c182e0667968.tar.gz |
Merge branch 'fix-cgcc-gendeps' into tip
* cgcc: -MF, -MQ & -MT need an argument
* cgcc: gendeps for -MM, -MD & -MMD too
-rwxr-xr-x | cgcc | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -31,10 +31,10 @@ 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. + if (/^-(o|MF|MT|MQ)$/) { + # Need to be checked explicitly since otherwise + # the argument would be processed as a + # (non-existant) source file or as an option. die ("$0: missing argument for $_") if !@ARGV; $nargs = 1; } @@ -49,7 +49,7 @@ while (@ARGV) { $m32 = 1 if /^-m32$/; $m64 = 1 if /^-m64$/; - $gendeps = 1 if /^-M$/; + $gendeps = 1 if /^-(M|MM|MD|MMD)$/; if (/^-target=(.*)$/) { $check .= &add_specs ($1); |