From 7fd14d6f580eeed46ef4d6f04f6b5f2f1318c0f9 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 18 Jan 2023 19:26:58 -0500 Subject: [PATCH] sim: unify sim-signal.o building Now that sim-main.h has been reduced significantly, we can remove it from sim-signal.c and unify it across all boards since it compiles to the same code. --- sim/Makefile.in | 17 +++++++++++------ sim/common/local.mk | 2 +- sim/common/sim-signal.c | 3 ++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sim/Makefile.in b/sim/Makefile.in index a2e7f98a78b..e46f3e8de05 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -380,8 +380,8 @@ aarch64_libsim_a_AR = $(AR) $(ARFLAGS) @SIM_ENABLE_ARCH_aarch64_TRUE@ aarch64/simulator.o am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = common/callback.$(OBJEXT) common/portability.$(OBJEXT) \ - common/sim-load.$(OBJEXT) common/syscall.$(OBJEXT) \ - common/target-newlib-errno.$(OBJEXT) \ + common/sim-load.$(OBJEXT) common/sim-signal.$(OBJEXT) \ + common/syscall.$(OBJEXT) common/target-newlib-errno.$(OBJEXT) \ common/target-newlib-open.$(OBJEXT) \ common/target-newlib-signal.$(OBJEXT) \ common/target-newlib-syscall.$(OBJEXT) \ @@ -458,7 +458,8 @@ common_libcommon_a_AR = $(AR) $(ARFLAGS) common_libcommon_a_LIBADD = am_common_libcommon_a_OBJECTS = common/callback.$(OBJEXT) \ common/portability.$(OBJEXT) common/sim-load.$(OBJEXT) \ - common/syscall.$(OBJEXT) common/target-newlib-errno.$(OBJEXT) \ + common/sim-signal.$(OBJEXT) common/syscall.$(OBJEXT) \ + common/target-newlib-errno.$(OBJEXT) \ common/target-newlib-open.$(OBJEXT) \ common/target-newlib-signal.$(OBJEXT) \ common/target-newlib-syscall.$(OBJEXT) \ @@ -1837,6 +1838,7 @@ common_libcommon_a_SOURCES = \ common/callback.c \ common/portability.c \ common/sim-load.c \ + common/sim-signal.c \ common/syscall.c \ common/target-newlib-errno.c \ common/target-newlib-open.c \ @@ -1860,9 +1862,9 @@ 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__append_2) + sim-options.o sim-profile.o sim-reason.o sim-reg.o sim-stop.o \ + sim-syscall.o sim-trace.o sim-utils.o sim-watch.o \ + $(am__append_2) SIM_HW_DEVICES = cfi core pal glue am_arch_d = $(subst -,_,$(@D)) GEN_MODULES_C_SRCS = \ @@ -3194,6 +3196,8 @@ common/portability.$(OBJEXT): common/$(am__dirstamp) \ common/$(DEPDIR)/$(am__dirstamp) common/sim-load.$(OBJEXT): common/$(am__dirstamp) \ common/$(DEPDIR)/$(am__dirstamp) +common/sim-signal.$(OBJEXT): common/$(am__dirstamp) \ + common/$(DEPDIR)/$(am__dirstamp) common/syscall.$(OBJEXT): common/$(am__dirstamp) \ common/$(DEPDIR)/$(am__dirstamp) common/target-newlib-errno.$(OBJEXT): common/$(am__dirstamp) \ @@ -3936,6 +3940,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/callback.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/portability.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/sim-load.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/sim-signal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/syscall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/target-newlib-errno.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/target-newlib-open.Po@am__quote@ diff --git a/sim/common/local.mk b/sim/common/local.mk index 89843ead03b..5d0992fbd9e 100644 --- a/sim/common/local.mk +++ b/sim/common/local.mk @@ -31,6 +31,7 @@ noinst_LIBRARIES += %D%/libcommon.a %D%/callback.c \ %D%/portability.c \ %D%/sim-load.c \ + %D%/sim-signal.c \ %D%/syscall.c \ %D%/target-newlib-errno.c \ %D%/target-newlib-open.c \ @@ -95,7 +96,6 @@ SIM_NEW_COMMON_OBJS = \ sim-profile.o \ sim-reason.o \ sim-reg.o \ - sim-signal.o \ sim-stop.o \ sim-syscall.o \ sim-trace.o \ diff --git a/sim/common/sim-signal.c b/sim/common/sim-signal.c index 9c4e261fa21..36ebbdfe969 100644 --- a/sim/common/sim-signal.c +++ b/sim/common/sim-signal.c @@ -22,7 +22,8 @@ along with this program. If not, see . */ #include -#include "sim-main.h" +#include "sim/sim.h" +#include "sim-io.h" #include "sim-signal.h" /* Convert SIM_SIGFOO to SIGFOO.