I have a question about OPTION_DEFAULT_SPECS and default flag settings. During a MIPS GCC build one can configure with --with-synci or --without-synci (without is the default) and gcc.config sets with_synci to either "synci" or "no-synci" as appropriate.
In mips.opt is: msynci Target Report Mask(SYNCI) Use synci instruction to invalidate i-cache And in mips.h we set OPTION_DEFAULT_SPECS to include: {"synci", "%{!msynci:%{!mno-synci:-m%(VALUE)}} So my understanding is that if a user on the GCC command line does not specify -msynci or -mno-synci, GCC will add the flag itself, using one or the other depending on the default set when configuring. My question is: When checking the value of TARGET_SYNCI is there anyway to tell if the flag was set explicitly by the user or implicitly by the compiler? The reason I want to know is that if I build GCC for MIPS today and configure with --with-synci then some tests fail because the test specifies an old MIPS architecture that doesn't support synci and the test prints a warning: if (TARGET_SYNCI && !ISA_HAS_SYNCI) { warning (0, "the %qs architecture does not support the synci " "instruction", mips_arch_info->name); target_flags &= ~MASK_SYNCI; } Ideally, this warning should only be printed if the user explicitly asked for -msynci, not if -msynci was merely set as the default. But I am not sure how to tell the difference between those two situations. Steve Ellcey sell...@mips.com