7175914: Usage of gcc with precompiled headers produces wrong build dependencies
Summary: Add -fpch-deps flag to gcc builds
Reviewed-by: kamg, coleenp
Contributed-by: volker.simonis@gmail.com
--- a/hotspot/make/bsd/makefiles/gcc.make Mon Jun 11 10:28:02 2012 +0200
+++ b/hotspot/make/bsd/makefiles/gcc.make Mon Jun 11 13:10:14 2012 -0400
@@ -214,7 +214,7 @@
# Flags for generating make dependency flags.
ifneq ("${CC_VER_MAJOR}", "2")
-DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
+DEPFLAGS = -fpch-deps -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
endif
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
--- a/hotspot/make/linux/makefiles/gcc.make Mon Jun 11 10:28:02 2012 +0200
+++ b/hotspot/make/linux/makefiles/gcc.make Mon Jun 11 13:10:14 2012 -0400
@@ -166,7 +166,7 @@
# Flags for generating make dependency flags.
ifneq ("${CC_VER_MAJOR}", "2")
-DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
+DEPFLAGS = -fpch-deps -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
endif
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
--- a/hotspot/make/solaris/makefiles/gcc.make Mon Jun 11 10:28:02 2012 +0200
+++ b/hotspot/make/solaris/makefiles/gcc.make Mon Jun 11 13:10:14 2012 -0400
@@ -141,7 +141,7 @@
# Flags for generating make dependency flags.
ifneq ("${CC_VER_MAJOR}", "2")
-DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
+DEPFLAGS = -fpch-deps -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
endif
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.