From cb7965da154793430d935f4965d7360198b711ba Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 16 Oct 2009 13:52:40 -0700 Subject: xscale: better fix for debug_handler.bin Generate a C struct with the data, and use that, instead of an assembly language file. The assembly language causes issues on Darwin and MS-Windows, which don't necessarily use GNU AS; or if they do, don't necessarily use its ELF syntax. It's also better in two other ways: fewer global symbols; and the init-time size check gets optimized away at compile time. (Unless it fails, in which case bigger chunks of the file vanish.) Signed-off-by: David Brownell --- src/target/Makefile.am | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/target/Makefile.am') diff --git a/src/target/Makefile.am b/src/target/Makefile.am index a2c34f0f..ea1641ef 100644 --- a/src/target/Makefile.am +++ b/src/target/Makefile.am @@ -10,11 +10,10 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/jtag \ -I$(top_srcdir)/src/xsvf -# ideally this would be specific to xscale_debug.S ... -libtarget_la_CCASFLAGS = \ - -Wa,-I$(top_srcdir)/src/target \ - $(AM_CCASFLAGS) +BIN2C = $(top_srcdir)/src/helper/bin2char$(EXEEXT_FOR_BUILD) +xscale_debug.h: $(BIN2C) xscale/debug_handler.bin + $(BIN2C) < xscale/debug_handler.bin xscale_debug_handler > xscale_debug.h METASOURCES = AUTO noinst_LTLIBRARIES = libtarget.la @@ -41,7 +40,6 @@ libtarget_la_SOURCES = \ feroceon.c \ etb.c \ xscale.c \ - xscale_debug.S \ arm_simulator.c \ image.c \ armv7m.c \ @@ -62,6 +60,9 @@ libtarget_la_SOURCES = \ mips_ejtag.c \ avrt.c +BUILT_SOURCES = \ + xscale_debug.h + noinst_HEADERS = \ target.h \ target_type.h \ @@ -85,6 +86,7 @@ noinst_HEADERS = \ arm926ejs.h \ etb.h \ xscale.h \ + xscale_debug.h \ arm_simulator.h \ image.h \ armv7m.h \ -- cgit v1.2.3