pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/compiler Generate a more informative string "CC_VER...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c9e7ba6b27bc
branches:  trunk
changeset: 468292:c9e7ba6b27bc
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Feb 12 08:54:48 2004 +0000

description:
Generate a more informative string "CC_VERSION_STRING" that is passed to
ccache as the compiler information to hash.

diffstat:

 mk/compiler/ccache.mk  |   8 +++++++-
 mk/compiler/gcc.mk     |  21 +++++++++++++--------
 mk/compiler/mipspro.mk |   8 +++++---
 mk/compiler/sunpro.mk  |   8 +++++---
 4 files changed, 30 insertions(+), 15 deletions(-)

diffs (106 lines):

diff -r b715027f119a -r c9e7ba6b27bc mk/compiler/ccache.mk
--- a/mk/compiler/ccache.mk     Thu Feb 12 08:40:22 2004 +0000
+++ b/mk/compiler/ccache.mk     Thu Feb 12 08:54:48 2004 +0000
@@ -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 @@
 # 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 -r b715027f119a -r c9e7ba6b27bc mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Thu Feb 12 08:40:22 2004 +0000
+++ b/mk/compiler/gcc.mk        Thu Feb 12 08:54:48 2004 +0000
@@ -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 @@
 
 .  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 -r b715027f119a -r c9e7ba6b27bc mk/compiler/mipspro.mk
--- a/mk/compiler/mipspro.mk    Thu Feb 12 08:40:22 2004 +0000
+++ b/mk/compiler/mipspro.mk    Thu Feb 12 08:54:48 2004 +0000
@@ -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 @@
 
 .  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 -r b715027f119a -r c9e7ba6b27bc mk/compiler/sunpro.mk
--- a/mk/compiler/sunpro.mk     Thu Feb 12 08:40:22 2004 +0000
+++ b/mk/compiler/sunpro.mk     Thu Feb 12 08:54:48 2004 +0000
@@ -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 @@
 _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
 



Home | Main Index | Thread Index | Old Index