Anyone cross-bootstrap a GCC compiler onto a linux board?
Bill Gatliff
bgat@billgatliff.com
Wed May 14 16:16:00 GMT 2003
Bill Gatliff wrote:
> Peter:
>
>
> I've done something similar, building a Linux runtime that had pretty
> much everything except the cross development tools. I think I even
> went as far as to build binutils, but at the time it was just to see
> if I could do it. :^)
>
> Without going through it here first (I have Linux and NetBSD runtimes
> building on my workstation for other projects as we speak, my disk
> space is getting tight!), the general idea is something like:
>
> * First build a complete, glibc-based x86-hosted ppc-linux
> (x86->ppc-linux) target toolchain
> * Build a complete glibc target runtime environment, and test it
> * Use --host and --build, in addition to --target and --prefix, to
> configure your ppc-linux->ppc-linux toolchain
> * Use --program-prefix= during ppc-linux->ppc-linux configuration,
> probably --program-prefix=""
>
> Use config.guess to identify the proper --build setting, and
> --host=ppc-linux.
>
> You'll know you've got it when the "file" utility tells you that your
> ${PREFIX}/bin/gcc is a ppc-linux application, and is statically linked.
>
> I would be happy to help out later this week, today isn't such a good
> day. :^)
>
>
> HTH,
>
>
> b.g.
>
> Peter Barada wrote:
>
>> I've built a ppc-linux cross-compiler that runs on my x86 box, but
>> I'm trying to bootstrap a compiler onto the ppc board so I can build
>> code natively(or native on/for the ppc).
>>
>> To do this I'd need a ppc-linux toolchain that:
>>
>> 1) Runs on the x86 box
>> 2) Doesn't have any prefix (ppc-linux-)
>> 3) Is installed somewhere else than the system directory
>> 4) Can be used to compile a kernel and a small set of utilities(that
>> expect to find their libraris in the 'usual' places).
>> 5) Can be used to compile the compiler to produce a native
>> installation
>>
>> Has anyone done(or even tried) this before? I've started reading
>> Karim's Yaghmour book 'Building Embedded Linux Systems' (excellent
>> book by the way), and I'm thinking this would be an easier approach
>> than having to hack up software packages Makefiles to get them to
>> cross-compile.
>>
>> Does anyone have any suggestions on the best way for me to proceed?
>>
>>
>>
>
>
--
Bill Gatliff
In the dark on embedded Linux? Step into the light.
http://billgatliff.com
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list