package/pkg-autotools: force cross compiling

By default autotools enters cross-compiling mode if --build and --host
differ [0]. Depending on the host architecture and how toolchain
providers set the triplet it might be the same. This triggers autotools to
compile and run a program on the host. If it is executable
cross-compiling isn't entered.
As pointed out by the autoconf mailing list [1] one can force cross
compiling.

[0]: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/html_node/Hosts-and-Cross_002dCompilation.html
[1]: https://lists.gnu.org/archive/html/bug-autoconf/2023-03/msg00001.html

Fixes:
 - http://autobuild.buildroot.net/results/6d4/6d4bc520c12313508d0fadee11d5b88c35a3cba9/

Signed-off-by: Daniel Lang <d.lang@abatec.at>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Lang Daniel 2023-03-02 08:50:35 +00:00 committed by Peter Korsgaard
parent d97fe11e59
commit 83e06196ab

View File

@ -195,6 +195,7 @@ define $(2)_CONFIGURE_CMDS
--disable-documentation \
--with-xmlto=no \
--with-fop=no \
cross_compiling=yes \
$$(if $$($$(PKG)_OVERRIDE_SRCDIR),,--disable-dependency-tracking) \
--enable-ipv6 \
$$(NLS_OPTS) \
@ -229,6 +230,7 @@ define $(2)_CONFIGURE_CMDS
--with-xmlto=no \
--with-fop=no \
--disable-nls \
cross_compiling=no \
$$(if $$($$(PKG)_OVERRIDE_SRCDIR),,--disable-dependency-tracking) \
$$(QUIET) $$($$(PKG)_CONF_OPTS) \
)