Setting up a build tree for a new architecture
J. Johnston
jjohnstn@redhat.com
Mon Jul 8 20:14:00 GMT 2002
"H. Peter Anvin" wrote:
>
> 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?
>
> -hpa
Not exactly step-by-step, but check out: http://sources.redhat.com/ml/newlib/2002/msg00109.html
for adding a new platform to newlib.
Note you can override the tools used when you issue the make command. There are a
number of them, all ending in _FOR_TARGET:
CC_FOR_TARGET, AS_FOR_TARGET, LD_FOR_TARGET, RANLIB_FOR_TARGET, AR_FOR_TARGET, NM_FOR_TARGET
e.g. make all-target-newlib CC_FOR_TARGET=i386-elf-gcc AS_FOR_TARGET=i386-elf-as ...
-- Jeff J.
More information about the Newlib
mailing list