On Fri, 13 Feb 2009 02:43:35 +0000 Wookey <wookey@wookware.org> wrote: > I've just realised (making some new cross-chroots) that installing > build-essential requires you to have a native toolchain installed > (gcc, g++). > > e.g. in etch: > Depends: libc6-dev | libc-dev, gcc (>= 4:4.1.1), g++ (>= 4:4.1.1), make, > dpkg-dev (>= 1.13.5) > > Now for cross-building that's not really what you want. Why? If you're thinking that the build should fail if any process calls gcc and not $triplet-gcc, then maybe - but that won't work for all packages (see CC_FOR_BUILD below). Instead, we already have a lintian check that will parse the architecture of the actual binaries that end up being packaged and fail if these do not match the claimed architecture of the package itself. Yes, this only fails the completed build but we do need gcc in a cross-building chroot, sadly. > I'm wondering > if the right thing to do is create a crossbuild-essential package > which depends on gcc-cross and g++-cross, then have our > cross-packges provide gcc-cross and g++-cross? That sounds like a good idea even though we do need to retain gcc (see below). I've been wondering how to do it because we don't have gcc-cross, we have gcc-$version-$triplet so we'd need either: Package: gcc-cross Depends: gcc-arm-linux-gnu|gcc-arm-linux-gnueabi|... Architecture: i386 amd64 powerpc Package: gcc-arm-linux-gnu Depends: gcc-$version-arm-linux-gnu|gcc-$(priorversion)-arm-linux-gnu Architecture: i386 amd64 powerpc OR: Package: gcc-$triplet-cross Depends: gcc-$version-$triplet|gcc-$(priorversion)-$triplet Architecture: i386 amd64 powerpc Then duplicate all that for g++-cross. (Note that gcc-4.4 is imminent - it's due for upload to unstable in a matter of weeks.) > Or what happens if our cross packages provide gcc and g++ directly? > It's true and it satisfies build-essential as-is, but I have a feeling > that might produce some unexpected effects. Can anyone think of a > reason why this wouldn't work? CC_FOR_BUILD - A number of packages (absolute figures to be determined but ~ 6 in Crush so far) compile internal tools that need to be executed during the cross-build. Yes, these are irksome and a PITA but upstreams think they are cute and cool and generally shiny. These internal tools need gcc (although I don't know of any so perverse as to need g++). A more useful aim is to get gcc to be more flexible about gcc-$version-base. -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
Attachment:
pgpfwD29k1fJS.pgp
Description: PGP signature