[Pkg-xen-devel] [PATCH 07/12] debian/rules: Set CC/LD for cross-building

Elliott Mitchell ehem+debian at m5p.com
Fri Sep 18 01:53:00 BST 2020


On Thu, Sep 17, 2020 at 05:07:08PM +0100, Ian Jackson wrote:
> Elliott Mitchell writes ("[PATCH 07/12] debian/rules: Set CC/LD for cross-building"):
> > Set $(CC) and $(LD) when building.  People building ARM executables on
> > ARM hosts aren't that common.
> ...
> >  make_args_common := \
> >  	XEN_COMPILE_ARCH=$(xen_arch_$(DEB_BUILD_ARCH)) \
> > -	XEN_TARGET_ARCH=$(xen_arch_$(flavour))
> > +	XEN_TARGET_ARCH=$(xen_arch_$(flavour)) \
> > +	CC=$(DEB_HOST_MULTIARCH)-gcc \
> > +	LD=$(DEB_HOST_MULTIARCH)-ld
> 
> Doesn't this want to be in make-args-xen ?
> 
> That is, I think autoconf, configure, et al, ought to do this right
> for the tools.  It is the hypervisor which needs this other kind of
> cross-compilation.

Well...   I don't know.

I concur, `configure`/`autoconf` *should* take care of this for most of
the tools portion of Xen.  If this is correct though, there is either one
fairly large bug or else a lot of smaller bugs in the Xen tools build
system.

Appears configure's --host=<arch> option appears to modify what configure
expects to find, but doesn't cause configure to look for an alternative
compiler/linker.  Thus the build process tries to use the build machine
compiler/linker instead of the host compiler/linker.

There could be a bug in the Xen configure script where some missing bit
is supposed to cause it to provide CC/LD to the build process.  Could be
many of the Makefiles in Xen need fixes to properly propogate the chosen
compiler/linker.

The bottom line is without both setting CC/LD in the environment AND
using configure's --host argument, cross builds fail.  I can readily
believe there is a better way to setup Debian's build.


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg at m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445





More information about the Pkg-xen-devel mailing list