summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig>2009-07-28 06:55:24 +0000
committerrillig <rillig>2009-07-28 06:55:24 +0000
commit0ddce61435974fd7d0b8287a5e9f82b2db551190 (patch)
treebf0deb584cf7c20528c71256587eff2a7117578a /mk
parent09f7289fc902ef66098149020d23a9e29e860b67 (diff)
downloadpkgsrc-0ddce61435974fd7d0b8287a5e9f82b2db551190.tar.gz
Did you know that the := operator behaves funnily? Example:
exclam != echo ${DEFINED_LATER:Q} value colon := ${DEFINED_LATER} value DEFINED_LATER = later show: @echo ${exclam} @echo ${colon} Don't expect them to be the same.
Diffstat (limited to 'mk')
-rw-r--r--mk/compiler/gcc.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 78c83e48bcc..257a4ef313c 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.98 2009/07/08 21:25:30 markd Exp $
+# $NetBSD: gcc.mk,v 1.99 2009/07/28 06:55:24 rillig Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -100,8 +100,12 @@ MAKEFLAGS+= _CC=${_CC:Q}
.endif
.if !defined(_GCC_VERSION)
+# FIXME: ALL_ENV is not set at this point, so LC_ALL must be set
+# explicitly. In the show-all and show-var targets, it appears
+# nevertheless because "References to undefined variables are not
+# expanded" when using the := operator.
_GCC_VERSION_STRING!= \
- ( ${SETENV} ${ALL_ENV} ${_CC} -v 2>&1 | ${GREP} 'gcc version' ) 2>/dev/null || ${ECHO} 0
+ ( ${SETENV} ${ALL_ENV} LC_ALL=C ${_CC} -v 2>&1 | ${GREP} 'gcc version' ) 2>/dev/null || ${ECHO} 0
. 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*)