Putting cross compilers into Fedora
rc040203 at freenet.de
Wed Sep 1 12:06:37 UTC 2010
On 09/01/2010 01:53 PM, Andrew Haley wrote:
> On 09/01/2010 12:48 PM, Ralf Corsepius wrote:
>> On 09/01/2010 12:41 PM, David Howells wrote:
>>> Would it be worth our while putting into Fedora basic gcc and binutils rpms
>>> for cross compilers for all the Linux arches? I keep finding the need to
>>> compile kernels for arches other than the x86_64 boxes I normally use, and I
>>> keep borrowing prebuilt compilers off others (usually Al Viro - thanks Al!) to
>>> do this.
>>> However, as the kernel advances, older compilers cease being able to compile
>>> it, so I have to go finding new compilers again.
>>> It would be much easier if I could just yum install them.
>>> Any thoughts on whether it would be worthwhile?
>> I'd welcome it.
>> However it would be a very challenging task on all levels:
>> - Fedora's rpm and some components the build-infrastructure have serious
>> issues related to cross-building.
>> - A cross compiler alone is not worth it, you need a whole zoo of
>> further cross-target packages to make it usable.
> I don't see why.
You'd need at minimum the infrastructure gcc itself needs, e.g. glibc,
kernel-headers, mpfr, mpc, libelf, ppl, cloog etc.
Which packages you exactly need, depends upon which packages you want to
package (e.g. cross-gdb's have another exciting zoo of package
> If you assume that someone compiling for user space
> has a vague idea what they are doing, they will know how to install the
> -devel packages for their target system somewhere the compiler can find
That's another aspect I am referring to.
Basically there would be 2 approaches this
a) provide cross-devel packages for each and every library of a certain
amount of interest in Fedora.
This is what the mingw32 cross toolchain in Fedora does. This approach
is applicable when you have "few packages", but it'll rather soon
explode when adding more targets.
b) To equippe the rpm/yum/mock etc. infrastructure with a mechanism to
pull-in "foreign binaries" into a sys-root (E.g. to install Fedora
*.ppc.rpm rpms into /usr/ppc-redhat/sys-root). So far, such mechanism
> David is, I think, concerned about kernel building, so he doesn't even
> need that.
Technically, there is a very simple way to overcome this: Repackage the
"foreign target's binaries" and use them instead of "rebuild everything
It's being frowned upon in Fedora, but technically, this is magnitudes
More information about the devel