hotspot/make/linux/makefiles/gcc.make
changeset 7408 c04a5c989f26
parent 7397 5b173b4ca846
child 7445 57d387675180
--- a/hotspot/make/linux/makefiles/gcc.make	Thu Dec 02 14:00:03 2010 -0500
+++ b/hotspot/make/linux/makefiles/gcc.make	Wed Dec 01 15:04:06 2010 +0100
@@ -42,11 +42,14 @@
 
 # check for precompiled headers support
 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
+# Allow the user to turn off precompiled headers from the command line.
+ifneq ($(USE_PRECOMPILED_HEADER),0)
 USE_PRECOMPILED_HEADER=1
 PRECOMPILED_HEADER_DIR=.
 PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled.hpp
 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
 endif
+endif
 
 
 #------------------------------------------------------------------------
@@ -150,6 +153,11 @@
 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
 endif
 
+# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
+ifneq ($(USE_PRECOMPILED_HEADER),1)
+CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
+endif
+
 #------------------------------------------------------------------------
 # Linker flags