diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.prefs.mk | 6 | ||||
-rw-r--r-- | mk/platform/Linux.mk | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 7382adadd25..e5a1666ca78 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.381 2016/03/11 23:54:08 khorben Exp $ +# $NetBSD: bsd.prefs.mk,v 1.382 2016/03/17 16:02:23 jperkin Exp $ # # This file includes the mk.conf file, which contains the user settings. # @@ -221,6 +221,10 @@ LOWER_VENDOR?= ssd LOWER_VENDOR?= pc . endif LOWER_VENDOR?= unknown +. if !defined(HOST_MACHINE_ARCH) +HOST_MACHINE_ARCH!= ${UNAME} -m +MAKEFLAGS+= HOST_MACHINE_ARCH=${HOST_MACHINE_ARCH:Q} +. endif .elif ${OPSYS} == "OpenBSD" LOWER_OPSYS?= openbsd diff --git a/mk/platform/Linux.mk b/mk/platform/Linux.mk index 74605d96893..9e1e23757ac 100644 --- a/mk/platform/Linux.mk +++ b/mk/platform/Linux.mk @@ -1,4 +1,4 @@ -# $NetBSD: Linux.mk,v 1.65 2016/03/10 16:58:19 jperkin Exp $ +# $NetBSD: Linux.mk,v 1.66 2016/03/17 16:02:23 jperkin Exp $ # # Variable definitions for the Linux operating system. @@ -120,7 +120,7 @@ LIBABISUFFIX?= 64 # When building 32-bit packages on x86_64 GNU ld isn't smart enough to # figure out the target architecture based on the objects so we need to # explicitly set it. -.if ${NATIVE_MACHINE_ARCH} == "x86_64" && ${MACHINE_ARCH} == "i386" +.if ${HOST_MACHINE_ARCH} == "x86_64" && ${MACHINE_ARCH} == "i386" _WRAP_EXTRA_ARGS.LD+= -m elf_i386 CWRAPPERS_APPEND.ld+= -m elf_i386 .endif |