# HG changeset patch # User andrew # Date 1316652879 -3600 # Node ID 333e434c8cae41a12787656fd88c97bb72f63bbf # Parent 36b175c67e065a09e80d6b51c4e3357372ef89c9 Add support for SH architecture. diff -r 36b175c67e06 -r 333e434c8cae make/common/Defs-linux.gmk --- a/make/common/Defs-linux.gmk Thu Sep 22 01:53:15 2011 +0100 +++ b/make/common/Defs-linux.gmk Thu Sep 22 01:54:39 2011 +0100 @@ -119,6 +119,7 @@ LDFLAGS_COMMON_sparc += -m32 -mcpu=v9 CFLAGS_REQUIRED_arm += -fsigned-char -D_LITTLE_ENDIAN CFLAGS_REQUIRED_ppc += -fsigned-char -D_BIG_ENDIAN +CFLAGS_REQUIRED_sh += -mieee ifeq ($(ZERO_BUILD), true) CFLAGS_REQUIRED = $(ZERO_ARCHFLAG) ifeq ($(ZERO_ENDIANNESS), little) @@ -197,11 +198,15 @@ CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"' -# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here) -ifneq ($(ARCH),alpha) +# Alpha and sh archs do not like "alpha" or "sh" defined (potential general arch cleanup issue here) +ifeq ($(ARCH),alpha) + CPP_ARCH_FLAGS += -D_$(ARCH)_ +else +ifeq ($(ARCH),sh) + CPP_ARCH_FLAGS += -D_$(ARCH)_ +else CPP_ARCH_FLAGS += -D$(ARCH) -else - CPP_ARCH_FLAGS += -D_$(ARCH)_ +endif endif CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -DLINUX $(VERSION_DEFINES) \ diff -r 36b175c67e06 -r 333e434c8cae make/common/shared/Compiler-gcc.gmk --- a/make/common/shared/Compiler-gcc.gmk Thu Sep 22 01:53:15 2011 +0100 +++ b/make/common/shared/Compiler-gcc.gmk Thu Sep 22 01:54:39 2011 +0100 @@ -127,6 +127,11 @@ REQUIRED_CC_VER = 3.2 REQUIRED_GCC_VER = 3.2.* endif + ifneq ("$(findstring sh,$(ARCH))", "") + # sh4*, sh3* + REQUIRED_CC_VER = 4.0 + REQUIRED_GCC_VER = 4.0.* + endif # Option used to create a shared library SHARED_LIBRARY_FLAG = -shared -mimpure-text SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 ) diff -r 36b175c67e06 -r 333e434c8cae make/common/shared/Platform.gmk --- a/make/common/shared/Platform.gmk Thu Sep 22 01:53:15 2011 +0100 +++ b/make/common/shared/Platform.gmk Thu Sep 22 01:54:39 2011 +0100 @@ -179,6 +179,9 @@ arm*) \ echo arm \ ;; \ + sh*) \ + echo sh \ + ;; \ *) \ echo $(mach) \ ;; \ @@ -208,6 +211,9 @@ ifeq ($(ARCH), ia64) ARCH_DATA_MODEL=64 endif + ifeq ($(ARCH), sh) + ARCH_DATA_MODEL=32 + endif endif endif diff -r 36b175c67e06 -r 333e434c8cae make/javax/sound/SoundDefs.gmk --- a/make/javax/sound/SoundDefs.gmk Thu Sep 22 01:53:15 2011 +0100 +++ b/make/javax/sound/SoundDefs.gmk Thu Sep 22 01:54:39 2011 +0100 @@ -126,6 +126,10 @@ CPPFLAGS += -DX_ARCH=X_PPC endif # ARCH ppc + ifeq ($(ARCH), sh) + CPPFLAGS += -DX_ARCH=X_SH + endif # ARCH Renesas SuperH(sh) + endif diff -r 36b175c67e06 -r 333e434c8cae make/jdk_generic_profile.sh --- a/make/jdk_generic_profile.sh Thu Sep 22 01:53:15 2011 +0100 +++ b/make/jdk_generic_profile.sh Thu Sep 22 01:54:39 2011 +0100 @@ -259,13 +259,14 @@ i?86) ZERO_LIBARCH=i386 ;; sparc64) ZERO_LIBARCH=sparcv9 ;; arm*) ZERO_LIBARCH=arm ;; + sh*) ZERO_LIBARCH=sh ;; *) ZERO_LIBARCH="$(arch)" esac export ZERO_LIBARCH # ARCH_DATA_MODEL is the number of bits in a pointer case "${ZERO_LIBARCH}" in - i386|ppc|s390|sparc|arm) + i386|ppc|s390|sparc|arm|sh) ARCH_DATA_MODEL=32 ;; amd64|ppc64|s390x|sparcv9|ia64|alpha) diff -r 36b175c67e06 -r 333e434c8cae src/share/native/com/sun/media/sound/SoundDefs.h --- a/src/share/native/com/sun/media/sound/SoundDefs.h Thu Sep 22 01:53:15 2011 +0100 +++ b/src/share/native/com/sun/media/sound/SoundDefs.h Thu Sep 22 01:54:39 2011 +0100 @@ -48,7 +48,7 @@ #define X_PPC64 13 #define X_S390 14 #define X_S390X 15 - +#define X_SH 16 // ********************************** // Make sure you set X_PLATFORM and X_ARCH defines correctly.