summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorriastradh <riastradh>2013-06-12 20:37:43 +0000
committerriastradh <riastradh>2013-06-12 20:37:43 +0000
commite6a9fa7e88bd320988bdc66ff896cc4bfc8304e3 (patch)
treed847a05a552d4235e2583bb76821e261a58dd79e /mk
parentd255310cd50540d95e22977298c434d631c29eeb (diff)
downloadpkgsrc-e6a9fa7e88bd320988bdc66ff896cc4bfc8304e3.tar.gz
Don't let the pkgsrc TARGET_ARCH bleed into gmake's environment.
This is a provisional kludge to work around PR pkg/47838. Sorry for taking far too long to find a workaround that doesn't break various other stuff too -- this duration of time was ridiculous, and it was entirely my fault. We can get rid of this kludge when we start using `env -i' in the build phase or when we replace TARGET_ARCH by TARGET_MACHINE_PLATFORM (and replace the make-internal variable MACHINE_ARCH by MACHINE_PLATFORM -- that is part of what makes the logic in pkgformat/pkg/depends.mk and bsd.prefs.mk so fragile). However, although I intend to do both of these things, they were deemed too likely to cause too much fallout just before the freeze, so they'll wait until after the freeze.
Diffstat (limited to 'mk')
-rw-r--r--mk/tools/gmake.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/mk/tools/gmake.mk b/mk/tools/gmake.mk
index 824832d08c5..c0a203495a6 100644
--- a/mk/tools/gmake.mk
+++ b/mk/tools/gmake.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gmake.mk,v 1.2 2013/05/21 07:13:50 sbd Exp $
+# $NetBSD: gmake.mk,v 1.3 2013/06/12 20:37:43 riastradh Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -63,3 +63,12 @@ _TOOLS_USE_PKGSRC.gmake!= \
. endif
MAKEVARS+= _TOOLS_USE_PKGSRC.gmake
.endif
+
+# XXX Kludge to prevent pkgsrc's internal variable TARGET_ARCH for
+# cross-compilation from leaking into gmake's environment, where it
+# will break the default rules. Remove either when we start using
+# `env -i' for the build phase or when we replace TARGET_ARCH by
+# TARGET_MACHINE_PLATFORM.
+.if defined(TARGET_ARCH)
+MAKE_ENV+= TARGET_ARCH=
+.endif