summaryrefslogtreecommitdiff
path: root/mk/platform
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2016-03-17 16:02:23 +0000
committerjperkin <jperkin@pkgsrc.org>2016-03-17 16:02:23 +0000
commitd61de8cf4d0ca35da52643eec74d6dda121b99ea (patch)
tree21b0aba73df2a3bbd338f9f40f5c35e946b0344f /mk/platform
parenta480e32b2cd8af0360e49625c66c5a45f0f26c69 (diff)
downloadpkgsrc-d61de8cf4d0ca35da52643eec74d6dda121b99ea.tar.gz
Since the MACHINE_ARCH cleanup, the bootstrap for i386-on-x86_64 Linux has
been broken due to NATIVE_MACHINE_ARCH no longer being set to x86_64. Fix this by introducing HOST_MACHINE_ARCH which refers to the underlying host architecture rather than bmake's native architecture, thus differentiating between cross-compiling and multilib. This is currently only set on Linux as the only OPSYS which currently requires such a test, but can be expanded to other OPSYS as necessary.
Diffstat (limited to 'mk/platform')
-rw-r--r--mk/platform/Linux.mk4
1 files changed, 2 insertions, 2 deletions
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