diff -Nru openjdk.orig/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
--- openjdk.orig/hotspot/src/share/tools/hsdis/hsdis.c	2013-06-04 18:47:35.000000000 +0100
+++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c	2013-08-14 19:15:31.115736658 +0100
@@ -35,6 +35,8 @@
 #include <dis-asm.h>
 #include <inttypes.h>
 
+#include <string.h>
+
 #ifndef bool
 #define bool int
 #define true 1
@@ -418,6 +420,9 @@
 #ifdef LIBARCH_sparcv9
     res = "sparc:v9b";
 #endif
+#ifdef LIBARCH_arm
+    res = "arm";
+#endif
   if (res == NULL)
     res = "architecture not set in Makefile!";
   return res;
diff -Nru openjdk.orig/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
--- openjdk.orig/hotspot/src/share/tools/hsdis/Makefile	2013-06-04 18:47:35.000000000 +0100
+++ openjdk/hotspot/src/share/tools/hsdis/Makefile	2013-08-14 19:03:42.696629776 +0100
@@ -68,14 +68,18 @@
 CONFIGURE_ARGS= --host=$(MINGW) --target=$(MINGW)
 else
 CPU             = $(shell uname -m)
+ifneq		 ($(findstring arm,$(CPU)),)
+ARCH=arm
+else
 ARCH1=$(CPU:x86_64=amd64)
 ARCH=$(ARCH1:i686=i386)
 CFLAGS/i386	+= -m32
 CFLAGS/sparc	+= -m32
 CFLAGS/sparcv9	+= -m64
 CFLAGS/amd64	+= -m64
+endif
 CFLAGS		+= $(CFLAGS/$(ARCH))
-CFLAGS		+= -fPIC
+CFLAGS		+= -fPIC -g
 OS		= linux
 LIB_EXT		= .so
 CC 		= gcc
@@ -118,7 +122,7 @@
 BINUTILSDIR	= $(shell cd $(BINUTILS);pwd)
 endif
 
-CPPFLAGS	+= -I$(BINUTILSDIR)/include -I$(BINUTILS)/bfd -I$(TARGET_DIR)/bfd
+CPPFLAGS	+= -I$(BINUTILSDIR)/include -I$(BINUTILSDIR)/bfd -I$(TARGET_DIR)/bfd
 CPPFLAGS	+= -DLIBARCH_$(LIBARCH) -DLIBARCH=\"$(LIBARCH)\" -DLIB_EXT=\"$(LIB_EXT)\"
 
 TARGET_DIR	= build/$(OS)-$(JDKARCH)
@@ -145,7 +149,7 @@
 demo: $(TARGET) $(DEMO_TARGET)
 
 $(LIBRARIES): $(TARGET_DIR) $(TARGET_DIR)/Makefile
-	if [ ! -f $@ ]; then cd $(TARGET_DIR); make all-opcodes; fi
+	if [ ! -f $@ ]; then cd $(TARGET_DIR); make all-opcodes "CFLAGS=$(CFLAGS)"; fi
 
 $(TARGET_DIR)/Makefile:
 	(cd $(TARGET_DIR); CC=$(CC) CFLAGS="$(CFLAGS)" $(BINUTILSDIR)/configure --disable-nls $(CONFIGURE_ARGS))
