From 07d845558e514fd4523d703b818ccc415e932681 Mon Sep 17 00:00:00 2001 From: joerg Date: Wed, 1 Aug 2007 16:14:17 +0000 Subject: Begin adding some of the basic, non-intrusive pieces of the cross-compile support. - NATIVE_MACHINE_GNU_ARCH, NATIVE_LOWER_ARCH, NATIVE_MACHINE_ARCH, NATIVE_MACHINE_PLATFORM and NATIVE_MACHINE_GNU_PLATFORM work like the counterpars without NATIVE_ prefix. Expansion of NATIVE_LOWER_ARCH and NATIVE_MACHINE_ARCH is enforced early, so that MACHINE_ARCH can be overriden in mk.conf to specify the target architecture. - Provide a default of NO for USE_CROSS_COMPILE. This will be the main switch to activate cross-compiling and adding it now makes it possible to merge more of the patches for specific packages. - Set --build and --host when cross-compiling, the former using the just added variable NATIVE_MACHINE_GNU_PLATFORM. Supported-by: Google SoC 2007 Looks good: jlam@ --- mk/configure/gnu-configure.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mk/configure') diff --git a/mk/configure/gnu-configure.mk b/mk/configure/gnu-configure.mk index 7962d035b6f..0853673e090 100644 --- a/mk/configure/gnu-configure.mk +++ b/mk/configure/gnu-configure.mk @@ -1,4 +1,4 @@ -# $NetBSD: gnu-configure.mk,v 1.5 2007/07/12 18:59:15 jlam Exp $ +# $NetBSD: gnu-configure.mk,v 1.6 2007/08/01 16:14:17 joerg Exp $ _VARGROUPS+= gnu-configure _USER_VARS.gnu-configure= # none @@ -25,6 +25,9 @@ CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX:Q} USE_GNU_CONFIGURE_HOST?= yes .if !empty(USE_GNU_CONFIGURE_HOST:M[yY][eE][sS]) +. if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) +CONFIGURE_ARGS+= --build=${NATIVE_MACHINE_GNU_PLATFORM:Q} +. endif CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM:Q} .endif -- cgit v1.2.3