Setting up a build tree for a new architecture

H. Peter Anvin
Mon Jul 8 17:24:00 GMT 2002

Okay, I have to admit it, I'm stumped...

I'm trying to add my system platform to the newlib tree and compile it,
but I'm having a horrible time.  I don't want to create a whole setup
with gcc at al if I can at all avoid it (the target is an i386-based
platform using ELF at least as intermediate format, as is the host.)

I have added my new platform, i386-pc-com32, to config.sub, and since
newlib seems to insist on calling i386-pc-com32-<toolname> for all the
tools (gcc, ld, ar, ...) I set up symlinks for them.

No luck.  ./configure --target=i386-pc-com32 sets up an
i386-pc-com32/newlib directory, but then seems to expect to find files
in i386-pc-com32/newlib/.. that are actually in the newlib source root.

I hacked around this by adding symlinks when I found them, and
eventually got *something* to compile -- only to find that it had build
libc/sys/linux instead of linux/sys/com32.

I'm completely confused.  Is there anywhere a step-by-step description
on how to add a platform to newlib?


More information about the Newlib mailing list