[OpenBIOS] PPC cross-compiler defaults to 'powerpc-linux-gnu-' prefix

Segher Boessenkool segher at kernel.crashing.org
Thu Nov 26 22:19:45 CET 2009


>>> While setting up a PPC cross-compiler environment for OpenBIOS, I
>>> noticed that the default cross-compiler prefix is set to
>>> 'powerpc-linux-gnu-' as opposed to 'powerpc-elf-'.
>>>
>> Is there any reason you want -elf instead of -eabi? :-)
>>
> Just the crazy assumption there's a generic pattern behind all the
> target names.
>
> -eabi is probably the right one.

EABI is the modern ABI on pretty much all architectures.  It's the
same as -elf on some archs; -elf is an older ABI on some other archs.

If your build system allows pretty much any compiler, it would be wise
for it to select the ABI itself; in that case, it doesn't matter what
the compiler used defaults to.

>> Use --without-headers, and maybe some of the --disable-* flags,
>> and you don't need glibc (or any other C library).  Oh, and
>> --enable-languages=c of course.
>>
> interesting... That builds glibc-free linux compilers?

Yes, with the resulting compiler you cannot build anything that uses
the C library; it is just fine for anything that doesn't need those
user-space interfaces, like building a firmware or an OS kernel.

You can use my build scripts if you want, they work for most  
architectures,
only a few need some simple patches:
http://git.infradead.org/users/segher/buildall.git


Segher




More information about the OpenBIOS mailing list