This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Converting tm.h macros to functions
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: Converting tm.h macros to functions
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 18 Jun 2001 11:08:03 -0700
- cc: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
> Yes. The problem with just one or two structs is it limits your
> granularity - if you want to spread functions over more than one file
> they need to have external linkage again. I imagine 4 or 5
> well-chosen groupings would be ideal. Or one file may be good enough;
> I'm not sure.
I suggest we start with an `an_asm_output' struct, designed to contain
all the bits that are currently part of the ASM_OUTPUT macros. That's
certainly a self-contained unit -- but still large enough to give us
a real feel for how this would work. A `a_target' struct could then
simply contain an `an_asm_output' as a field.
Some functions *will* need external linkage -- that's how we'll get
sharing between all ELF platforms, for example. Where to put these
functions will be a little tricky. Ideally, we would create an `elf.c',
that got linked in with `i386.c', say. We could also #include it,
I guess, even though that's nasty beyond belief. I'm not sure if
our configury stuff currently supports linking in multiple .c files.
Thanks,
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com