This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: what causes <cpu> reasserted




Neil Booth wrote:

> Joel Sherrill wrote:-
> 
>> I am getting these in some of the *-rtems targets.  I assume
>> that something is old and moldy in some of the patches.
>> 
>> <command line>: warning: "cpu" re-asserted
>> <command line>: warning: "machine" re-asserted
>> 
>> In this case, config/i386/rtemself.h has this in it.
>> 
>> #undef CPP_PREDEFINES
>> #define CPP_PREDEFINES  "-Di386 -Drtems -D__rtems__ \
>>    -Asystem=rtems -Acpu=i386 -Amachine=i386"
> 
> 
> Try -v to see what the command line passed to cc1 is.

OK.  This helps.  I still don't know the right answer and can tell that 
fixing this is
a per-target thing.  There may be a pattern -- I don't know.  The 
sparc-rtems
re-assert is coming from the one in the rtems.h CPP_PREDEFINES
and the sparc.h: CPP_ARCH32_SPEC.  Assuming that -Acpu and -Amachine
should come from there, they should not also be in rtems.h.  Is this right?

The i386 explanation is similar but the implementation is different.  -Acpu
and -Amachine are included in the definition of CPP_CPU_SPEC in
i386.h. 

The h8300 is again similar but is defined in h8300.h in CPP_SPEC.

Is there any rhyme or reason to where these should be placed?  Previously,
they seemed to always be in CPP_PREDEFINES.  I am happy to take
them out of config/*/rtems*.h where there are conflicts but would like
to understand the right thing to do. :)

Thanks.

--joel





> 
> Neil.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]