United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7116081 USE_PRECOMPILED_HEADER=0 triggers a single threaded build of the JVM
JDK-7116081 : USE_PRECOMPILED_HEADER=0 triggers a single threaded build of the JVM

Details
Type:
Bug
Submit Date:
2011-11-28
Status:
Closed
Updated Date:
2012-03-22
Project Name:
JDK
Resolved Date:
2012-01-20
Component:
hotspot
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs23 (b08)

Related Reports
Backport:
Backport:

Sub Tasks

Description
The logic for turning off precompiled headers when building HotSpot is broken. 

The bug is in this code:
ifdef USE_PRECOMPILED_HEADER
PrecompiledOption = -DUSE_PRECOMPILED_HEADER
UpdatePCH         = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) 
else
UpdatePCH         = \# precompiled header is not used
PrecompiledOption = 
endif

The following line will be called with an undfined PRECOMPILED_HEADER
UpdatePCH         = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) 

This triggers a single threaded build of the JVM.

                                    

Comments
SUGGESTED FIX

diff -r bca17e38de00 make/bsd/makefiles/top.make
--- a/make/bsd/makefiles/top.make	Tue Aug 09 10:16:01 2011 -0700
+++ b/make/bsd/makefiles/top.make	Mon Nov 28 14:53:35 2011 +0100
@@ -47,12 +47,10 @@
 Plat_File   = $(Platform_file)
 CDG         = cd $(GENERATED); 
 
-ifdef USE_PRECOMPILED_HEADER
-PrecompiledOption = -DUSE_PRECOMPILED_HEADER
+ifdef PRECOMPILED_HEADER
 UpdatePCH         = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) 
 else
 UpdatePCH         = \# precompiled header is not used
-PrecompiledOption = 
 endif
 
 Cached_plat = $(GENERATED)/platform.current
diff -r bca17e38de00 make/linux/makefiles/top.make
--- a/make/linux/makefiles/top.make	Tue Aug 09 10:16:01 2011 -0700
+++ b/make/linux/makefiles/top.make	Mon Nov 28 14:53:35 2011 +0100
@@ -47,12 +47,10 @@
 Plat_File   = $(Platform_file)
 CDG         = cd $(GENERATED); 
 
-ifdef USE_PRECOMPILED_HEADER
-PrecompiledOption = -DUSE_PRECOMPILED_HEADER
+ifdef PRECOMPILED_HEADER
 UpdatePCH         = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) 
 else
 UpdatePCH         = \# precompiled header is not used
-PrecompiledOption = 
 endif
 
 Cached_plat = $(GENERATED)/platform.current
                                     
2011-11-28
EVALUATION

See suggested fix.
                                     
2011-11-28
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/f4414323345f
                                     
2011-12-06
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-emb/hotspot/rev/f4414323345f
                                     
2011-12-15
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/f4414323345f
                                     
2012-03-22



Hardware and Software, Engineered to Work Together