diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-12 08:54:48 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-12 08:54:48 +0000 |
commit | a854f1222e2650031e39c0ef7afb8c3e49511eb6 (patch) | |
tree | 9b431947dc1b952aaa3bd5800cea32e48bb58c10 /mk/compiler | |
parent | 135989c99c0480d7c6eedb659c709fc32a03c976 (diff) | |
download | pkgsrc-a854f1222e2650031e39c0ef7afb8c3e49511eb6.tar.gz |
Generate a more informative string "CC_VERSION_STRING" that is passed to
ccache as the compiler information to hash.
Diffstat (limited to 'mk/compiler')
-rw-r--r-- | mk/compiler/ccache.mk | 8 | ||||
-rw-r--r-- | mk/compiler/gcc.mk | 21 | ||||
-rw-r--r-- | mk/compiler/mipspro.mk | 8 | ||||
-rw-r--r-- | mk/compiler/sunpro.mk | 8 |
4 files changed, 30 insertions, 15 deletions
diff --git a/mk/compiler/ccache.mk b/mk/compiler/ccache.mk index 29edc517dcd..c8595701653 100644 --- a/mk/compiler/ccache.mk +++ b/mk/compiler/ccache.mk @@ -1,4 +1,4 @@ -# $NetBSD: ccache.mk,v 1.13 2004/02/09 01:29:29 jlam Exp $ +# $NetBSD: ccache.mk,v 1.14 2004/02/12 08:54:48 jlam Exp $ .if !defined(COMPILER_CCACHE_MK) COMPILER_CCACHE_MK= one @@ -72,6 +72,12 @@ PATH:= ${_CCACHE_DIR}/bin:${PATH} # Add the dependency on ccache. BUILD_DEPENDS+= ccache-[0-9]*:../../devel/ccache +# Override the compiler-specific hash with the version string for the +# compiler. +# +CONFIGURE_ENV+= CCACHE_HASHCC=${CC_VERSION_STRING:Q} +MAKE_ENV+= CCACHE_HASHCC=${CC_VERSION_STRING:Q} + # Create symlinks for the compiler into ${WRKDIR}. . if exists(${_CCACHEBASE}/bin/ccache) . for _target_ in ${_CCACHE_LINKS} diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 1cefb5fe7c9..62b21fd64a5 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.50 2004/02/09 05:45:57 jlam Exp $ +# $NetBSD: gcc.mk,v 1.51 2004/02/12 08:54:48 jlam Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= one @@ -291,16 +291,21 @@ IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES . if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) . if exists(${_GCCBINDIR}/gcc) -CC_VERSION!= if ${_GCCBINDIR}/gcc -dumpversion > /dev/null 2>&1; then \ - ${ECHO} "gcc-`${_GCCBINDIR}/gcc -dumpversion`"; \ - else \ - ${ECHO} "gcc-${_GCC_REQD}"; \ - fi +CC_VERSION_STRING!= ${_GCCBINDIR}/gcc -v 2>&1 +CC_VERSION!= \ + if ${_GCCBINDIR}/gcc -dumpversion > /dev/null 2>&1; then \ + ${ECHO} "gcc-`${_GCCBINDIR}/gcc -dumpversion`"; \ + else \ + ${ECHO} "gcc-${_GCC_REQD}"; \ + fi + . else -CC_VERSION= gcc-${_GCC_REQD} +CC_VERSION_STRING= ${CC_VERSION} +CC_VERSION= gcc-${_GCC_REQD} . endif . else -CC_VERSION= ${_GCC_PKG} +CC_VERSION_STRING= ${CC_VERSION} +CC_VERSION= ${_GCC_PKG} . endif .endif # COMPILER_GCC_MK diff --git a/mk/compiler/mipspro.mk b/mk/compiler/mipspro.mk index e3471d2e12a..c38a628cabf 100644 --- a/mk/compiler/mipspro.mk +++ b/mk/compiler/mipspro.mk @@ -1,4 +1,4 @@ -# $NetBSD: mipspro.mk,v 1.16 2004/02/09 05:50:03 jlam Exp $ +# $NetBSD: mipspro.mk,v 1.17 2004/02/12 08:54:48 jlam Exp $ .if !defined(COMPILER_MIPSPRO_MK) COMPILER_MIPSPRO_MK= one @@ -34,9 +34,11 @@ CXX= ${PKG_CXX:T} . if exists(${MIPSPROBASE}/bin/cc) # MIPSpro Compilers: Version 7.3.1.2m -CC_VERSION!= ${MIPSPROBASE}/bin/cc -version 2>&1 | ${GREP} '^MIPSpro' +CC_VERSION_STRING!= ${MIPSPROBASE}/bin/cc -version 2>&1 +CC_VERSION!= ${MIPSPROBASE}/bin/cc -version 2>&1 | ${GREP} '^MIPSpro' . else -CC_VERSION= MIPSpro +CC_VERSION_STRING= ${CC_VERSION} +CC_VERSION= MIPSpro Compilers . endif .endif # COMPILER_MIPSPRO_MK diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk index 2e0a703a406..9a997dc6baa 100644 --- a/mk/compiler/sunpro.mk +++ b/mk/compiler/sunpro.mk @@ -1,4 +1,4 @@ -# $NetBSD: sunpro.mk,v 1.14 2004/02/10 00:37:53 jlam Exp $ +# $NetBSD: sunpro.mk,v 1.15 2004/02/12 08:54:48 jlam Exp $ .if !defined(COMPILER_SUNPRO_MK) COMPILER_SUNPRO_MK= one @@ -35,9 +35,11 @@ CXX= ${PKG_CXX:T} _COMPILER_LD_FLAG= # empty . if exists(${SUNWSPROBASE}/bin/cc) -CC_VERSION!= ${SUNWSPROBASE}/bin/cc -V 2>&1 | ${GREP} '^cc' +CC_VERSION_STRING!= ${SUNWSPROBASE}/bin/cc -V 2>&1 +CC_VERSION!= ${SUNWSPROBASE}/bin/cc -V 2>&1 | ${GREP} '^cc' . else -CC_VERSION= cc: Sun C +CC_VERSION_STRING= ${CC_VERSION} +CC_VERSION= cc: Sun C . endif .endif # COMPILER_SUNPRO_MK |