On 2016-11-02 16:10:14, Helmut Grohne wrote: > On Wed, Nov 02, 2016 at 02:37:35PM -0400, Antoine Beaupré wrote: >> Hmm... I am not very familiar with cross-compiling, but this looks to me >> like a toolchain issue. pv doesn't do anything particular to call "the >> wrong LD" - why should I have to pass a specific linker here? > > That's a good question. I was surprised by the need as well. > > Crucially, when cross compiling you need to prefix each and every build > tool with the host architecture triplet (DEB_HOST_GNU_TYPE). Typically, > autotools does that for you by prefixing every tool with $ac_tool_prefix. > >> in other words, why isn't this in dh_auto_build, dh_build, or make or >> wherever it should be down the stack? > > Because, normally autotools handles this. It just doesn't for pv. > >> Don't all gnu autoconf packages suffer from the same bug? > > pv's Makefiles rely on the make default value of LD instead of taking > that value from autoconf. So no, other autoconf packages that actually > use autoconf for determining LD, do not suffer from this issue. > > Quite likely, there is a more general solution to this problem than my > patch. I just didn't figure it out. One approach could be linking with > $CC rather than $LD as autotools supply a suitable $CC. If this change > works natively, it'll also work for cross compilation.
Thank you for the clarifications. I guess the next step is whether there should be a patch sent upstream, what do you think? A. -- The greatest crimes in the world are not committed by people breaking the rules but by people following the rules. It's people who follow orders that drop bombs and massacre villages. - Bansky