This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to fix i960 objc runtime build
- To: shebs at apple dot com
- Subject: Re: Patch to fix i960 objc runtime build
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Thu, 15 Mar 2001 20:03:45 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <200103160005.TAA01558@jwlab.FEITH.COM>
>> + #define REAL_TYPE _C_DBL
>
>OK, I give up. How is this supposed to work? REAL_TYPE as used in
>ROUND_TYPE_ALIGN is unrelated to the ObjC encoding char _C_DBL, at
>least as I understand the code.
The entire file is a hack. It looks like objc has some kind of way to
create new types at run-time. That requires a way to layout types at
runtime. This was implemented by copying most of layout_type from
stor-layout.c into the objc runtime file encoding.c. This includes various
macros that rely on gcc internals, such as ROUND_TYPE_ALIGN. To make that
work, the file tries to map tree.h macros into the objc runtime equivalents.
The i960 port is failing here because it uses a bit of tree.h that isn't
already mapped to some objc runtime equivalent.
The whole approach looks risky to me. A builtin function that calls into
the real layout_type function is probably a better solution.
Or maybe generalize the macros for type layout, so that it is easier
for libraries or other compilers to get the same type layout as gcc.
Jim