Crosscomliling world

Rafal Jaworowski raj at semihalf.com
Sat Feb 21 09:39:15 PST 2009


Bruce Cran wrote:
> On Sat, 21 Feb 2009 17:45:46 +0100
> Rafal Jaworowski <raj at semihalf.com> wrote:
> 
>> Aleksey V Fedorov wrote:
>>> Hi!
>>>
>>> How to crosscomlile world for MPC8548 target on amd64 host?
>>> I have powerpc-binutils and powerpc-gcc installed in
>>> /usr/local/bin/powerpc-elf-eabi
>>> Is there standard method to make crossbuild?
> 
>> The regular way is the following:
>>
>> make buildworld TARGET_ARCH=powerpc TARGET_CPUTYPE=e500
>>
>> (This creates cross toolchain at the beginning of the build process)
> 
> You'll probably want to update to a newer version of gcc than
> 4.2.1 because I believe the MPC8548 (e500v2) was only supported from
> early 2008.

I'm not following details of gcc development too closely, but e500 support has
been around for a long time (we started the e500 port with FreeBSD 6.0 i.e.
gcc 3.x). So far the in-tree toolchain was sufficient to produce machine code
runnign on e500v1, v2 and v3 without immediate shortages (BTW there are
problems of this nature with another Book-E implementation, PPC4xx: the
current FreeBSD toolchain needs to be adjusted to produce certain instructions
properly for it).

Older gcc (3.4.x) bundled with FreeBSD is able to produce broken PowerPC code,
but that's a different story affecting not only e500.

> I've only found instructions on blogs etc. for crosscompiling FreeBSD
> on embedded platforms - is this something that should go on the Wiki or
> in the handbook?

True, this should be improved; there are some examples on the wiki (ARM is a
bit better than PowerPC on this).

Rafal


More information about the freebsd-ppc mailing list