summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2011-09-08 20:17:15 +0000
committerabs <abs@pkgsrc.org>2011-09-08 20:17:15 +0000
commit1ad19bede674339968de3b62189eabb21ed3f511 (patch)
tree562e841d2aad3c3bded8284d931962beaa26901d /mk/compiler
parent8a210d224e39e7014f50e5719fbed8aaf7880958 (diff)
downloadpkgsrc-1ad19bede674339968de3b62189eabb21ed3f511.tar.gz
Introduce PKGSRC_SETENV, defaulting to SETENV. Can be set to ${SETENV} -i
to santise environment
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/gcc.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 6f951cf7eb7..fc0d7680bba 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.110 2011/08/18 10:01:31 wiz Exp $
+# $NetBSD: gcc.mk,v 1.111 2011/09/08 20:17:15 abs Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -113,8 +113,13 @@ MAKEFLAGS+= _CC=${_CC:Q}
# explicitly. In the show-all and show-var targets, it appears
# nevertheless because "References to undefined variables are not
# expanded" when using the := operator.
+. if defined(SETENV)
_GCC_VERSION_STRING!= \
- ( ${SETENV} ${ALL_ENV} LC_ALL=C ${_CC} -v 2>&1 | ${GREP} 'gcc version' ) 2>/dev/null || ${ECHO} 0
+ ( ${PKGSRC_SETENV} ${ALL_ENV} LC_ALL=C ${_CC} -v 2>&1 | ${GREP} 'gcc version') 2>/dev/null || ${ECHO} 0
+. else
+_GCC_VERSION_STRING!= \
+ ( ${_CC} -v 2>&1 | ${GREP} 'gcc version') 2>/dev/null || ${ECHO} 0
+. endif
. if !empty(_GCC_VERSION_STRING:Megcs*)
_GCC_VERSION= 2.8.1 # egcs is considered to be gcc-2.8.1.
. elif !empty(_GCC_VERSION_STRING:Mgcc*)