Putting cross compilers into Fedora
rc040203 at freenet.de
Wed Sep 1 14:53:37 UTC 2010
On 09/01/2010 02:21 PM, Jakub Jelinek wrote:
> On Wed, Sep 01, 2010 at 02:06:37PM +0200, Ralf Corsepius wrote:
>>>> - 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.
> You don't need mpfr, mpc, ppl, cloog nor libelf, all those are host
> libraries, not target libraries. cc1/cc1plus links against them or dlopens
Yes, you are right.
I was confused by me also building GCC Canadian-X and building for
distros which are not equipped with suffient versions of these
libraries (Try building gcc-4.5.x on CentOS4/CentOS5).
> For cross gcc I guess the important question is, do we want gcc-4*.src.rpm to
> build all the cross compilers (and, is C enough, or do we need C++ too?), or
> do we have one cross-gcc-4*.src.rpm that semi-loosely tracks gcc-4*.src.rpm
> and builds all the cross compilers (BuildRequires all the cross-binutils and
> all cross-glibc/kernel-headers), or each cross would have its own src.rpm?
The latter is what I am doing for my cross-toolchain rpms.
> I think the last one would be a maitanance nightmare.
Not necessarily, because different target's/target OS toolchains tend to
diverge (Not all targets suffer from the same bugs), so using separate
*src.rpm and patches for individual toolchains might even be advantageous.
> I hope cross Fortran and especially cross Java (or cross Ada/ObjC/ObjC++)
Cross-Fortran/Objc for mainstream distros/targets is often pretty
harmless. Cross-java and Ada are a nightmare.
More information about the devel