--- a/hotspot/make/solaris/makefiles/vm.make Fri Feb 03 17:21:52 2012 -0500
+++ b/hotspot/make/solaris/makefiles/vm.make Tue Jan 31 13:12:39 2012 +0100
@@ -83,9 +83,13 @@
${BUILD_TARGET} \
${BUILD_USER} \
${HS_LIB_ARCH} \
- ${JRE_VERSION} \
${VM_DISTRO}
+# This is VERY important! The version define must only be supplied to vm_version.o
+# If not, ccache will not re-use the cache at all, since the version string might contain
+# a time and date.
+vm_version.o: CPPFLAGS += ${JRE_VERSION}
+
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
CFLAGS += $(CFLAGS_WARN)