This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: OPTION_DEFAULT_SPECS question
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Steve Ellcey <sellcey at mips dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 30 May 2012 14:27:54 -0400
- Subject: Re: OPTION_DEFAULT_SPECS question
- References: <c1c2d934-d692-4390-90a5-80a5b0f0fad2@EXCHHUB01.MIPS.com>
On Wed, May 30, 2012 at 1:39 PM, Steve Ellcey <sellcey@mips.com> wrote:
>
> 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.
I think you want to examine target_flags_explicit.
- David