changeset 94:568e606431a1

Zero-assembler port of HotSpot. Contributed-by: Gary Benson <gbenson@redhat.com>
author andrew
date Thu, 23 Jul 2009 15:54:02 +0100
parents 047dd27fddb6
children 5bd83d1b2476
files make/common/Defs-linux.gmk make/common/shared/Compiler-gcc.gmk make/common/shared/Platform.gmk
diffstat 3 files changed, 22 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Defs-linux.gmk	Mon Jul 06 17:11:04 2009 -0400
+++ b/make/common/Defs-linux.gmk	Thu Jul 23 15:54:02 2009 +0100
@@ -99,8 +99,16 @@
 LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
 CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
 LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
-CFLAGS_REQUIRED         =  $(CFLAGS_REQUIRED_$(ARCH))
-LDFLAGS_COMMON          += $(LDFLAGS_COMMON_$(ARCH))
+ifeq ($(ZERO_BUILD), true)
+  CFLAGS_REQUIRED       =  $(ZERO_ARCHFLAG)
+  ifeq ($(ZERO_ENDIANNESS), little)
+    CFLAGS_REQUIRED     += -D_LITTLE_ENDIAN
+  endif
+  LDFLAGS_COMMON        += $(ZERO_ARCHFLAG)
+else
+  CFLAGS_REQUIRED       =  $(CFLAGS_REQUIRED_$(ARCH))
+  LDFLAGS_COMMON        += $(LDFLAGS_COMMON_$(ARCH))
+endif
 
 # Add in platform specific optimizations for all opt levels
 CC_HIGHEST_OPT += $(_OPT_$(ARCH))
@@ -196,7 +204,7 @@
 
 EXTRA_LIBS += -lc
 
-LDFLAGS_DEFS_OPTION  = -z defs
+LDFLAGS_DEFS_OPTION  = -Xlinker -z -Xlinker defs
 LDFLAGS_COMMON  += $(LDFLAGS_DEFS_OPTION)
 
 #
--- a/make/common/shared/Compiler-gcc.gmk	Mon Jul 06 17:11:04 2009 -0400
+++ b/make/common/shared/Compiler-gcc.gmk	Thu Jul 23 15:54:02 2009 +0100
@@ -70,6 +70,11 @@
   else
     CXX            = $(COMPILER_PATH)g++
   endif
+  ifeq ($(ZERO_BUILD), true)
+    # zero
+    REQUIRED_CC_VER = 3.2
+    REQUIRED_GCC_VER = 3.2.*
+  else
   ifneq ("$(findstring sparc,$(ARCH))", "")
     # sparc or sparcv9
     REQUIRED_CC_VER = 4.0
@@ -88,6 +93,7 @@
   endif
   endif
   endif
+  endif
   # Option used to create a shared library
   SHARED_LIBRARY_FLAG = -shared -mimpure-text
   SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
--- a/make/common/shared/Platform.gmk	Mon Jul 06 17:11:04 2009 -0400
+++ b/make/common/shared/Platform.gmk	Thu Jul 23 15:54:02 2009 +0100
@@ -202,6 +202,11 @@
   ARCH_FAMILY := $(ARCH)
 
   # Linux builds may be 32-bit or 64-bit data model.
+  ifeq ($(ZERO_BUILD), true)
+    ifndef ARCH_DATA_MODEL
+      ARCH_DATA_MODEL = $(ZERO_BITSPERWORD)
+    endif
+  endif
   ifeq ($(ARCH), sparc)
     # Linux sparc build can be either 32-bit or 64-bit.
     #   Default to 32, but allow explicit setting to 32 or 64.