biarch gcc

Peter Bergner bergner@vnet.ibm.com
Tue Aug 12 21:15:00 GMT 2003


Andreas Jaeger wrote:
> Alan Modra <amodra@bigpond.net.au> writes:
>>Secondly, getting header files right is not so easy.  Typically, some 32
>>bit headers are different from the corresponding 64 bit header.  It's
>>possible to hack around this problem by creating lots of stubs that test
>>__powerpc64__ and then include the real header, or by using esoteric
>>-isystem gcc options.  You also need to deal with patched headers
>>installed by fixincludes, which might get in the way of such hacks.
> 
> 
> The Glibc headers for sparc, s390 and x86_64 were written with that in
> mind and do not have any problems that I'm aware of.  What problems
> exactly do you have?

I believe Alan was talking about kernel headers here and not GLIBC headers.
The stub workaround Alan speaks of is the same workaround you (ie, SuSE) used
on SLES8.  For example:

     cannon% cat /usr/include/asm/unistd.h
     #ifndef __PPC_ASM_STUB__UNISTD_H__
     #define __PPC_ASM_STUB__UNISTD_H__
     #ifdef __powerpc64__
     #include <asm-ppc64/unistd.h>
     #else
     #include <asm-ppc/unistd.h>
     #endif
     #endif


Peter





More information about the Gcc mailing list