This is the mail archive of the
mailing list for the GCC project.
- From: "Steve Ellcey " <sellcey at mips dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Wed, 30 May 2012 10:39:25 -0700
- Subject: OPTION_DEFAULT_SPECS question
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:
Target Report Mask(SYNCI)
Use synci instruction to invalidate i-cache
And in mips.h we set OPTION_DEFAULT_SPECS to include:
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 "
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.