Hi, On 19.10.2017 22:29, Simon Sobisch wrote:
> The autoconf parts are fixed now [1], but there's one thing in the
> Makefiles where we generate a binary with the compiler we've generated
> directly beforehand. This obviously can't work and I'd like to skip
> this and telling people to do so on the target machine.
With my Debian package maintainer hat on: if it is possible to properly
support cross compilation, please do so.
The sanest way to do that is to build a toplevel project that calls
something like
./configure --build=@build@ \
--host=@build@ \
--target=@target@
to build a compiler running on the build system,
./configure --build=@build@ \
--host=@host@ \
--target=@target@
to build a compiler to install, and
./configure --build=@build@ \
--host=@target@ \
--with-compiler=path-to-compiler
to build the runtime.
This Makefile is usually not built with automake, and will try to merge
the cases where @host@ = @build@, where the configure invocations for
both compiler builds are the same.
> The main question is: what is the best practice for doing so? I'd using
> AC_SUBST([CROSS_COMPILATION]) and checking this in the "offending"
> Makefile for simply dropping the generation completely.
You can compare the host and build triplets and use AM_CONDITIONAL to
comment out parts of the Makefile when cross-compiling.
Simon
signature.asc
Description: OpenPGP digital signature
