Mercurial > hg > release > icedtea7-forest-2.1 > hotspot
changeset 2934:e0dc4262c74a
Add patches/arm-hsdis.patch from IcedTea 6
author | aph |
---|---|
date | Thu, 15 Mar 2012 07:58:32 -0400 |
parents | c1d02b230f8f |
children | 065df7302cf5 |
files | src/share/tools/hsdis/Makefile src/share/tools/hsdis/hsdis.c |
diffstat | 2 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/tools/hsdis/Makefile Thu Mar 15 07:57:19 2012 -0400 +++ b/src/share/tools/hsdis/Makefile Thu Mar 15 07:58:32 2012 -0400 @@ -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))
--- a/src/share/tools/hsdis/hsdis.c Thu Mar 15 07:57:19 2012 -0400 +++ b/src/share/tools/hsdis/hsdis.c Thu Mar 15 07:58:32 2012 -0400 @@ -35,6 +35,8 @@ #include <dis-asm.h> #include <inttypes.h> +#include <string.h> + #ifndef bool #define bool int #define true 1 @@ -356,7 +358,7 @@ if (plen > mach_size) plen = mach_size; strncpy(mach_option, p, plen); mach_option[plen] = '\0'; - } else if (plen > 6 && strncmp(p, "hsdis-", 6)) { + } else if (plen > 6 && !strncmp(p, "hsdis-", 6)) { // do not pass these to the next level } else { /* just copy it; {i386,sparc}-dis.c might like to see it */ @@ -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;