diff make/defs.make @ 198:6470a2a42f92

6647068: libjvm.so is not built PIC Summary: Remove the preferred base address built with libjvm.so and unified the PIC approach on Solaris & Linux. Reviewed-by: never, kamg Contributed-by: xiaobin.lu@sun.com
author xlu
date Tue, 10 Jun 2008 16:39:20 -0700
parents a294fd0c4b38
children f232d7d67023
line wrap: on
line diff
--- a/make/defs.make	Fri Jun 06 14:34:24 2008 -0700
+++ b/make/defs.make	Tue Jun 10 16:39:20 2008 -0700
@@ -261,3 +261,21 @@
 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jni.h
 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h
 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jmm.h
+
+# A list of object files built without the platform specific PIC flags, e.g.
+# -fPIC on linux. Performance measurements show that by compiling GC related 
+# code, we could significantly reduce the GC pause time on 32 bit Linux/Unix
+# platforms. See 6454213 for more details.
+include $(GAMMADIR)/make/scm.make
+
+ifneq ($(OSNAME), windows)
+  ifndef LP64
+    NONPIC_DIRS  = memory oops gc_implementation gc_interface 
+    NONPIC_DIRS  := $(foreach dir,$(NONPIC_DIRS), $(GAMMADIR)/src/share/vm/$(dir))
+    # Look for source files under NONPIC_DIRS
+    NONPIC_FILES := $(foreach dir,$(NONPIC_DIRS),\
+                      $(shell find $(dir) \( $(SCM_DIRS) \) -prune -o \
+		      -name '*.cpp' -print))
+    NONPIC_OBJ_FILES := $(notdir $(subst .cpp,.o,$(NONPIC_FILES)))
+  endif
+endif