diff options
author | rillig <rillig@pkgsrc.org> | 2009-07-28 06:55:24 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2009-07-28 06:55:24 +0000 |
commit | 70381613122ca93909635733c75819b17b87b0ff (patch) | |
tree | bf0deb584cf7c20528c71256587eff2a7117578a /mk/compiler | |
parent | eaaf0c768ff6434ddc69fa660df8bf82c431ff00 (diff) | |
download | pkgsrc-70381613122ca93909635733c75819b17b87b0ff.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/compiler')
-rw-r--r-- | mk/compiler/gcc.mk | 8 |
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*) |