ggc: from static to extern: where is the GTY(()) ending up?
Ian Lance Taylor
iant@google.com
Fri Jan 27 17:07:00 GMT 2012
Georg-Johann Lay <avr@gjlay.de> 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
More information about the Gcc-help
mailing list