diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-11-01 01:31:44 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-11-28 13:23:57 -0500 |
commit | 64ae70dde5bc8916800bbdb570d6281b700f7e84 (patch) | |
tree | d42650d14607f4ec69b314017afe529077ced46f /sim/ppc | |
parent | 96537189c92734cad48c95de00d3cd167ad7092d (diff) | |
download | gdb-64ae70dde5bc8916800bbdb570d6281b700f7e84.zip gdb-64ae70dde5bc8916800bbdb570d6281b700f7e84.tar.gz gdb-64ae70dde5bc8916800bbdb570d6281b700f7e84.tar.bz2 |
sim: nltvals: pull target syscalls out into a dedicated source file
Like we just did for pulling out the errno map, pull out the syscall
maps into a dedicated common file. Most newlib ports are using the
same syscall map, but not all, which means we have to do a bit more
work to migrate.
This commit adds the maps and switches the ports using the common
default syscall table over to it. Ports using unique syscall tables
are still using the old targ-map.c logic.
Switching common ports over is easy by checking NL_TARGET, but the
ppc code needs a bit more cleanup here hence its larger diff.
Diffstat (limited to 'sim/ppc')
-rw-r--r-- | sim/ppc/Makefile.in | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index b991895..33d7df9 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -411,9 +411,6 @@ SUPPORT_H = \ support.h \ support.c -TARG_VALS_H = \ - targ-vals.h - INLINE = \ inline.h \ inline.c @@ -429,8 +426,7 @@ BUILT_SRC_WO_CONFIG = \ support.h support.c \ pk.h \ hw.h hw.c \ - filter_host.c \ - targ-vals.h targ-map.c targ-vals.def + filter_host.c BUILT_SRC = \ $(BUILT_SRC_WO_CONFIG) \ @@ -473,6 +469,7 @@ COMMON_OBJS_NAMES = \ target-newlib-errno.o \ target-newlib-open.o \ target-newlib-signal.o \ + target-newlib-syscall.o \ version.o COMMON_OBJS = $(COMMON_OBJS_NAMES:%=../common/common_libcommon_a-%) @@ -515,7 +512,7 @@ LIB_OBJ = \ options.o -GDB_OBJ = gdb-sim.o sim_calls.o targ-map.o +GDB_OBJ = gdb-sim.o sim_calls.o HW_SRC = @sim_hw_src@ HW_OBJ = @sim_hw_obj@ @@ -598,30 +595,6 @@ itable.o: itable.c $(ITABLE_H) mon.o: mon.c $(BASICS_H) $(CPU_H) $(MON_H) -# GDB after 4.16 expects the default_callback structure to be setup. -# As a kludge, build the common stuff here for now. -gentmap: $(srcdir)/../common/gentmap.c Makefile targ-vals.def - $(ECHO_CCLD) $(LINK_FOR_BUILD) -I. -I../common -I$(srcdir)/../common \ - $(srcdir)/../common/gentmap.c -DUSE_CONFIG_H - -targ-vals.def: $(srcdir)/../common/nltvals.def - $(ECHO_GEN) cat $(srcdir)/../common/nltvals.def > tmp-vals.def - $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-vals.def targ-vals.def - -targ-vals.h: stamp-vals ; @true -stamp-vals: Makefile gentmap $(srcroot)/move-if-change - $(ECHO_GEN) ./gentmap -h > tmp-vals.h - $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-vals.h targ-vals.h - $(SILENCE) touch $@ - -targ-map.c: stamp-map; @true -stamp-map: Makefile gentmap $(srcroot)/move-if-change - $(ECHO_GEN) ./gentmap -c > tmp-map.c - $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-map.c targ-map.c - $(SILENCE) touch $@ - -targ-map.o: targ-map.c $(ANSIDECL_H) $(GDB_CALLBACK_H) $(TARG_VALS_H) - sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(CONFIG_H) $(ECHO_CC) $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c @@ -838,8 +811,7 @@ TAGS: $(BUILT_SRC) etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC) clean mostlyclean: - rm -f tmp-* *.[oasi] core psim$(EXEEXT) run$(EXEEXT) igen dgen $(BUILT_SRC_WO_CONFIG) gentmap - rm -f stamp-vals targ-vals.h stamp-map targ-map.c + rm -f tmp-* *.[oasi] core psim$(EXEEXT) run$(EXEEXT) igen dgen $(BUILT_SRC_WO_CONFIG) distclean realclean: clean rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log |