--- openjdk/jdk/make/javax/sound/SoundDefs.gmk.orig	2008-10-15 17:04:19.000000000 +0200
+++ openjdk/jdk/make/javax/sound/SoundDefs.gmk	2008-10-15 17:09:56.000000000 +0200
@@ -58,10 +58,54 @@
 ifdef ICEDTEA_ZERO_BUILD
   CPPFLAGS += -DX_ARCH=X_ZERO
 else
+  ifeq ($(ARCH), alpha)
+    CPPFLAGS += -DX_ARCH=X_ALPHA
+  endif # ARCH alpha
+
+  ifeq ($(ARCH), amd64)
+    CPPFLAGS += -DX_ARCH=X_AMD64
+  endif # ARCH amd64
+
+  ifeq ($(ARCH), arm)
+    CPPFLAGS += -DX_ARCH=X_ARM
+  endif # ARCH arm
+
   ifeq ($(ARCH), i586)
     CPPFLAGS += -DX_ARCH=X_I586
   endif # ARCH i586
 
+  ifeq ($(ARCH), ia64)
+    CPPFLAGS += -DX_ARCH=X_IA64
+  endif # ARCH ia64
+
+  ifeq ($(ARCH), m68k)
+    CPPFLAGS += -DX_ARCH=X_M68K
+  endif # ARCH m68k
+
+  ifeq ($(ARCH), mips)
+    CPPFLAGS += -DX_ARCH=X_MIPS
+  endif # ARCH mips
+
+  ifeq ($(ARCH), mipsel)
+    CPPFLAGS += -DX_ARCH=X_MIPSEL
+  endif # ARCH mipsel
+
+  ifeq ($(ARCH), ppc)
+    CPPFLAGS += -DX_ARCH=X_PPC
+  endif # ARCH ppc
+
+  ifeq ($(ARCH), ppc64)
+    CPPFLAGS += -DX_ARCH=X_PPC64
+  endif # ARCH ppc64
+
+  ifeq ($(ARCH), s390)
+    CPPFLAGS += -DX_ARCH=X_S390
+  endif # ARCH s390
+
+  ifeq ($(ARCH), s390x)
+    CPPFLAGS += -DX_ARCH=X_S390X
+  endif # ARCH s390x
+
   ifeq ($(ARCH), sparc)
     CPPFLAGS += -DX_ARCH=X_SPARC
   endif # ARCH sparc
@@ -69,10 +113,6 @@
   ifeq ($(ARCH), sparcv9)
     CPPFLAGS += -DX_ARCH=X_SPARCV9
   endif # ARCH sparcv9
-
-  ifeq ($(ARCH), amd64)
-    CPPFLAGS += -DX_ARCH=X_AMD64
-  endif # ARCH amd64
 endif
 
 
--- openjdk/jdk/make/common/Defs-linux.gmk.orig	2008-10-15 17:04:21.000000000 +0200
+++ openjdk/jdk/make/common/Defs-linux.gmk	2008-10-15 17:08:37.000000000 +0200
@@ -102,9 +102,19 @@
 #    We need this frame pointer to make it easy to walk the stacks.
 #    This should be the default on X86, but ia64 and amd64 may not have this
 #    as the default.
+CFLAGS_REQUIRED_alpha   += -mieee -D_LITTLE_ENDIAN
 CFLAGS_REQUIRED_amd64   += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_arm     += -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_hppa    +=
 CFLAGS_REQUIRED_i586    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
 CFLAGS_REQUIRED_ia64    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_m68k    +=
+CFLAGS_REQUIRED_mips    +=
+CFLAGS_REQUIRED_mipsel  += -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_ppc     += -m32
+CFLAGS_REQUIRED_ppc64   += -m64
+CFLAGS_REQUIRED_s390    +=
+CFLAGS_REQUIRED_s390x   += -m64
 CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
 LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
 CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
--- openjdk/jdk/make/common/shared/Compiler-gcc.gmk.orig	2008-10-15 17:04:19.000000000 +0200
+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk	2008-10-15 17:11:28.000000000 +0200
@@ -70,28 +70,56 @@
   else
     CXX            = $(COMPILER_PATH)g++$(GCC_SUFFIX)
   endif
