hash collisions. For instance, the compiler options `-X -Y` and `-X-Y`
previously contributed equally to the hash sum.
- - Bail out on too hard compiler options `--coverage`, `-arch`,
- `-fprofile-arcs`, `-fprofile-generate`, `-fprofile-use`,
- `-ftest-coverage` and `-save-temps`. Also bail out on `@file` style
- options.
+ - Bail out on too hard compiler options `--coverage`, `-fprofile-arcs`,
+ `-fprofile-generate`, `-fprofile-use`, `-ftest-coverage` and
+ `-save-temps`. Also bail out on `@file` style options.
+
+ - Errors when using multiple `-arch` compiler options are now noted as
+ ``unsupported compiler option''.
- `-MD`/`-MMD` options without `-MT`/`-MF` are now handled correctly.
int i;
int found_c_opt = 0;
int found_S_opt = 0;
+ int found_arch_opt = 0;
struct stat st;
/* is the dependency makefile name overridden with -MF? */
int dependency_filename_specified = 0;
strcmp(argv[i], "--coverage") == 0 ||
strcmp(argv[i], "-M") == 0 ||
strcmp(argv[i], "-MM") == 0 ||
- strcmp(argv[i], "-arch") == 0 ||
strcmp(argv[i], "-fbranch-probabilities") == 0 ||
strcmp(argv[i], "-fprofile-arcs") == 0 ||
strcmp(argv[i], "-fprofile-generate") == 0 ||
}
}
+ /* Multiple -arch options are too hard. */
+ if (strcmp(argv[i], "-arch") == 0) {
+ if (found_arch_opt) {
+ cc_log("More than one -arch compiler option"
+ " is unsupported");
+ stats_update(STATS_UNSUPPORTED);
+ failed();
+ } else {
+ found_arch_opt = 1;
+ }
+ }
+
/* we must have -c */
if (strcmp(argv[i], "-c") == 0) {
args_add(stripped_args, argv[i]);