[haiku-development] Hybrid GCC2/GCC4 build under R5

Hi all

As BeOS R5 (BONE in fact) is my pretty much only operating system, I 
was inclined to build a GCC2/GCC4 hybrid image under R5. The cross-
compiler has been built and is available at 
http://haiku.mlotz.ch/haiku_cross_compiler_bone_4.1.2-haiku-080531.zip 
(unzip to /boot) and can be used with "--crosst-tools-prefix /boot/apps
/haiku-gcc4/cross-tools/bin/i586-pc-haiku-". There are two things that 
keep a full build from working though.

The first being that the syscalls.h.pp (at generated-gcc4/objects/haiku
/x86/common/tools/gensyscalls) used by gensyscalls is built using the 
GCC4 headers including the GCC4 stdarg.h which does a "typedef 
__builtin_va_list __gnuc_va_list;". As gensyscalls is built as a 
buildtool however and therefore built using the BeOS host GCC2 which 
doesn't provide a "__builtin_va_list", compilation fails. An easy way 
to work around that was to add a conditional "typedef void *
__builtin_va_list;" to "src/tools/gensyscalls/gensyscalls.h" when built 
with GCC2. As I don't have a linux build environment though I cannot 
test if this affects cross-compilation with other GCC2 hosts.

The other thing keeping a hybrid build from completing is that the 
zipup tool is built for the host platform. Both headers "src/bin/zip/
beos/zipup.h" and "src/tools/zip/unix/zipup.h" are identical, but as 
they do not include a header guard, they clash when zipup is built for 
a BeOS host.

I have attached a diff that 

Other related posts: