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

Re: cross compile mips on x86_64: pcre?

On Friday 5. September 2014 23.33.34 Paul Boddie wrote:
> I'm guessing that the wrong objcopy is invoked here, but I have no idea how
> this would be fixed. Earlier in the build output the following occurs:
> dh_strip -plibgcc-4.8-dev
> strip: Unable to recognise the format of the input file `debian/libgcc-4.8-
> dev/usr/lib/gcc/mipsel-linux-gnu/4.8/libgcc.a(_m16subsf3.o)'

So, this seems to be a problem with dh_strip. Looking at the dh_strip code 
indicates that a function called cross_command is provided in the following 


This appears to compare DEB_BUILD_GNU_TYPE and DEB_HOST_GNU_TYPE, and only if 
they are different does it generate a command prefixed with the latter. So, to 
coerce it to use the appropriate objcopy command on foreign libraries, the 
following appears to be necessary (for my system):

DEB_BUILD_GNU_TYPE=i586-linux-gnu \
DEB_HOST_GNU_TYPE=mipsel-linux-gnu \
dh_strip ...

The most pertinent reference to this that I could find was the following 
comment on a bug in Launchpad:


Since dh_strip seems to be used a lot in the debian/rules.d files for the gcc 
packages, I do wonder what the fix for this is meant to be.


P.S. All of this still being in the context of the following:


Reply to: