This is the mail archive of the 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: libobjc

On 13 Mar 1999 14:22:54 -0800, (Marcus G. 
Daniels) wrote:

> Ok, I've taken the libobjc sources and put them in an automake package.
> Here's the first pass:
> To make this work, I had to add a few more values to cc1obj's
> -print-objc-runtime-info option [patch below].  Missing is support for
> i960).  But from the absence of a replacement macro for TYPE_MODE in
> encoding.c, it looks to me like the AIX must have been broken.
> Perhaps the thing to do for these cases is to adapt the GCC
> macros into standalone routines...

Yes, I've taken a look at the target macros for AIX and I cannot see how
encoding.c compiles on AIX. Anyway, I think the correct definition for it would


Regarding the ADJUST_FIELD_ALIGN and ROUND_TYPE_{ALIGN,SIZE} macros, these are
perhaps the most important ones in defining the memory layout of a structure.
The approach taken in encoding.c was to try avoiding writing a separate version
that could be included in a runtime library. Writing such a version would
require extensive knowledge from the compiler moved outside of it, which is not
quite easy. We would have to come up with data structures and an implementation
that works outside the compiler and basically duplicates those inside the

One thing you can try is to pack as strings inside a C file the macros defined
at the top of encoding.c. In the same file you can also add automatically,
using a perl or shell/sed/awk script, the needed macro definitions from the
target file as strings. This C file could then be linked in the compiler and
the strings defined could be printed out when -print-objc-runtime-info is
passed to the compiler. Getting the appropriate definitions from the target
files could be made easy by adding some hooks as comments that could be easily
looked up by your script. I think this approach could solve your problem in a
pretty easy way.


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