Cross-Compiler

Matthew Hawkins matt at mh.dropbear.id.au
Sat Sep 28 14:22:34 EST 2002


Andreas Bauer (baueran at in.tum.de) wrote:
> Hi All,
> 
> I've had a chat with some of you about this last night at the CLUG
> meeting:  I'm having difficulties getting a cross-compiler for (say)
> arm-elf to work.
> 
> 1. I can configure and install the binutils for this platform.  But
>    that's about it.  Can someone shed some light on how to go from here?

I don't think kernel sources or glibc are relevent (at this point)

After you have the cross binutils (ie, 'as' will generate arm assembly
and 'ld' is happy to link them) you can simply bootstrap a
cross-compiling gcc using that binutils, so that using the -b switch to
gcc you can select native (which you usually make the default ;) or arm
binaries.

This is where the kernel, glibc, and anything else come in - you can now
build them for either platform by setting -b appropriately.

If you search google for gcc cross compiler there's bound to be lots of
useful information on creating a cross-compiling setup (there was last
time I checked when building one for sparc/solaris and i386/freebsd)

Cheers,

-- 
Matt                  "Our products just aren't engineered for security"
                            -- Brian Valentine, Microsoft Senior Vice-President
			       in charge of Windows development team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux/attachments/20020928/d30b80aa/attachment.bin


More information about the linux mailing list