From ebc9df9f7e5ca246ba11a70f7c3d1631f092bd08 Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 22 Oct 2009 20:16:32 +0000 Subject: [PATCH] 32x drc functional on ARM, random adjustments git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@824 be3aeb3a-fb24-0410-a615-afba39da0efa --- gp2x/Makefile | 7 ++++--- linux/Makefile | 12 ++++++------ linux/host_dasm.c | 3 ++- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/gp2x/Makefile b/gp2x/Makefile index bcaa1d0..01e4e3b 100644 --- a/gp2x/Makefile +++ b/gp2x/Makefile @@ -15,14 +15,15 @@ amalgamate = 0 use_sh2drc = 1 drc_debug = 1 +-include Makefile.local ifeq "$(debug_cyclone)" "1" use_cyclone = 1 use_musashi = 1 endif ifeq "$(use_musashi)" "1" +# due to CPU stop flag acces asm_cdpico = 0 -asm_memory = 0 asm_cdmemory = 0 else use_cyclone = 1 @@ -119,8 +120,8 @@ DEFINES += DRC_SH2 DRC_TMP OBJS += cpu/sh2/mame/sh2pico.o OBJS += cpu/sh2/compiler.o OBJS += cpu/sh2/stub_arm.o -ifeq "$(drc_debug)" "1" -DEFINES += DRC_DEBUG=1 +ifdef drc_debug +DEFINES += DRC_DEBUG=$(drc_debug) OBJS += cpu/sh2/mame/sh2dasm.o OBJS += platform/linux/host_dasm.o LDFLAGS += -lbfd -lopcodes -liberty diff --git a/linux/Makefile b/linux/Makefile index 9ca3295..7ecf4e3 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -22,13 +22,13 @@ CFLAGS += -ggdb -Wall -falign-functions=2 endif DEFINES = _UNZIP_SUPPORT IO_STATS IN_EVDEV CFLAGS += -I../.. -I. -LDFLAGS += -lpthread +LDFLAGS += -lm -lpng ifeq "$(ARCH)" "arm" CFLAGS += -mcpu=arm920t DEFINES += ARM -else -LDFLAGS += -lX11 endif +LDFLAGS += -lpthread +LDFLAGS += -lX11 CC = $(CROSS)gcc @@ -95,8 +95,8 @@ DEFINES += DRC_SH2 DRC_TMP OBJS += cpu/sh2/mame/sh2pico.o OBJS += cpu/sh2/compiler.o OBJS += cpu/sh2/stub_$(ARCH).o -ifeq "$(drc_debug)" "1" -DEFINES += DRC_DEBUG=1 +ifdef drc_debug +DEFINES += DRC_DEBUG=$(drc_debug) OBJS += cpu/sh2/mame/sh2dasm.o OBJS += host_dasm.o LDFLAGS += -lbfd -lopcodes -liberty @@ -132,7 +132,7 @@ tidy: PicoDrive : $(OBJS) @echo ">>>" $@ - $(CC) $(CFLAGS) $^ $(LDFLAGS) -lm -lpng -Wl,-Map=PicoDrive.map -o $@ + $(CC) $(CFLAGS) $^ $(LDFLAGS) -Wl,-Map=PicoDrive.map -o $@ mkdirs: @mkdir -p $(DIRS) diff --git a/linux/host_dasm.c b/linux/host_dasm.c index a3c0e00..91ea4da 100644 --- a/linux/host_dasm.c +++ b/linux/host_dasm.c @@ -37,7 +37,7 @@ remove_useless_symbols (asymbol **symbols, long count) { asymbol *sym = *in_ptr++; - if (sym->name == NULL || sym->name[0] == '\0') + if (sym->name == NULL || sym->name[0] == '\0' || sym->name[0] == '$') continue; if (sym->flags & (BSF_DEBUGGING | BSF_SECTION_SYM)) continue; @@ -53,6 +53,7 @@ remove_useless_symbols (asymbol **symbols, long count) */ *out_ptr++ = sym; } + return out_ptr - symbols; } -- 2.39.2