From 83e06196ab2193b73b4d7c1decc12bdd654a91e1 Mon Sep 17 00:00:00 2001 From: Lang Daniel Date: Thu, 2 Mar 2023 08:50:35 +0000 Subject: [PATCH] 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 Signed-off-by: Peter Korsgaard --- package/pkg-autotools.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index 717ff81593..aac80369e0 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -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) \ )