This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Getting host and target size and alignment information at build time?
On Sat, 2008-04-12 at 18:16 +1000, Tim Josling wrote:
> On Fri, 2008-04-11 at 17:05 -0400, Daniel Jacobowitz wrote:
> > On Sat, Apr 12, 2008 at 06:59:28AM +1000, Tim Josling wrote:
> > > > Why not get it out of GCC later? You don't need to hack up GCC to do
> > > > that.
> You're right... That's more or less what I think I will do. I'm working
> on a proof of concept at the moment.
Here is the proof of concept for getting the type information out of the
gcc back end. It was not as hard as I expected in the end.
cob2.c:
http://cobolforgcc.cvs.sourceforge.net/cobolforgcc/gcc/gcb/cob2.c?revision=1.1&view=markup
See get_build_types () and get_target_types ()
Called from script cob1.sh:
http://cobolforgcc.cvs.sourceforge.net/cobolforgcc/gcc/gcb/cob1.sh?revision=1.1
Used by type-info.lisp:
http://cobolforgcc.cvs.sourceforge.net/cobolforgcc/gcc/gcb/type-info.lisp?revision=1.1&view=markup
See defun init-type-info
Any comments or suggestions welcome. Thanks for your ideas Daniel.
Tim Josling