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

Re: Bug#930983: libpam-encfs FTCBFS: builds for the wrong architecture



On Tue, Jun 25, 2019 at 07:32:29PM +0200, Helmut Grohne wrote:
> On Tue, Jun 25, 2019 at 06:18:09PM +0200, Agustin Martin wrote:
> > Upstream Makefile sets CC=gcc and LD=ld (this seems to need ld). Will
> > values passed by dh_auto_build override them? IIRC overriding them was the
> > reason for passing those variables as arguments.
> 
> Yes. When we added cross build support to dh_auto_build for the makefile
> buildsystem, we figured that many Makefiles would use "=" assignments
> for CC. Therefore dh_auto_build passes CC, CXX and PKG_CONFIG as command
> line variables overriding the relevant assignments. The usage of LD was
> less consistent, so dh_auto_build does not pass LD. If this doesn't
> fully answer your question, don't hesitate to ask.

Thanks, Helmut.

I asked because I tried with dh_auto_build -v and noticed that apparently
plain gcc was called, may be because host and target arches were the same.

The only remaining thing is that your proposed change switches linker to
gcc. IIRC the only reason why "ld" is used is because upstream set it, but
I'd expect everything to work well with gcc as linker (once -x linker option
is dropped and options adapted). Need to test.

Using dh_auto_build should also make simpler to migrate to a simpler dh
based debian/rules, with something like

override_dh_auto_build:
	dh_auto_build -- 'LD=$$(CC)' ...

Thanks again for your help,

Regards,

-- 
Agustin


Reply to: