Hi,

On Fri, Mar 15, 2024 at 01:32:00PM +0200, Faidon Liambotis wrote:
> > lowdown fails to cross build from source, because it performs a native
> > build. Since there is a configure script, debhelper concludes that the
> > autoconf build system should be used and that it thus should not pass
> > cross tools to make, but it really should. Also since dh_auto_configure
> > is overridden, passing cross flags there (CC in particular) is required.
> > Last but not least, the pkg-config invocations also need to use the host
> > tools. I'm attaching a patch for your convenience.
> 
> Thanks for this, Helmut!
> 
> >  include /usr/share/dpkg/architecture.mk
> > +-include /usr/share/dpkg/buildtools.mk
> 
> Why -include? Are there conditions under which buildtools.mk wouldn't
> exist?

When you use a very old dpkg (like stretch), buildtools.mk does not
exist. I guess these days, we can include without -.

I suspect I have to adjust my finger memory.

> > +PKG_CONFIG ?= pkg-config
> 
> ...and if we assume buildtools.mk always exist, can we drop this and
> assume PKG_CONFIG is always going to be defined?

Yes.

>From your other mail:
| One more thing: should we also pass AR=$(AR)? It did matter for
| WebAssembly (which required the use of llvm-ar) and why I added support
| for it to oconfigureĀ¹, but I'm not sure if it makes a difference between
| different binutils architectures when cross-building.

Generally speaking, adding AR does not hurt and makes things better for
the reasons you cite. Other than that, it does not seem to be strictly
necessary in this case. So yeah, add it.

Helmut

Reply via email to