forked from Imagelibrary/binutils-gdb
Compare commits
8 Commits
gdb-14.1-r
...
users/vapi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abd30f23b0 | ||
|
|
5894c5944c | ||
|
|
267058274c | ||
|
|
007b6af6e1 | ||
|
|
430e1e5517 | ||
|
|
ef3bd6c15e | ||
|
|
6f9208a40f | ||
|
|
7f19eb0786 |
@@ -47,8 +47,11 @@ AM_CPPFLAGS = \
|
|||||||
-I$(srcroot)/include \
|
-I$(srcroot)/include \
|
||||||
-I../bfd \
|
-I../bfd \
|
||||||
-I.. \
|
-I.. \
|
||||||
|
-I$(@D) \
|
||||||
|
-I$(srcdir)/$(@D) \
|
||||||
$(SIM_HW_CFLAGS) \
|
$(SIM_HW_CFLAGS) \
|
||||||
$(SIM_INLINE)
|
$(SIM_INLINE) \
|
||||||
|
$(AM_CPPFLAGS_$(@D))
|
||||||
|
|
||||||
AM_CPPFLAGS_FOR_BUILD = \
|
AM_CPPFLAGS_FOR_BUILD = \
|
||||||
-I$(srcroot)/include \
|
-I$(srcroot)/include \
|
||||||
|
|||||||
@@ -21,13 +21,7 @@
|
|||||||
|
|
||||||
## COMMON_PRE_CONFIG_FRAG
|
## COMMON_PRE_CONFIG_FRAG
|
||||||
|
|
||||||
SIM_OBJS = \
|
SIM_LIBSIM =
|
||||||
$(SIM_NEW_COMMON_OBJS) \
|
|
||||||
interp.o \
|
|
||||||
cpustate.o \
|
|
||||||
simulator.o \
|
|
||||||
memory.o \
|
|
||||||
sim-resume.o \
|
|
||||||
|
|
||||||
## COMMON_POST_CONFIG_FRAG
|
## COMMON_POST_CONFIG_FRAG
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,22 @@
|
|||||||
## You should have received a copy of the GNU General Public License
|
## You should have received a copy of the GNU General Public License
|
||||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
AM_CPPFLAGS_%D% = -DSIM_TOPDIR_BUILD
|
||||||
|
|
||||||
|
%C%_libsim_a_SOURCES = \
|
||||||
|
%D%/cpustate.c \
|
||||||
|
%D%/interp.c \
|
||||||
|
%D%/memory.c \
|
||||||
|
%D%/modules.c \
|
||||||
|
%D%/simulator.c
|
||||||
|
%C%_libsim_a_LIBADD = \
|
||||||
|
$(common_libcommon_a_OBJECTS) \
|
||||||
|
$(patsubst %,%D%/%,$(SIM_NEW_COMMON_OBJS)) \
|
||||||
|
$(patsubst %,%D%/dv-%.o,$(SIM_HW_DEVICES)) \
|
||||||
|
%D%/sim-resume.o
|
||||||
|
|
||||||
|
noinst_LIBRARIES += %D%/libsim.a
|
||||||
|
|
||||||
%C%_run_SOURCES =
|
%C%_run_SOURCES =
|
||||||
%C%_run_LDADD = \
|
%C%_run_LDADD = \
|
||||||
%D%/nrun.o \
|
%D%/nrun.o \
|
||||||
@@ -23,3 +39,10 @@
|
|||||||
$(SIM_COMMON_LIBS)
|
$(SIM_COMMON_LIBS)
|
||||||
|
|
||||||
noinst_PROGRAMS += %D%/run
|
noinst_PROGRAMS += %D%/run
|
||||||
|
|
||||||
|
SIM_ALL_RECURSIVE_DEPS += %D%/modules.c
|
||||||
|
|
||||||
|
$(%C%_libsim_a_OBJECTS) $(%C%_run_OBJECTS) $(%C%_libsim_a_LIBADD): | $(SIM_ALL_RECURSIVE_DEPS)
|
||||||
|
|
||||||
|
%D%/%.o: common/%.c | $(SIM_ALL_RECURSIVE_DEPS)
|
||||||
|
$(AM_V_CC)$(COMPILE) -c -o $@ $<
|
||||||
|
|||||||
@@ -71,6 +71,5 @@ CGENDIR = @cgendir@
|
|||||||
SIM_INLINE = @SIM_INLINE@
|
SIM_INLINE = @SIM_INLINE@
|
||||||
|
|
||||||
SIM_HW_CFLAGS = @SIM_HW_CFLAGS@
|
SIM_HW_CFLAGS = @SIM_HW_CFLAGS@
|
||||||
SIM_HW_SOCKSER = @SIM_HW_SOCKSER@
|
SIM_HW_OBJS = $(SIM_HW_DEVICES:%=dv-%.o)
|
||||||
SIM_HW_OBJS = $(SIM_COMMON_HW_OBJS) $(SIM_HW_DEVICES:%=dv-%.o) $(SIM_HW_SOCKSER)
|
|
||||||
@SIM_ENABLE_HW_FALSE@SIM_HW_OBJS =
|
@SIM_ENABLE_HW_FALSE@SIM_HW_OBJS =
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
## COMMON_PRE_CONFIG_FRAG
|
## COMMON_PRE_CONFIG_FRAG
|
||||||
|
|
||||||
|
arch = bfin
|
||||||
|
|
||||||
SIM_OBJS = \
|
SIM_OBJS = \
|
||||||
$(SIM_NEW_COMMON_OBJS) \
|
$(SIM_NEW_COMMON_OBJS) \
|
||||||
bfin-sim.o \
|
bfin-sim.o \
|
||||||
@@ -26,39 +28,6 @@ SIM_OBJS = \
|
|||||||
machs.o \
|
machs.o \
|
||||||
sim-resume.o
|
sim-resume.o
|
||||||
|
|
||||||
SIM_EXTRA_HW_DEVICES = \
|
|
||||||
bfin_cec \
|
|
||||||
bfin_ctimer \
|
|
||||||
bfin_dma \
|
|
||||||
bfin_dmac \
|
|
||||||
bfin_ebiu_amc \
|
|
||||||
bfin_ebiu_ddrc \
|
|
||||||
bfin_ebiu_sdc \
|
|
||||||
bfin_emac \
|
|
||||||
bfin_eppi \
|
|
||||||
bfin_evt \
|
|
||||||
bfin_gpio \
|
|
||||||
bfin_gpio2 \
|
|
||||||
bfin_gptimer \
|
|
||||||
bfin_jtag \
|
|
||||||
bfin_mmu \
|
|
||||||
bfin_nfc \
|
|
||||||
bfin_otp \
|
|
||||||
bfin_pfmon \
|
|
||||||
bfin_pint \
|
|
||||||
bfin_pll \
|
|
||||||
bfin_ppi \
|
|
||||||
bfin_rtc \
|
|
||||||
bfin_sic \
|
|
||||||
bfin_spi \
|
|
||||||
bfin_trace \
|
|
||||||
bfin_twi \
|
|
||||||
bfin_uart \
|
|
||||||
bfin_uart2 \
|
|
||||||
bfin_wdog \
|
|
||||||
bfin_wp \
|
|
||||||
eth_phy
|
|
||||||
|
|
||||||
SIM_EXTRA_CFLAGS = $(SDL_CFLAGS)
|
SIM_EXTRA_CFLAGS = $(SDL_CFLAGS)
|
||||||
|
|
||||||
## COMMON_POST_CONFIG_FRAG
|
## COMMON_POST_CONFIG_FRAG
|
||||||
|
|||||||
@@ -24,6 +24,40 @@
|
|||||||
|
|
||||||
noinst_PROGRAMS += %D%/run
|
noinst_PROGRAMS += %D%/run
|
||||||
|
|
||||||
|
%C%_SIM_EXTRA_HW_DEVICES = \
|
||||||
|
bfin_cec \
|
||||||
|
bfin_ctimer \
|
||||||
|
bfin_dma \
|
||||||
|
bfin_dmac \
|
||||||
|
bfin_ebiu_amc \
|
||||||
|
bfin_ebiu_ddrc \
|
||||||
|
bfin_ebiu_sdc \
|
||||||
|
bfin_emac \
|
||||||
|
bfin_eppi \
|
||||||
|
bfin_evt \
|
||||||
|
bfin_gpio \
|
||||||
|
bfin_gpio2 \
|
||||||
|
bfin_gptimer \
|
||||||
|
bfin_jtag \
|
||||||
|
bfin_mmu \
|
||||||
|
bfin_nfc \
|
||||||
|
bfin_otp \
|
||||||
|
bfin_pfmon \
|
||||||
|
bfin_pint \
|
||||||
|
bfin_pll \
|
||||||
|
bfin_ppi \
|
||||||
|
bfin_rtc \
|
||||||
|
bfin_sic \
|
||||||
|
bfin_spi \
|
||||||
|
bfin_trace \
|
||||||
|
bfin_twi \
|
||||||
|
bfin_uart \
|
||||||
|
bfin_uart2 \
|
||||||
|
bfin_wdog \
|
||||||
|
bfin_wp \
|
||||||
|
eth_phy
|
||||||
|
AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
|
||||||
|
|
||||||
%D%/linux-fixed-code.h: @MAINT@ $(srcdir)/%D%/linux-fixed-code.s %D%/local.mk %D%/$(am__dirstamp)
|
%D%/linux-fixed-code.h: @MAINT@ $(srcdir)/%D%/linux-fixed-code.s %D%/local.mk %D%/$(am__dirstamp)
|
||||||
$(AM_V_GEN)$(AS_FOR_TARGET_BFIN) $(srcdir)/%D%/linux-fixed-code.s -o %D%/linux-fixed-code.o
|
$(AM_V_GEN)$(AS_FOR_TARGET_BFIN) $(srcdir)/%D%/linux-fixed-code.s -o %D%/linux-fixed-code.o
|
||||||
$(AM_V_at)(\
|
$(AM_V_at)(\
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ SIM_EXTRA_CFLAGS =
|
|||||||
SIM_EXTRA_LIBS =
|
SIM_EXTRA_LIBS =
|
||||||
# List of main object files for `run'.
|
# List of main object files for `run'.
|
||||||
SIM_RUN_OBJS = nrun.o
|
SIM_RUN_OBJS = nrun.o
|
||||||
|
SIM_LIBSIM = libsim.a
|
||||||
# Dependency of `clean' to clean any extra files.
|
# Dependency of `clean' to clean any extra files.
|
||||||
SIM_EXTRA_CLEAN =
|
SIM_EXTRA_CLEAN =
|
||||||
# Likewise `distclean'
|
# Likewise `distclean'
|
||||||
@@ -114,50 +115,6 @@ SIM_EXTRA_DISTCLEAN =
|
|||||||
# here. Some files are used by all simulators (e.g. callback.o).
|
# here. Some files are used by all simulators (e.g. callback.o).
|
||||||
# Those files are specified in LIB_OBJS below.
|
# Those files are specified in LIB_OBJS below.
|
||||||
|
|
||||||
SIM_COMMON_HW_OBJS = \
|
|
||||||
hw-alloc.o \
|
|
||||||
hw-base.o \
|
|
||||||
hw-device.o \
|
|
||||||
hw-events.o \
|
|
||||||
hw-handles.o \
|
|
||||||
hw-instances.o \
|
|
||||||
hw-ports.o \
|
|
||||||
hw-properties.o \
|
|
||||||
hw-tree.o \
|
|
||||||
sim-hw.o \
|
|
||||||
|
|
||||||
SIM_NEW_COMMON_OBJS = \
|
|
||||||
sim-arange.o \
|
|
||||||
sim-bits.o \
|
|
||||||
sim-close.o \
|
|
||||||
sim-command.o \
|
|
||||||
sim-config.o \
|
|
||||||
sim-core.o \
|
|
||||||
sim-cpu.o \
|
|
||||||
sim-endian.o \
|
|
||||||
sim-engine.o \
|
|
||||||
sim-events.o \
|
|
||||||
sim-fpu.o \
|
|
||||||
sim-hload.o \
|
|
||||||
sim-hrw.o \
|
|
||||||
sim-io.o \
|
|
||||||
sim-info.o \
|
|
||||||
sim-memopt.o \
|
|
||||||
sim-model.o \
|
|
||||||
sim-module.o \
|
|
||||||
sim-options.o \
|
|
||||||
sim-profile.o \
|
|
||||||
sim-reason.o \
|
|
||||||
sim-reg.o \
|
|
||||||
sim-signal.o \
|
|
||||||
sim-stop.o \
|
|
||||||
sim-syscall.o \
|
|
||||||
sim-trace.o \
|
|
||||||
sim-utils.o \
|
|
||||||
sim-watch.o \
|
|
||||||
\
|
|
||||||
$(SIM_HW_OBJS) \
|
|
||||||
|
|
||||||
## End COMMON_PRE_CONFIG_FRAG
|
## End COMMON_PRE_CONFIG_FRAG
|
||||||
|
|
||||||
## COMMON_POST_CONFIG_FRAG
|
## COMMON_POST_CONFIG_FRAG
|
||||||
@@ -180,7 +137,8 @@ BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(CSEARCH)
|
|||||||
|
|
||||||
COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(SIM_EXTRA_CFLAGS)
|
COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(SIM_EXTRA_CFLAGS)
|
||||||
|
|
||||||
SIM_HW_DEVICES = cfi core pal glue $(SIM_EXTRA_HW_DEVICES)
|
SIM_HW_DEVICES = $(SIM_HW_DEVICES_) $($(arch)_SIM_EXTRA_HW_DEVICES)
|
||||||
|
SIM_NEW_COMMON_OBJS = $(SIM_NEW_COMMON_OBJS_) $(SIM_HW_OBJS)
|
||||||
|
|
||||||
LIBIBERTY_LIB = ../../libiberty/libiberty.a
|
LIBIBERTY_LIB = ../../libiberty/libiberty.a
|
||||||
BFD_LIB = ../../bfd/libbfd.la
|
BFD_LIB = ../../bfd/libbfd.la
|
||||||
@@ -208,7 +166,7 @@ LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(LDFLAGS_FOR_BUILD) -o $@
|
|||||||
|
|
||||||
RUNTESTFLAGS =
|
RUNTESTFLAGS =
|
||||||
|
|
||||||
all: libsim.a $(SIM_RUN_OBJS)
|
all: $(SIM_LIBSIM) $(LIB_OBJS) $(SIM_RUN_OBJS)
|
||||||
|
|
||||||
libsim.a: $(LIB_OBJS)
|
libsim.a: $(LIB_OBJS)
|
||||||
$(SILENCE) rm -f libsim.a
|
$(SILENCE) rm -f libsim.a
|
||||||
@@ -238,10 +196,7 @@ override POSTCOMPILE =
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
all_object_files = $(LIB_OBJS) $(SIM_RUN_OBJS)
|
all_object_files = $(LIB_OBJS) $(SIM_RUN_OBJS)
|
||||||
generated_files = \
|
generated_files = $(SIM_EXTRA_DEPS)
|
||||||
$(SIM_EXTRA_DEPS) \
|
|
||||||
hw-config.h \
|
|
||||||
modules.c
|
|
||||||
|
|
||||||
# Ensure that generated files are created early. Use order-only
|
# Ensure that generated files are created early. Use order-only
|
||||||
# dependencies if available. They require GNU make 3.80 or newer,
|
# dependencies if available. They require GNU make 3.80 or newer,
|
||||||
@@ -255,49 +210,11 @@ endif
|
|||||||
# Dependencies.
|
# Dependencies.
|
||||||
-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
|
-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
|
||||||
|
|
||||||
# FIXME This is one very simple-minded way of generating the file hw-config.h
|
|
||||||
hw-config.h: stamp-hw ; @true
|
|
||||||
stamp-hw: Makefile.in $(srccom)/Make-common.in $(config.status) Makefile
|
|
||||||
$(ECHO_STAMP) hw-config.h
|
|
||||||
$(SILENCE) ( \
|
|
||||||
sim_hw="$(SIM_HW_DEVICES)" ; \
|
|
||||||
echo "/* generated by Makefile */" ; \
|
|
||||||
printf "extern const struct hw_descriptor dv_%s_descriptor[];\n" $$sim_hw ; \
|
|
||||||
echo "const struct hw_descriptor * const hw_descriptors[] = {" ; \
|
|
||||||
printf " dv_%s_descriptor,\n" $$sim_hw ; \
|
|
||||||
echo " NULL," ; \
|
|
||||||
echo "};" \
|
|
||||||
) > tmp-hw.h
|
|
||||||
$(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-hw.h hw-config.h
|
|
||||||
$(SILENCE) touch $@
|
|
||||||
|
|
||||||
test-hw-events: $(srccom)/hw-events.c libsim.a
|
test-hw-events: $(srccom)/hw-events.c libsim.a
|
||||||
$(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=CC --mode=link \
|
$(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=CC --mode=link \
|
||||||
$(CC) $(ALL_CFLAGS) -DMAIN -o test-hw-events$(EXEEXT) \
|
$(CC) $(ALL_CFLAGS) -DMAIN -o test-hw-events$(EXEEXT) \
|
||||||
$(srccom)/hw-events.c libsim.a $(EXTRA_LIBS)
|
$(srccom)/hw-events.c libsim.a $(EXTRA_LIBS)
|
||||||
|
|
||||||
# See sim_pre_argv_init and sim_module_install in sim-module.c for more details.
|
|
||||||
modules.c: stamp-modules ; @true
|
|
||||||
stamp-modules: Makefile $(SIM_OBJS:.o=.c)
|
|
||||||
$(ECHO_STAMP) modules.c
|
|
||||||
$(SILENCE) LANG=C ; export LANG ; \
|
|
||||||
LC_ALL=C ; export LC_ALL ; \
|
|
||||||
sed -n -e '/^sim_install_/{s/^\(sim_install_[a-z_0-9A-Z]*\).*/\1/;p}' $^ | sort >$@.l-tmp
|
|
||||||
@set -e; (\
|
|
||||||
echo '/* Do not modify this file. */'; \
|
|
||||||
echo '/* It is created automatically by the Makefile. */'; \
|
|
||||||
echo '#include "libiberty.h"'; \
|
|
||||||
echo '#include "sim-module.h"'; \
|
|
||||||
sed -e 's:\(.*\):extern MODULE_INIT_FN \1;:' $@.l-tmp; \
|
|
||||||
echo 'MODULE_INSTALL_FN * const sim_modules_detected[] = {'; \
|
|
||||||
sed -e 's:\(.*\): \1,:' $@.l-tmp; \
|
|
||||||
echo '};'; \
|
|
||||||
echo 'const int sim_modules_detected_len = ARRAY_SIZE (sim_modules_detected);'; \
|
|
||||||
) >$@.tmp
|
|
||||||
$(SILENCE) $(SHELL) $(srcroot)/move-if-change $@.tmp modules.c
|
|
||||||
$(SILENCE) rm -f $@.l-tmp $@.tmp
|
|
||||||
$(SILENCE) touch $@
|
|
||||||
|
|
||||||
# Support targets.
|
# Support targets.
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@@ -333,8 +250,6 @@ TAGS: force
|
|||||||
mostlyclean clean: $(SIM_EXTRA_CLEAN)
|
mostlyclean clean: $(SIM_EXTRA_CLEAN)
|
||||||
rm -f *.[oa] *~ core \
|
rm -f *.[oa] *~ core \
|
||||||
run$(EXEEXT) libsim.a \
|
run$(EXEEXT) libsim.a \
|
||||||
hw-config.h stamp-hw \
|
|
||||||
modules.c stamp-modules \
|
|
||||||
tmp-mloop.hin tmp-mloop.h tmp-mloop.cin tmp-mloop.c
|
tmp-mloop.hin tmp-mloop.h tmp-mloop.cin tmp-mloop.c
|
||||||
|
|
||||||
distclean maintainer-clean realclean: clean $(SIM_EXTRA_DISTCLEAN)
|
distclean maintainer-clean realclean: clean $(SIM_EXTRA_DISTCLEAN)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#undef PACKAGE_VERSION
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
/* Include common sim's various configure tests. */
|
/* Include common sim's various configure tests. */
|
||||||
#ifndef SIM_COMMON_BUILD
|
#if !defined(SIM_COMMON_BUILD) && !defined(SIM_TOPDIR_BUILD)
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#else
|
#else
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|||||||
@@ -18,9 +18,8 @@
|
|||||||
## Parts of the common/ sim code that have been unified.
|
## Parts of the common/ sim code that have been unified.
|
||||||
## Most still lives in common/Make-common.in.
|
## Most still lives in common/Make-common.in.
|
||||||
|
|
||||||
AM_CPPFLAGS += \
|
AM_CPPFLAGS += -I$(srcdir)/%D%
|
||||||
-I$(srcdir)/%D% \
|
AM_CPPFLAGS_%D% = -DSIM_COMMON_BUILD
|
||||||
-DSIM_COMMON_BUILD
|
|
||||||
AM_CPPFLAGS_FOR_BUILD += -I$(srcdir)/%D%
|
AM_CPPFLAGS_FOR_BUILD += -I$(srcdir)/%D%
|
||||||
|
|
||||||
## This makes sure common parts are available before building the arch-subdirs
|
## This makes sure common parts are available before building the arch-subdirs
|
||||||
@@ -56,6 +55,112 @@ CLEANFILES += \
|
|||||||
## For subdirs.
|
## For subdirs.
|
||||||
##
|
##
|
||||||
|
|
||||||
|
SIM_COMMON_HW_OBJS = \
|
||||||
|
hw-alloc.o \
|
||||||
|
hw-base.o \
|
||||||
|
hw-device.o \
|
||||||
|
hw-events.o \
|
||||||
|
hw-handles.o \
|
||||||
|
hw-instances.o \
|
||||||
|
hw-ports.o \
|
||||||
|
hw-properties.o \
|
||||||
|
hw-tree.o \
|
||||||
|
sim-hw.o
|
||||||
|
|
||||||
|
SIM_NEW_COMMON_OBJS = \
|
||||||
|
sim-arange.o \
|
||||||
|
sim-bits.o \
|
||||||
|
sim-close.o \
|
||||||
|
sim-command.o \
|
||||||
|
sim-config.o \
|
||||||
|
sim-core.o \
|
||||||
|
sim-cpu.o \
|
||||||
|
sim-endian.o \
|
||||||
|
sim-engine.o \
|
||||||
|
sim-events.o \
|
||||||
|
sim-fpu.o \
|
||||||
|
sim-hload.o \
|
||||||
|
sim-hrw.o \
|
||||||
|
sim-io.o \
|
||||||
|
sim-info.o \
|
||||||
|
sim-memopt.o \
|
||||||
|
sim-model.o \
|
||||||
|
sim-module.o \
|
||||||
|
sim-options.o \
|
||||||
|
sim-profile.o \
|
||||||
|
sim-reason.o \
|
||||||
|
sim-reg.o \
|
||||||
|
sim-signal.o \
|
||||||
|
sim-stop.o \
|
||||||
|
sim-syscall.o \
|
||||||
|
sim-trace.o \
|
||||||
|
sim-utils.o \
|
||||||
|
sim-watch.o
|
||||||
|
|
||||||
|
AM_MAKEFLAGS += SIM_NEW_COMMON_OBJS_="$(SIM_NEW_COMMON_OBJS)"
|
||||||
|
|
||||||
|
SIM_HW_DEVICES = cfi core pal glue
|
||||||
|
|
||||||
|
if SIM_ENABLE_HW
|
||||||
|
SIM_NEW_COMMON_OBJS += \
|
||||||
|
$(SIM_COMMON_HW_OBJS) \
|
||||||
|
$(SIM_HW_SOCKSER)
|
||||||
|
|
||||||
|
AM_MAKEFLAGS += SIM_HW_DEVICES_="$(SIM_HW_DEVICES)"
|
||||||
|
endif
|
||||||
|
|
||||||
|
# FIXME This is one very simple-minded way of generating the file hw-config.h.
|
||||||
|
%/hw-config.h: %/stamp-hw ; @true
|
||||||
|
%/stamp-hw: Makefile
|
||||||
|
$(AM_V_GEN)set -e; \
|
||||||
|
( \
|
||||||
|
sim_hw="$(SIM_HW_DEVICES) $($(@D)_SIM_EXTRA_HW_DEVICES)" ; \
|
||||||
|
echo "/* generated by Makefile */" ; \
|
||||||
|
printf "extern const struct hw_descriptor dv_%s_descriptor[];\n" $$sim_hw ; \
|
||||||
|
echo "const struct hw_descriptor * const hw_descriptors[] = {" ; \
|
||||||
|
printf " dv_%s_descriptor,\n" $$sim_hw ; \
|
||||||
|
echo " NULL," ; \
|
||||||
|
echo "};" \
|
||||||
|
) > $@.tmp; \
|
||||||
|
$(SHELL) $(srcroot)/move-if-change $@.tmp $(@D)/hw-config.h; \
|
||||||
|
touch $@
|
||||||
|
.PRECIOUS: %/stamp-hw
|
||||||
|
|
||||||
|
%C%_HW_CONFIG_H_TARGETS = $(patsubst %,%/hw-config.h,$(SIM_ENABLED_ARCHES))
|
||||||
|
MOSTLYCLEANFILES += $(%C%_HW_CONFIG_H_TARGETS) $(patsubst %,%/stamp-hw,$(SIM_ENABLED_ARCHES))
|
||||||
|
SIM_ALL_RECURSIVE_DEPS += $(%C%_HW_CONFIG_H_TARGETS)
|
||||||
|
|
||||||
|
# See sim_pre_argv_init and sim_module_install in sim-module.c for more details.
|
||||||
|
GEN_MODULES_C_SRCS = \
|
||||||
|
$(wildcard \
|
||||||
|
$(patsubst %.o,$(srcdir)/%.c,$($(@D)_libsim_a_OBJECTS) $($(@D)_libsim_a_LIBADD)) \
|
||||||
|
$(patsubst $(@D)/%.o,$(srcdir)/common/%.c,$($(@D)_libsim_a_LIBADD)))
|
||||||
|
%/modules.c: %/stamp-modules ; @true
|
||||||
|
%/stamp-modules: Makefile
|
||||||
|
$(AM_V_GEN)set -e; \
|
||||||
|
LANG=C ; export LANG; \
|
||||||
|
LC_ALL=C ; export LC_ALL; \
|
||||||
|
sed -n -e '/^sim_install_/{s/^\(sim_install_[a-z_0-9A-Z]*\).*/\1/;p}' Makefile $(GEN_MODULES_C_SRCS) | sort >$@.l-tmp; \
|
||||||
|
( \
|
||||||
|
echo '/* Do not modify this file. */'; \
|
||||||
|
echo '/* It is created automatically by the Makefile. */'; \
|
||||||
|
echo '#include "libiberty.h"'; \
|
||||||
|
echo '#include "sim-module.h"'; \
|
||||||
|
sed -e 's:\(.*\):extern MODULE_INIT_FN \1;:' $@.l-tmp; \
|
||||||
|
echo 'MODULE_INSTALL_FN * const sim_modules_detected[] = {'; \
|
||||||
|
sed -e 's:\(.*\): \1,:' $@.l-tmp; \
|
||||||
|
echo '};'; \
|
||||||
|
echo 'const int sim_modules_detected_len = ARRAY_SIZE (sim_modules_detected);'; \
|
||||||
|
) >$@.tmp; \
|
||||||
|
$(SHELL) $(srcroot)/move-if-change $@.tmp $(@D)/modules.c; \
|
||||||
|
rm -f $@.l-tmp; \
|
||||||
|
touch $@
|
||||||
|
.PRECIOUS: %/stamp-modules
|
||||||
|
|
||||||
|
%C%_GEN_MODULES_C_TARGETS = $(patsubst %,%/modules.c,$(SIM_ENABLED_ARCHES))
|
||||||
|
MOSTLYCLEANFILES += $(%C%_GEN_MODULES_C_TARGETS) $(patsubst %,%/stamp-moules,$(SIM_ENABLED_ARCHES))
|
||||||
|
SIM_ALL_RECURSIVE_DEPS += $(%C%_GEN_MODULES_C_TARGETS)
|
||||||
|
|
||||||
LIBIBERTY_LIB = ../libiberty/libiberty.a
|
LIBIBERTY_LIB = ../libiberty/libiberty.a
|
||||||
BFD_LIB = ../bfd/libbfd.la
|
BFD_LIB = ../bfd/libbfd.la
|
||||||
OPCODES_LIB = ../opcodes/libopcodes.la
|
OPCODES_LIB = ../opcodes/libopcodes.la
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ m4_define([SIM_BUILD_TARGET], [dnl
|
|||||||
AS_VAR_APPEND([SIM_ENABLED_ARCHES], [" $1"])
|
AS_VAR_APPEND([SIM_ENABLED_ARCHES], [" $1"])
|
||||||
m4_if($2, [true], [dnl
|
m4_if($2, [true], [dnl
|
||||||
AC_CONFIG_SUBDIRS($1)
|
AC_CONFIG_SUBDIRS($1)
|
||||||
], [dnl
|
], $2, [false], [], [dnl
|
||||||
AC_CONFIG_FILES($1/Makefile.sim:$1/Makefile.in)
|
AC_CONFIG_FILES($1/Makefile.sim:$1/Makefile.in)
|
||||||
AC_CONFIG_COMMANDS([$1/Makefile],
|
AC_CONFIG_COMMANDS([$1/Makefile],
|
||||||
[sed -n \
|
[sed -n \
|
||||||
@@ -88,11 +88,13 @@ m4_define([SIM_BUILD_TARGET], [dnl
|
|||||||
AS_VAR_APPEND([SIM_SUBDIRS], [" $1"])
|
AS_VAR_APPEND([SIM_SUBDIRS], [" $1"])
|
||||||
])
|
])
|
||||||
AC_CONFIG_FILES($1/.gdbinit:common/gdbinit.in)
|
AC_CONFIG_FILES($1/.gdbinit:common/gdbinit.in)
|
||||||
|
m4_if($2, [false], [], [dnl
|
||||||
dnl Create the depdirs for ports until we can convert them to automake.
|
dnl Create the depdirs for ports until we can convert them to automake.
|
||||||
AC_CONFIG_COMMANDS([depdir-$1],
|
AC_CONFIG_COMMANDS([depdir-$1],
|
||||||
[$SHELL $ac_aux_dir/mkinstalldirs $1/$DEPDIR],
|
[$SHELL $ac_aux_dir/mkinstalldirs $1/$DEPDIR],
|
||||||
[ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR])
|
[ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR])
|
||||||
])
|
])
|
||||||
|
])
|
||||||
dnl Enable a particular arch subdir.
|
dnl Enable a particular arch subdir.
|
||||||
dnl arg[1] is the matching target triple.
|
dnl arg[1] is the matching target triple.
|
||||||
dnl arg[2] is the arch subdir name.
|
dnl arg[2] is the arch subdir name.
|
||||||
@@ -125,7 +127,7 @@ if test "${enable_sim}" != no; then
|
|||||||
sim_igen=no
|
sim_igen=no
|
||||||
for targ in `echo $target $enable_targets | sed 's/,/ /g'`
|
for targ in `echo $target $enable_targets | sed 's/,/ /g'`
|
||||||
do
|
do
|
||||||
SIM_TARGET([aarch64*-*-*], [aarch64])
|
SIM_TARGET([aarch64*-*-*], [aarch64], [false])
|
||||||
SIM_TARGET([arm*-*-*], [arm])
|
SIM_TARGET([arm*-*-*], [arm])
|
||||||
SIM_TARGET([avr*-*-*], [avr])
|
SIM_TARGET([avr*-*-*], [avr])
|
||||||
SIM_TARGET([bfin-*-*], [bfin])
|
SIM_TARGET([bfin-*-*], [bfin])
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
## COMMON_PRE_CONFIG_FRAG
|
## COMMON_PRE_CONFIG_FRAG
|
||||||
|
|
||||||
|
arch = cris
|
||||||
|
|
||||||
CRISV10F_OBJS = crisv10f.o cpuv10.o decodev10.o modelv10.o mloopv10f.o
|
CRISV10F_OBJS = crisv10f.o cpuv10.o decodev10.o modelv10.o mloopv10f.o
|
||||||
CRISV32F_OBJS = crisv32f.o cpuv32.o decodev32.o modelv32.o mloopv32f.o
|
CRISV32F_OBJS = crisv32f.o cpuv32.o decodev32.o modelv32.o mloopv32f.o
|
||||||
|
|
||||||
@@ -31,14 +33,10 @@ SIM_OBJS = \
|
|||||||
$(CRISV32F_OBJS) \
|
$(CRISV32F_OBJS) \
|
||||||
traps.o
|
traps.o
|
||||||
|
|
||||||
SIM_EXTRA_HW_DEVICES = rv cris cris_900000xx
|
|
||||||
|
|
||||||
SIM_EXTRA_CLEAN = cris-clean
|
SIM_EXTRA_CLEAN = cris-clean
|
||||||
|
|
||||||
## COMMON_POST_CONFIG_FRAG
|
## COMMON_POST_CONFIG_FRAG
|
||||||
|
|
||||||
arch = cris
|
|
||||||
|
|
||||||
cris-clean:
|
cris-clean:
|
||||||
-rm -f stamp-arch
|
-rm -f stamp-arch
|
||||||
-rm -f tmp-*
|
-rm -f tmp-*
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
|
|
||||||
noinst_PROGRAMS += %D%/run
|
noinst_PROGRAMS += %D%/run
|
||||||
|
|
||||||
|
%C%_SIM_EXTRA_HW_DEVICES = rv cris cris_900000xx
|
||||||
|
AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
|
||||||
|
|
||||||
## rvdummy is just used for testing -- it runs on the same host as `run`.
|
## rvdummy is just used for testing -- it runs on the same host as `run`.
|
||||||
## It does nothing if --enable-sim-hardware isn't active.
|
## It does nothing if --enable-sim-hardware isn't active.
|
||||||
%C%_rvdummy_SOURCES = %D%/rvdummy.c
|
%C%_rvdummy_SOURCES = %D%/rvdummy.c
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
## COMMON_PRE_CONFIG_FRAG
|
## COMMON_PRE_CONFIG_FRAG
|
||||||
|
|
||||||
|
arch = lm32
|
||||||
|
|
||||||
# List of object files, less common parts.
|
# List of object files, less common parts.
|
||||||
SIM_OBJS = \
|
SIM_OBJS = \
|
||||||
$(SIM_NEW_COMMON_OBJS) \
|
$(SIM_NEW_COMMON_OBJS) \
|
||||||
@@ -12,14 +14,10 @@ SIM_OBJS = \
|
|||||||
cpu.o decode.o sem.o model.o mloop.o \
|
cpu.o decode.o sem.o model.o mloop.o \
|
||||||
lm32.o traps.o user.o
|
lm32.o traps.o user.o
|
||||||
|
|
||||||
SIM_EXTRA_HW_DEVICES = lm32cpu lm32timer lm32uart
|
|
||||||
|
|
||||||
SIM_EXTRA_CLEAN = lm32-clean
|
SIM_EXTRA_CLEAN = lm32-clean
|
||||||
|
|
||||||
## COMMON_POST_CONFIG_FRAG
|
## COMMON_POST_CONFIG_FRAG
|
||||||
|
|
||||||
arch = lm32
|
|
||||||
|
|
||||||
lm32-clean:
|
lm32-clean:
|
||||||
rm -f stamp-arch stamp-cpu
|
rm -f stamp-arch stamp-cpu
|
||||||
rm -f tmp-*
|
rm -f tmp-*
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
|
|
||||||
noinst_PROGRAMS += %D%/run
|
noinst_PROGRAMS += %D%/run
|
||||||
|
|
||||||
|
%C%_SIM_EXTRA_HW_DEVICES = lm32cpu lm32timer lm32uart
|
||||||
|
AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
|
||||||
|
|
||||||
%C%_BUILD_OUTPUTS = \
|
%C%_BUILD_OUTPUTS = \
|
||||||
%D%/eng.h \
|
%D%/eng.h \
|
||||||
%D%/mloop.c \
|
%D%/mloop.c \
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
## COMMON_PRE_CONFIG_FRAG
|
## COMMON_PRE_CONFIG_FRAG
|
||||||
|
|
||||||
|
arch = m32r
|
||||||
|
|
||||||
M32R_OBJS = m32r.o cpu.o decode.o sem.o model.o mloop.o
|
M32R_OBJS = m32r.o cpu.o decode.o sem.o model.o mloop.o
|
||||||
M32RX_OBJS = m32rx.o cpux.o decodex.o modelx.o mloopx.o
|
M32RX_OBJS = m32rx.o cpux.o decodex.o modelx.o mloopx.o
|
||||||
M32R2_OBJS = m32r2.o cpu2.o decode2.o model2.o mloop2.o
|
M32R2_OBJS = m32r2.o cpu2.o decode2.o model2.o mloop2.o
|
||||||
@@ -33,8 +35,6 @@ SIM_OBJS = \
|
|||||||
$(M32R2_OBJS) \
|
$(M32R2_OBJS) \
|
||||||
traps.o
|
traps.o
|
||||||
|
|
||||||
SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart
|
|
||||||
|
|
||||||
SIM_EXTRA_CLEAN = m32r-clean
|
SIM_EXTRA_CLEAN = m32r-clean
|
||||||
|
|
||||||
# Some modules don't build cleanly yet.
|
# Some modules don't build cleanly yet.
|
||||||
@@ -42,8 +42,6 @@ cpu.o cpu2.o cpux.o m32r.o m32r2.o m32rx.o mloop.o mloop2.o mloopx.o sem.o sim-i
|
|||||||
|
|
||||||
## COMMON_POST_CONFIG_FRAG
|
## COMMON_POST_CONFIG_FRAG
|
||||||
|
|
||||||
arch = m32r
|
|
||||||
|
|
||||||
m32r-clean:
|
m32r-clean:
|
||||||
rm -f stamp-arch stamp-cpu stamp-xcpu stamp-2cpu
|
rm -f stamp-arch stamp-cpu stamp-xcpu stamp-2cpu
|
||||||
rm -f tmp-*
|
rm -f tmp-*
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
|
|
||||||
noinst_PROGRAMS += %D%/run
|
noinst_PROGRAMS += %D%/run
|
||||||
|
|
||||||
|
%C%_SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart
|
||||||
|
AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
|
||||||
|
|
||||||
%C%_BUILD_OUTPUTS = \
|
%C%_BUILD_OUTPUTS = \
|
||||||
%D%/eng.h \
|
%D%/eng.h \
|
||||||
%D%/mloop.c \
|
%D%/mloop.c \
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
## COMMON_PRE_CONFIG_FRAG
|
## COMMON_PRE_CONFIG_FRAG
|
||||||
|
|
||||||
|
arch = m68hc11
|
||||||
|
|
||||||
M68HC11_OBJS = interp.o m68hc11int.o m68hc12int.o \
|
M68HC11_OBJS = interp.o m68hc11int.o m68hc12int.o \
|
||||||
emulos.o interrupts.o m68hc11_sim.o
|
emulos.o interrupts.o m68hc11_sim.o
|
||||||
|
|
||||||
@@ -24,8 +26,6 @@ SIM_OBJS = $(M68HC11_OBJS) \
|
|||||||
$(SIM_NEW_COMMON_OBJS) \
|
$(SIM_NEW_COMMON_OBJS) \
|
||||||
sim-resume.o
|
sim-resume.o
|
||||||
|
|
||||||
SIM_EXTRA_HW_DEVICES = m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram
|
|
||||||
|
|
||||||
# We must use 32-bit addresses to support memory bank switching.
|
# We must use 32-bit addresses to support memory bank switching.
|
||||||
# The WORD_BITSIZE is normally 16 but must be switched (temporarily)
|
# The WORD_BITSIZE is normally 16 but must be switched (temporarily)
|
||||||
# to 32 to avoid a bug in the sim-common which uses 'unsigned_word'
|
# to 32 to avoid a bug in the sim-common which uses 'unsigned_word'
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
|
|
||||||
noinst_PROGRAMS += %D%/run
|
noinst_PROGRAMS += %D%/run
|
||||||
|
|
||||||
|
%C%_SIM_EXTRA_HW_DEVICES = m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram
|
||||||
|
AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
|
||||||
|
|
||||||
%C%_BUILD_OUTPUTS = \
|
%C%_BUILD_OUTPUTS = \
|
||||||
%D%/gencode$(EXEEXT) \
|
%D%/gencode$(EXEEXT) \
|
||||||
%D%/m68hc11int.c \
|
%D%/m68hc11int.c \
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
## COMMON_PRE_CONFIG_FRAG
|
## COMMON_PRE_CONFIG_FRAG
|
||||||
|
|
||||||
|
arch = mips
|
||||||
|
|
||||||
# Object files created by various simulator generators.
|
# Object files created by various simulator generators.
|
||||||
|
|
||||||
|
|
||||||
@@ -64,8 +66,6 @@ SIM_OBJS = \
|
|||||||
sim-main.o \
|
sim-main.o \
|
||||||
sim-resume.o \
|
sim-resume.o \
|
||||||
|
|
||||||
SIM_EXTRA_HW_DEVICES = tx3904cpu tx3904irc tx3904tmr tx3904sio
|
|
||||||
|
|
||||||
# List of flags to always pass to $(CC).
|
# List of flags to always pass to $(CC).
|
||||||
SIM_SUBTARGET=@SIM_SUBTARGET@
|
SIM_SUBTARGET=@SIM_SUBTARGET@
|
||||||
SIM_EXTRA_CFLAGS = $(SIM_SUBTARGET)
|
SIM_EXTRA_CFLAGS = $(SIM_SUBTARGET)
|
||||||
|
|||||||
@@ -23,3 +23,6 @@
|
|||||||
$(SIM_COMMON_LIBS)
|
$(SIM_COMMON_LIBS)
|
||||||
|
|
||||||
noinst_PROGRAMS += %D%/run
|
noinst_PROGRAMS += %D%/run
|
||||||
|
|
||||||
|
%C%_SIM_EXTRA_HW_DEVICES = tx3904cpu tx3904irc tx3904tmr tx3904sio
|
||||||
|
AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
## COMMON_PRE_CONFIG_FRAG
|
## COMMON_PRE_CONFIG_FRAG
|
||||||
|
|
||||||
|
arch = mn10300
|
||||||
|
|
||||||
MN10300_OBJS = \
|
MN10300_OBJS = \
|
||||||
itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
|
itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
|
||||||
$(SIM_NEW_COMMON_OBJS) \
|
$(SIM_NEW_COMMON_OBJS) \
|
||||||
@@ -25,8 +27,6 @@ MN10300_OBJS = \
|
|||||||
|
|
||||||
SIM_OBJS = $(MN10300_OBJS) interp.o
|
SIM_OBJS = $(MN10300_OBJS) interp.o
|
||||||
|
|
||||||
SIM_EXTRA_HW_DEVICES = mn103cpu mn103int mn103tim mn103ser mn103iop
|
|
||||||
|
|
||||||
# List of extra flags to always pass to $(CC).
|
# List of extra flags to always pass to $(CC).
|
||||||
SIM_EXTRA_CFLAGS = \
|
SIM_EXTRA_CFLAGS = \
|
||||||
-DPOLL_QUIT_INTERVAL=0x20 \
|
-DPOLL_QUIT_INTERVAL=0x20 \
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
|
|
||||||
noinst_PROGRAMS += %D%/run
|
noinst_PROGRAMS += %D%/run
|
||||||
|
|
||||||
|
%C%_SIM_EXTRA_HW_DEVICES = mn103cpu mn103int mn103tim mn103ser mn103iop
|
||||||
|
AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
|
||||||
|
|
||||||
%C%_BUILT_SRC_FROM_IGEN = \
|
%C%_BUILT_SRC_FROM_IGEN = \
|
||||||
%D%/icache.h \
|
%D%/icache.h \
|
||||||
%D%/icache.c \
|
%D%/icache.c \
|
||||||
|
|||||||
Reference in New Issue
Block a user