[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: multiarch compatible cross compilers for Jessie

On Thursday 7. August 2014 18.53.14 YunQiang Su wrote:
> For armhf, I guess you can get the cross complier with:
> 1. install the libraries such as libc6-dev:armhf etc and other
> build-dep for gcc-4.9
> 2. apt-get source gcc-4.9
> 3. build gcc-4.9 with this command
> with_deps_on_target_arch_pkgs=yes DH_VERBOSE=1 WITH_SYSROOT=/
> dpkg-buildpackage -b -uc -us -d
> then you can get packages like 'gcc-4.9-armhf-linux-gnu:amd64' and
> 'g++-4.9-armhf-linux-gnu:amd64' etc packages.

Of course, reading this again now teaches me to read more closely next time: 
the nostrip option clearly gets around the dh_strip problems I reported 
elsewhere. Nevertheless, I muddled through a build with some hacked up 
dh_strip statements of the following form in debian/rules.d/binary-*.mk:

if ! dpkg-architecture -f -t$(DEB_TARGET_GNU_TYPE) -c dh_strip ... ; \
then dh_strip ... ; fi

Here, ... refers to whatever arguments are being passed to dh_strip in each 
place. Naturally, this is a brute-force approach, but I found that although 
some places take kindly to the dpkg-architecture hack, others (particularly in 
the gccgo rules) appear to be used in both native and cross-building contexts.

So I've now managed to build i386 packages for the gcc 4.9 toolchains, which 
were absent from the toolchains.secretsauce.net repository.


Reply to: