diff mbox series

package/pkg-autotools: force cross compiling

Message ID VI1P190MB0493CA480A72DCB0A86ECFAE9FB29@VI1P190MB0493.EURP190.PROD.OUTLOOK.COM
State Accepted
Headers show
Series package/pkg-autotools: force cross compiling | expand

Commit Message

Lang Daniel March 2, 2023, 8:50 a.m. UTC
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>
---
 package/pkg-autotools.mk | 2 ++
 1 file changed, 2 insertions(+)

Comments

Peter Korsgaard March 7, 2023, 9:19 p.m. UTC | #1
>>>>> "Lang" == Lang Daniel via buildroot <buildroot@buildroot.org> writes:

 > 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>

Committed, thanks.
diff mbox series

Patch

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) \
 	)