summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorriastradh <riastradh@pkgsrc.org>2019-07-09 15:45:46 +0000
committerriastradh <riastradh@pkgsrc.org>2019-07-09 15:45:46 +0000
commit186739908748be6e2547c1e69f161fe16df2c3d6 (patch)
treec8287555fc8fc1430d07686b04f52fd6eba1a807 /mk
parent1f9d8e636d61f8edf40996ea3f52fe7aa4033755 (diff)
downloadpkgsrc-186739908748be6e2547c1e69f161fe16df2c3d6.tar.gz
Avoid passing _CC as cross-compiler to recursive makes.
This way we don't inadvertently tell a native dependency that it is supposed to be compiled with the cross-compiler. No functional change intended for USE_CROSS_COMPILE=no.
Diffstat (limited to 'mk')
-rw-r--r--mk/compiler/gcc.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 7c22078204e..69ba253c24b 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.198 2018/11/12 14:22:58 jperkin Exp $
+# $NetBSD: gcc.mk,v 1.199 2019/07/09 15:45:46 riastradh Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -161,7 +161,11 @@ _CC:= ${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
. endif
. endif
. endfor
+. if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+# Pass along _CC only if we're working on native packages -- don't pass
+# the cross-compiler on to submakes for building native packages.
MAKEFLAGS+= _CC=${_CC:Q}
+. endif
.endif
.if !defined(_GCC_VERSION)