Re: ggc: from static to extern: where is the GTY(()) ending up?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ian Lance Taylor wrote:
> Georg-Johann Lay <avr@xxxxxxxx> writes:
> 
>> for the avr prort I'd like to change some GTYed rtx from atatic to extern, i.e.
>> from
>>
>> // avr.c
>> static GTY(()) rtx var;
>>
>> to
>>
>> // avr-protos.h
>> #ifdef RTX_CODE
>> extern GTY(()) rtx var;
>> #endif /* RTX_CODE */
>>
>> // avr.c
>> rtx var;
>>
>> In the first variant I see markers generated in gt-avr.h but in the second
>> variant I cannot find any markers for var in the whole build gcc directory.
> 
> Probably avr-protos.h is not being passed to gengtype.  You would need
> to add it to target_gtfiles in config.gcc.  But most targets do not work
> that way, they just rely on the default CPU.c being passed to gengtype.
> 
> Ian

Thanks for the explanation.

Now the code is with extern GTY(()) in target.c, and the markers are as
expected, i.e. it's variant #3.

http://gcc.gnu.org/ml/gcc-patches/2012-01/msg01479.html

Johann





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux