diff options
author | grant <grant@pkgsrc.org> | 2003-10-12 03:05:37 +0000 |
---|---|---|
committer | grant <grant@pkgsrc.org> | 2003-10-12 03:05:37 +0000 |
commit | 30e601d19731efd466328a2eaad42a3bced10e63 (patch) | |
tree | 7abc5d4a1eada781334293bd1d66bf0da7ff49b2 | |
parent | 6764a676b94f201fba49d66d536625a6bebddbdc (diff) | |
download | pkgsrc-30e601d19731efd466328a2eaad42a3bced10e63.tar.gz |
fix logic error introduced in last, sync comments about CC_VERSION
with reality.
-rw-r--r-- | mk/compiler.mk | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk index 3bba8156398..77477da9c7a 100644 --- a/mk/compiler.mk +++ b/mk/compiler.mk @@ -1,4 +1,4 @@ -# $NetBSD: compiler.mk,v 1.19 2003/10/11 03:43:14 grant Exp $ +# $NetBSD: compiler.mk,v 1.20 2003/10/12 03:05:37 grant Exp $ # This Makefile fragment implements handling for supported # C/C++/fortran compilers. @@ -46,7 +46,8 @@ # # CC_VERSION # The compiler and version being used. For gcc, this is -# 'gcc-<version>' and (currently) empty for other compilers. +# 'gcc-<version>' and the string reported by ${CC} -V | grep +# '^cc' for others. # # e.g. # .include "../../mk/bsd.prefs.mk" @@ -229,20 +230,20 @@ libstdc++-buildlink-la: .endif # CC_VERSION can be tested by package Makefiles to tweak things based -# on the compiler being used. This is only functional for gcc right now. +# on the compiler being used. # CC_VERSION?= # empty -.if !defined(_CC_VERSION) -. if defined(_CC_IS_GCC) +.if defined(_CC_IS_GCC) +. if !defined(_CC_VERSION) _CC_VERSION!= if ${CC} -dumpversion > /dev/null 2>&1; then \ ${ECHO} `${CC} -dumpversion`; \ else \ ${ECHO} ""; \ fi +. endif CC_VERSION= gcc-${_CC_VERSION} -. else +.else CC_VERSION!= ${CC} -V 2>&1 | ${GREP} '^cc' -. endif .endif # The SunPro C++ compiler doesn't support passing linker flags with |