From 6688220490d7d315b6489fb0de12062f7ecd3e33 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 28 Nov 2021 13:23:02 -0500 Subject: [PATCH] sim: unify syscall.o building Now that we've unified all the syscall tables, this file does not rely on any port-specific settings, so move it up to building as part of the common step so we only do it once in a multibuild. --- sim/Makefile.in | 19 +++++++++++++++++++ sim/common/Make-common.in | 3 ++- sim/common/local.mk | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/sim/Makefile.in b/sim/Makefile.in index 250fb491627..fa8806dcdc3 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -644,6 +644,7 @@ am_common_libcommon_a_OBJECTS = \ common/common_libcommon_a-callback.$(OBJEXT) \ common/common_libcommon_a-portability.$(OBJEXT) \ common/common_libcommon_a-sim-load.$(OBJEXT) \ + common/common_libcommon_a-syscall.$(OBJEXT) \ common/common_libcommon_a-target-newlib-errno.$(OBJEXT) \ common/common_libcommon_a-target-newlib-open.$(OBJEXT) \ common/common_libcommon_a-target-newlib-signal.$(OBJEXT) \ @@ -1284,6 +1285,7 @@ common_libcommon_a_SOURCES = \ common/callback.c \ common/portability.c \ common/sim-load.c \ + common/syscall.c \ common/target-newlib-errno.c \ common/target-newlib-open.c \ common/target-newlib-signal.c \ @@ -1618,6 +1620,8 @@ common/common_libcommon_a-portability.$(OBJEXT): \ common/$(am__dirstamp) common/$(DEPDIR)/$(am__dirstamp) common/common_libcommon_a-sim-load.$(OBJEXT): common/$(am__dirstamp) \ common/$(DEPDIR)/$(am__dirstamp) +common/common_libcommon_a-syscall.$(OBJEXT): common/$(am__dirstamp) \ + common/$(DEPDIR)/$(am__dirstamp) common/common_libcommon_a-target-newlib-errno.$(OBJEXT): \ common/$(am__dirstamp) common/$(DEPDIR)/$(am__dirstamp) common/common_libcommon_a-target-newlib-open.$(OBJEXT): \ @@ -1813,6 +1817,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/common_libcommon_a-callback.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/common_libcommon_a-portability.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/common_libcommon_a-sim-load.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/common_libcommon_a-syscall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/common_libcommon_a-target-newlib-errno.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/common_libcommon_a-target-newlib-open.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/common_libcommon_a-target-newlib-signal.Po@am__quote@ @@ -1914,6 +1919,20 @@ common/common_libcommon_a-sim-load.obj: common/sim-load.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(common_libcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o common/common_libcommon_a-sim-load.obj `if test -f 'common/sim-load.c'; then $(CYGPATH_W) 'common/sim-load.c'; else $(CYGPATH_W) '$(srcdir)/common/sim-load.c'; fi` +common/common_libcommon_a-syscall.o: common/syscall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(common_libcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT common/common_libcommon_a-syscall.o -MD -MP -MF common/$(DEPDIR)/common_libcommon_a-syscall.Tpo -c -o common/common_libcommon_a-syscall.o `test -f 'common/syscall.c' || echo '$(srcdir)/'`common/syscall.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) common/$(DEPDIR)/common_libcommon_a-syscall.Tpo common/$(DEPDIR)/common_libcommon_a-syscall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/syscall.c' object='common/common_libcommon_a-syscall.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(common_libcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o common/common_libcommon_a-syscall.o `test -f 'common/syscall.c' || echo '$(srcdir)/'`common/syscall.c + +common/common_libcommon_a-syscall.obj: common/syscall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(common_libcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT common/common_libcommon_a-syscall.obj -MD -MP -MF common/$(DEPDIR)/common_libcommon_a-syscall.Tpo -c -o common/common_libcommon_a-syscall.obj `if test -f 'common/syscall.c'; then $(CYGPATH_W) 'common/syscall.c'; else $(CYGPATH_W) '$(srcdir)/common/syscall.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) common/$(DEPDIR)/common_libcommon_a-syscall.Tpo common/$(DEPDIR)/common_libcommon_a-syscall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/syscall.c' object='common/common_libcommon_a-syscall.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(common_libcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o common/common_libcommon_a-syscall.obj `if test -f 'common/syscall.c'; then $(CYGPATH_W) 'common/syscall.c'; else $(CYGPATH_W) '$(srcdir)/common/syscall.c'; fi` + common/common_libcommon_a-target-newlib-errno.o: common/target-newlib-errno.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(common_libcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT common/common_libcommon_a-target-newlib-errno.o -MD -MP -MF common/$(DEPDIR)/common_libcommon_a-target-newlib-errno.Tpo -c -o common/common_libcommon_a-target-newlib-errno.o `test -f 'common/target-newlib-errno.c' || echo '$(srcdir)/'`common/target-newlib-errno.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) common/$(DEPDIR)/common_libcommon_a-target-newlib-errno.Tpo common/$(DEPDIR)/common_libcommon_a-target-newlib-errno.Po diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 2d4159393ac..67bfb41baa7 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -232,6 +232,7 @@ COMMON_OBJS_NAMES = \ callback.o \ portability.o \ sim-load.o \ + syscall.o \ target-newlib-errno.o \ target-newlib-open.o \ target-newlib-signal.o \ @@ -239,7 +240,7 @@ COMMON_OBJS_NAMES = \ version.o COMMON_OBJS = $(COMMON_OBJS_NAMES:%=../common/common_libcommon_a-%) -LIB_OBJS = modules.o syscall.o $(COMMON_OBJS) $(SIM_OBJS) +LIB_OBJS = modules.o $(COMMON_OBJS) $(SIM_OBJS) COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ diff --git a/sim/common/local.mk b/sim/common/local.mk index a83b487f32d..55068fc7331 100644 --- a/sim/common/local.mk +++ b/sim/common/local.mk @@ -37,6 +37,7 @@ noinst_LIBRARIES += %D%/libcommon.a %D%/callback.c \ %D%/portability.c \ %D%/sim-load.c \ + %D%/syscall.c \ %D%/target-newlib-errno.c \ %D%/target-newlib-open.c \ %D%/target-newlib-signal.c \ -- 2.30.2