{
int i;
int found_c_opt = 0;
+ int found_S_opt = 0;
char *input_file = NULL;
stripped_args = args_init();
found_c_opt = 1;
continue;
}
+
+ /* -S changes the default extension */
+ if (strcmp(argv[i], "-S") == 0) {
+ args_add(stripped_args, argv[i]);
+ found_S_opt = 1;
+ continue;
+ }
/* we need to work out where the output was meant to go */
if (strcmp(argv[i], "-o") == 0) {
cc_log("badly formed output_file %s\n", output_file);
failed();
}
- p[1] = 'o';
+ p[1] = found_S_opt ? 's' : 'o';
p[2] = 0;
#if 0
cc_log("Formed output file %s from input_file %s\n",