summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-02-01 01:23:37 +0000
committerjlam <jlam@pkgsrc.org>2004-02-01 01:23:37 +0000
commitdfbb9b907102af3fc7216567965313eddd541d46 (patch)
tree4c8d87b19cba1bde2d927d988c8a4eae2635b69a
parentbfa06a27b33bd73151626bec0f84a70d96a362de (diff)
downloadpkgsrc-dfbb9b907102af3fc7216567965313eddd541d46.tar.gz
Prepend the path to the compiler to PATH even if we're using the builtin
compiler. This makes ccache and distcc call the correct compiler from examining the PATH.
-rw-r--r--mk/compiler/gcc.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 126a52bc6c8..a8cc2777755 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.2 2004/02/01 00:59:51 jlam Exp $
+# $NetBSD: gcc.mk,v 1.3 2004/02/01 01:23:37 jlam Exp $
.if !defined(COMPILER_GCC_MK)
COMPILER_GCC_MK= defined
@@ -202,6 +202,11 @@ CXX= ${_GCC_PREFIX}bin/g++
F77= ${_GCC_PREFIX}bin/g77
PKG_FC:= ${F77}
. endif
+.else
+. if !empty(_IS_BUILTIN_GCC:M[yY][eE][sS])
+_GCC_PATH!= ${TYPE} ${CC} | ${AWK} '{ print $$NF }'
+PATH:= ${_GCC_PATH:H}:${PATH}
+. endif
.endif
# Pass the required flags to imake to tell it we're using gcc on Solaris.