-  ifneq ("$(findstring sparc,$(ARCH))", "")
-    # sparc or sparcv9
-    REQUIRED_CC_VER = 4.0
-    REQUIRED_GCC_VER = 4.0.*
-  else
-  ifeq ($(ARCH_DATA_MODEL), 32)
-    # i586
+  ifeq ($(ARCH), alpha)
+    # alpha
     REQUIRED_CC_VER = 3.2
-    REQUIRED_GCC_VER = 3.2.1*
-    REQUIRED_GCC_VER_INT = 3.2.1-7a
-  else
+    REQUIRED_GCC_VER = 3.2.*
+  endif
   ifeq ($(ARCH), amd64)
     # amd64
     REQUIRED_CC_VER = 3.2
     REQUIRED_GCC_VER = 3.2.*
   endif
+  ifeq ($(ARCH), arm)
+    # arm
+    REQUIRED_CC_VER = 3.2
+    REQUIRED_GCC_VER = 3.2.*
+  endif
+  ifeq ($(ARCH), i586)
+    # i586
+    REQUIRED_CC_VER = 3.2
+    REQUIRED_GCC_VER = 3.2.1*
+    REQUIRED_GCC_VER_INT = 3.2.1-7a
+  endif
   ifeq ($(ARCH), ia64)
     # ia64
     REQUIRED_CC_VER = 3.2
     REQUIRED_GCC_VER = 2.9[56789].*
   endif
+  ifneq ("$(findstring m68k,$(ARCH))", "")
+    # m68k
+    REQUIRED_CC_VER = 3.2
+    REQUIRED_GCC_VER = 3.2.*
   endif
+  ifneq ("$(findstring mips,$(ARCH))", "")
+    # mips
+    REQUIRED_CC_VER = 3.2
+    REQUIRED_GCC_VER = 3.2.*
+  endif
+  ifneq ("$(findstring ppc,$(ARCH))", "")
+    # ppc or ppc64
+    REQUIRED_CC_VER = 3.2
+    REQUIRED_GCC_VER = 3.2.*
+  endif
+  ifneq ("$(findstring s390,$(ARCH))", "")
+    # s390 or s390x
+    REQUIRED_CC_VER = 3.2
+    REQUIRED_GCC_VER = 3.2.*
+  endif
+  ifneq ("$(findstring sparc,$(ARCH))", "")
+    # sparc or sparcv9
+    REQUIRED_CC_VER = 4.0
+    REQUIRED_GCC_VER = 4.0.*
   endif
   # Option used to create a shared library
   SHARED_LIBRARY_FLAG = -shared -mimpure-text
--- openjdk/jdk/make/common/shared/Platform.gmk.orig	2008-10-15 17:04:19.000000000 +0200
+++ openjdk/jdk/make/common/shared/Platform.gmk	2008-10-15 17:13:49.000000000 +0200
@@ -237,9 +237,40 @@
   else
     # i586 is 32-bit, amd64 is 64-bit
     ifndef ARCH_DATA_MODEL
+      ifeq ($(ARCH), alpha)
+        ARCH_DATA_MODEL=64
+      endif
+      ifeq ($(ARCH), amd64)
+        ARCH_DATA_MODEL=64
+      endif
+      ifeq ($(ARCH), arm)
+        ARCH_DATA_MODEL=32
+      endif
       ifeq ($(ARCH), i586)
         ARCH_DATA_MODEL=32
-      else
+      endif
+      ifeq ($(ARCH), ia64)
+        ARCH_DATA_MODEL=64
+      endif
+      ifeq ($(ARCH), m68k)
+        ARCH_DATA_MODEL=32
+      endif
+      ifeq ($(ARCH), mips)
+        ARCH_DATA_MODEL=32
+      endif
+      ifeq ($(ARCH), mipsel)
+        ARCH_DATA_MODEL=32
+      endif
+      ifeq ($(ARCH), ppc)
+        ARCH_DATA_MODEL=32
+      endif
+      ifeq ($(ARCH), ppc64)
+        ARCH_DATA_MODEL=64
+      endif
+      ifeq ($(ARCH), s390)
+        ARCH_DATA_MODEL=32
+      endif
+      ifeq ($(ARCH), s390x)
         ARCH_DATA_MODEL=64
       endif
     endif
--- openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h.orig	2008-10-15 17:04:19.000000000 +0200
+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h	2008-10-15 17:13:01.000000000 +0200
@@ -33,12 +33,21 @@
 #define X_LINUX         3
 
 // types for X_ARCH
-#define X_I586          1
-#define X_SPARC         2
-#define X_SPARCV9       3
-#define X_IA64          4
-#define X_AMD64         5
-#define X_ZERO          6
+#define X_ALPHA         1
+#define X_AMD64         2
+#define X_ARM           3
+#define X_I586          4
+#define X_IA64          5
+#define X_M68K          6
+#define X_MIPS          7
+#define X_MIPSEL        8
+#define X_PPC           9
+#define X_PPC64         10
+#define X_S390          11
+#define X_S390X         12
+#define X_SPARC         13
+#define X_SPARCV9       14
+#define X_ZERO          15
 
 // **********************************
 // Make sure you set X_PLATFORM and X_ARCH defines correctly.
--- openjdk/corba/make/common/Defs-linux.gmk.orig	2008-10-15 17:04:20.000000000 +0200
+++ openjdk/corba/make/common/Defs-linux.gmk	2008-10-15 17:08:37.000000000 +0200
@@ -92,9 +92,19 @@
 #    We need this frame pointer to make it easy to walk the stacks.
 #    This should be the default on X86, but ia64 and amd64 may not have this
 #    as the default.
+CFLAGS_REQUIRED_alpha   += -mieee -D_LITTLE_ENDIAN
 CFLAGS_REQUIRED_amd64   += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_arm     += -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_hppa    +=
 CFLAGS_REQUIRED_i586    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
 CFLAGS_REQUIRED_ia64    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_m68k    +=
+CFLAGS_REQUIRED_mips    +=
+CFLAGS_REQUIRED_mipsel  += -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_ppc     += -m32
+CFLAGS_REQUIRED_ppc64   += -m64
+CFLAGS_REQUIRED_s390    +=
+CFLAGS_REQUIRED_s390x   += -m64
 CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
 LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
 CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
--- openjdk/corba/make/common/shared/Platform.gmk.orig	2008-10-15 17:04:19.000000000 +0200
+++ openjdk/corba/make/common/shared/Platform.gmk	2008-10-15 17:12:19.000000000 +0200
@@ -227,9 +227,40 @@
   else
     # i586 is 32-bit, amd64 is 64-bit
     ifndef ARCH_DATA_MODEL
+      ifeq ($(ARCH), alpha)
+        ARCH_DATA_MODEL=64
+      endif
+      ifeq ($(ARCH), amd64)
+        ARCH_DATA_MODEL=64
+      endif
+      ifeq ($(ARCH), arm)
+        ARCH_DATA_MODEL=32
+      endif
       ifeq ($(ARCH), i586)
         ARCH_DATA_MODEL=32
-      else
+      endif
+      ifeq ($(ARCH), ia64)
+        ARCH_DATA_MODEL=64
+      endif
+      ifeq ($(ARCH), m68k)
+        ARCH_DATA_MODEL=32
+      endif
+      ifeq ($(ARCH), mips)
+        ARCH_DATA_MODEL=32
+      endif
+      ifeq ($(ARCH), mipsel)
+        ARCH_DATA_MODEL=32
+      endif
+      ifeq ($(ARCH), ppc)
+        ARCH_DATA_MODEL=32
+      endif
+      ifeq ($(ARCH), ppc64)
+        ARCH_DATA_MODEL=64
+      endif
+      ifeq ($(ARCH), s390)
+        ARCH_DATA_MODEL=32
+      endif
+      ifeq ($(ARCH), s390x)
         ARCH_DATA_MODEL=64
       endif
     endif
