pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Begin adding some of the basic, non-intrusive piece...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ae3ddfe9bd2e
branches: trunk
changeset: 531519:ae3ddfe9bd2e
user: joerg <joerg%pkgsrc.org@localhost>
date: Wed Aug 01 16:14:17 2007 +0000
description:
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@
diffstat:
mk/bsd.prefs.mk | 19 +++++++++++++------
mk/configure/gnu-configure.mk | 5 ++++-
mk/defaults/mk.conf | 7 ++++++-
3 files changed, 23 insertions(+), 8 deletions(-)
diffs (81 lines):
diff -r 1791d801325f -r ae3ddfe9bd2e mk/bsd.prefs.mk
--- a/mk/bsd.prefs.mk Wed Aug 01 15:24:51 2007 +0000
+++ b/mk/bsd.prefs.mk Wed Aug 01 16:14:17 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.259 2007/08/01 12:21:56 joerg Exp $
+# $NetBSD: bsd.prefs.mk,v 1.260 2007/08/01 16:14:17 joerg Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -88,7 +88,8 @@
GNU_ARCH.mips?= mipsel
GNU_ARCH.sh3eb?= sh
GNU_ARCH.sh3el?= shle
-MACHINE_GNU_ARCH?= ${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
+NATIVE_MACHINE_GNU_ARCH?= ${GNU_ARCH.${NATIVE_MACHINE_ARCH}:U${NATIVE_MACHINE_ARCH}}
+MACHINE_GNU_ARCH?= ${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
.if ${OPSYS} == "NetBSD"
LOWER_OPSYS?= netbsd
@@ -232,11 +233,17 @@
MAKEFLAGS+= LOWER_OPSYS=${LOWER_OPSYS:Q}
-LOWER_VENDOR?= # empty ("arch--opsys")
-LOWER_ARCH?= ${MACHINE_GNU_ARCH}
+LOWER_VENDOR?= # empty ("arch--opsys")
+LOWER_ARCH?= ${MACHINE_GNU_ARCH}
+# Expand now as MACHINE_ARCH can be overriden in mk.conf and
+# LOWER_ARCH is typically derived from it.
+NATIVE_LOWER_ARCH:= ${LOWER_ARCH}
+NATIVE_MACHINE_ARCH:= ${MACHINE_ARCH}
-MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH}
-MACHINE_GNU_PLATFORM?= ${LOWER_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}
+NATIVE_MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${NATIVE_MACHINE_ARCH}
+MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH}
+NATIVE_MACHINE_GNU_PLATFORM?= ${NATIVE_LOWER_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}
+MACHINE_GNU_PLATFORM?= ${LOWER_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}
# Needed to prevent an "install:" target from being created in bsd.own.mk.
NEED_OWN_INSTALL_TARGET=no
diff -r 1791d801325f -r ae3ddfe9bd2e mk/configure/gnu-configure.mk
--- a/mk/configure/gnu-configure.mk Wed Aug 01 15:24:51 2007 +0000
+++ b/mk/configure/gnu-configure.mk Wed Aug 01 16:14:17 2007 +0000
@@ -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 @@
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
diff -r 1791d801325f -r ae3ddfe9bd2e mk/defaults/mk.conf
--- a/mk/defaults/mk.conf Wed Aug 01 15:24:51 2007 +0000
+++ b/mk/defaults/mk.conf Wed Aug 01 16:14:17 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.156 2007/07/14 17:17:45 adrianp Exp $
+# $NetBSD: mk.conf,v 1.157 2007/08/01 16:14:17 joerg Exp $
#
# This file provides default values for variables that may be overridden
@@ -1732,6 +1732,11 @@
# Possible: YES, NO
# Default: NO
+USE_CROSS_COMPILE?= NO
+# Set this to YES to enable cross-compiling support.
+# Possible: YES, NO
+# Default: NO
+
USE_CRYPTO?= YES
# Used in speakfreely to choose support for encrypted connections.
# Possible: YES, or NO.
Home |
Main Index |
Thread Index |
Old Index