Index: mk/tools/gmake.mk =================================================================== RCS file: /cvsroot/pkgsrc/mk/tools/gmake.mk,v retrieving revision 1.2 diff -p -u -r1.2 gmake.mk --- mk/tools/gmake.mk 21 May 2013 07:13:50 -0000 1.2 +++ mk/tools/gmake.mk 11 Jun 2013 20:19:24 -0000 @@ -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