- $strip = 1;
- push @new_args, "-fnesc-mingw-gcc";
- }
- elsif (/^-v$/) {
- $verbose = 1;
- }
- elsif (/^-conly$/) {
- $strip = 1;
- push @new_args, "-fnesc-conly";
- push @new_args, "-fsyntax-only";
+ push @nescc_args, "-fnesc-mingw-gcc";
+ } elsif (/^-conly$/) {
+ $ENV{NESCC_CONLY} = "yes";
+ push @nescc_args, "-fsyntax-only";
+ } elsif (/^-fnesc-cfile=(.*)$/) {
+ $ENV{NESCC_CFILE} = $1;
+ } elsif (/^-_?fnesc-deputy$/) {
+ $ENV{NESCC_DEPUTY} = "yes";
+ } elsif (/^-_?fnesc-deputy-args=(.*)$/) {
+ $ENV{NESCC_DEPUTY_ARGS} = $1;
+ } elsif (/^(-(f|W|Wno-)nesc.*)$/) {
+ # Don't confuse the non-nesC frontends with our -f and -W
+ # flags (these were ignored in earlier C/etc frontends,
+ # but current ones give error messages, preventing nescc
+ # from compiling C files)
+ push @nescc_args, $1;
+ } elsif (/^-([IDUAo])/) {
+ $opt = $1;
+ ($i, $val) = &extractarg($i);
+ push @new_args, "-$opt", $val;
+ } elsif (/^(-include|-idirafter|-imacro|-iprefix|-iwithprefix|-iwithprefixbefore|-isystem|-isysroot|-X[a-zA-Z]*|--param)$/) {
+ $opt = $1;
+ ($i, $arg) = &nextarg($i);
+ push @new_args, $opt, $arg;
+ } else {
+ push @new_args, $_;