Re: multiarch compatible cross compilers for Jessie
+++ Paul Boddie [2014-10-05 20:01 +0200]:
> On Thursday 7. August 2014 19.33.25 Wookey wrote:
> > Any testing people can do of toolchains, and the cross-binutils packages
> > would be very helpful.
>
> OK, as you know, I managed to build a toolchain recently, specifically for an
> i386 build platform and a mipsel target platform. Aside from the occasional
> dependency disruption where I managed to update various gcc-related i386
> packages and then had to wait for the mipsel dependencies to catch up (or be
> told that the gcc-4.9 build dependencies needed all my essential packages to
> be removed in order for them to be installed themselves), and apart from the
> dh_strip problem mentioned a few days ago (where I'd managed to ignore the
> workaround suggested by YunQiang Su), it all seemed to work.
>
> One thing that wasn't clear and doesn't seem to be resolved, however, and
> which seems to obstruct package cross-building is the matter of the generic
> gcc program or symbolic link:
>
> https://bugs.launchpad.net/ubuntu/+source/gcc-defaults-armel-cross/+bug/600930
>
> I suppose that the "resolution" of this matter by providing the gcc-defaults-
> armel-cross package isn't really a proper solution. Unless one manually makes
> a symbolic link for gcc (in my case, mipsel-linux-gnu-gcc, I guess), it
> appears necessary for me to edit debian/rules files to set CC manually
> wherever configure is called, although I could be missing some debhelper
> mechanism that would normally be invoked to deal with this.
I don't see why having some package provide an arm-linux-gnueabi-gcc
link to the correct gcc version ( arm-linux-gnueabi-gcc-4.9) is 'a
hack'. It's exactly what we do for the native compilers. I agree that
the package that does that is currently missing. Our plan is for the
gcc-defaults package to expand to provide these links for
cross-toolchains too. Or it could be done by an <arch>-cross-support package
> Another thing is the matter of programs like pkg-config:
>
> https://bugs.launchpad.net/ubuntu/+source/gcc-defaults-armel-cross/+bug/771569
>
> Again, the suggested solution of manually making a symbolic link for a target
> platform seems like a bit of a hack, really, but it does seem to make cross-
> builds work without any extra effort.
Doing it by hand is tiresome (not really 'hacky' IMHO). Having a
package that installs it for you is perfectly sensible. We propose
that an <arch>-cross-support package will install this link.
There is a actually a much cooler way to do this - let multiarch bring
in the correct pkg-config:arch package which will contain said
symlink. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759556
This stops pkg-config being special-cased. However the maintainer did
not like our solution much so the simple ubuntu-style symlink is
likely to be how it's done in jessie.
> I suppose no further consensus was
> reached about providing platform-specific pkg-config programs or links.
It has been discussed, as above.
> Anyway, after a couple of successful cross-builds (involving the libvorbisidec
> and sdl-mixer1.2 source packages), those are my experiences so far. Thanks to
> everyone who has made this possible!
No probs - no if we can just get some toolchains uploaded to Jessie,
more people will be able to use this. Time is running out... (I'm
working on it right now, in fact)
Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/
Reply to: