pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/compiler Avoid passing _CC as cross-compiler to rec...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b235c12d6b1c
branches:  trunk
changeset: 336231:b235c12d6b1c
user:      riastradh <riastradh%pkgsrc.org@localhost>
date:      Tue Jul 09 15:45:46 2019 +0000

description:
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:

 mk/compiler/gcc.mk |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 57c67159f189 -r b235c12d6b1c mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Tue Jul 09 15:45:35 2019 +0000
+++ b/mk/compiler/gcc.mk        Tue Jul 09 15:45:46 2019 +0000
@@ -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 @@
 .      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)



Home | Main Index | Thread Index | Old Index