From: Mike Frysinger Date: Thu, 3 Nov 2022 13:26:01 +0000 (+0700) Subject: sim: build: remove various obsolete generation dep variables X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9146585a05aa162e57d13bd2264f7dc84117c40d;p=binutils-gdb.git sim: build: remove various obsolete generation dep variables These manual settings were necessary when we weren't doing automatic header dependency tracking. That was changed a while ago, and we use automake now to do it all for us. As a result, many of these vars aren't even referenced anymore. Further, some of the source file generation (e.g. .c files, or igen, or cgen outputs) were moved to the common automake build, and it takes care of dependency tracking for us with the object files. --- diff --git a/sim/bpf/Makefile.in b/sim/bpf/Makefile.in index 23b103ce833..52248423535 100644 --- a/sim/bpf/Makefile.in +++ b/sim/bpf/Makefile.in @@ -31,28 +31,10 @@ SIM_OBJS = \ $(BPF_GEN_OBJS) \ $(BPF_HAND_OBJS) -SIM_EXTRA_DEPS = \ - $(CGEN_INCLUDE_DEPS) \ - arch.h \ - bpf-sim.h \ - eng-le.h eng-be.h \ - $(srcdir)/../../opcodes/bpf-desc.h \ - $(srcdir)/../../opcodes/bpf-opc.h - SIM_EXTRA_CLEAN = bpf-clean ## COMMON_POST_CONFIG_FRAG -# BPF headers - -BPF_INCLUDE_DEPS = \ - $(CGEN_MAIN_CPU_DEPS) \ - $(SIM_EXTRA_DEPS) \ - cpu.h cpuall.h \ - decode-le.h decode-be.h \ - defs-le.h defs-be.h \ - eng-le.h eng-be.h - # Dependencies for binaries from CGEN generated source mloop-le.o: mloop-le.c @@ -65,7 +47,7 @@ mloop-be.o: mloop-be.c decode-le.o: decode-le.c $(COMPILE) -DWANT_ISA_EBPFLE $(srcdir)/decode-le.c $(POSTCOMPILE) -decode-be.o: decode-be.c $(BPF_INCLUDE_DEPS) +decode-be.o: decode-be.c $(COMPILE) -DWANT_ISA_EBPFBE $(srcdir)/decode-be.c $(POSTCOMPILE) diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index a79a375a90c..2698f7b2b67 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -175,24 +175,6 @@ SIM_NEW_COMMON_OBJS = \ \ $(SIM_HW_OBJS) \ -# cgen-sim.h and the headers it includes -CGEN_SIM_DEPS = \ - $(srccom)/cgen-sim.h \ - $(srccom)/cgen-defs.h \ - $(srccom)/cgen-scache.h \ - $(srccom)/cgen-fpu.h \ - $(srccom)/cgen-par.h \ - $(srccom)/cgen-cpu.h \ - $(srccom)/cgen-trace.h \ - cpuall.h - -# Add this to SIM_EXTRA_DEPS. -CGEN_INCLUDE_DEPS = \ - $(CGEN_SIM_DEPS) \ - $(srccom)/cgen-engine.h \ - $(srccom)/cgen-types.h \ - $(srcdir)/../../include/opcode/cgen.h - ## End COMMON_PRE_CONFIG_FRAG ## COMMON_POST_CONFIG_FRAG @@ -244,9 +226,6 @@ LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ RUNTESTFLAGS = -callback_h = $(srcroot)/include/sim/callback.h -remote_sim_h = $(srcroot)/include/sim/sim.h - all: libsim.a run$(EXEEXT) libsim.a: $(LIB_OBJS) @@ -259,104 +238,6 @@ run$(EXEEXT): $(SIM_RUN_OBJS) libsim.a $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o run$(EXEEXT) \ $(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS) -# -# Rules for building sim-* components. Triggered by listing the corresponding -# .o file in the list of simulator targets. -# - -sim_main_headers = \ - sim-main.h \ - $(sim-assert_h) \ - $(sim-base_h) \ - $(sim-cpu_h) \ - $(sim-engine_h) \ - $(sim-events_h) \ - $(sim-memopt_h) \ - $(sim-model_h) \ - $(sim-module_h) \ - $(sim-profile_h) \ - $(sim-trace_h) \ - $(sim-watch_h) \ - $(sim-basics_h) \ - $(SIM_EXTRA_DEPS) - -# Exported version of sim_main_headers. -SIM_MAIN_DEPS = \ - $(sim_main_headers) - -sim-alu_h = $(srccom)/sim-alu.h -sim-arange_h = $(srccom)/sim-arange.h -sim-assert_h = $(srccom)/sim-assert.h -sim-base_h = $(srccom)/sim-base.h \ - $(sim-module_h) \ - $(sim-trace_h) \ - $(sim-core_h) \ - $(sim-events_h) \ - $(sim-profile_h) \ - $(sim-model_h) \ - $(sim-io_h) \ - $(sim-engine_h) \ - $(sim-watch_h) \ - $(sim-memopt_h) \ - $(sim-cpu_h) -sim-basics_h = $(srccom)/sim-basics.h \ - $(sim-config_h) \ - $(callback_h) \ - $(sim-inline_h) \ - $(sim-types_h) \ - $(sim-bits_h) \ - $(sim-endian_h) \ - $(sim-signal_h) \ - $(sim-arange_h) \ - $(sim-utils_h) -sim-bits_h = $(srccom)/sim-bits.h \ - $(srccom)/sim-bits.c -sim-config_h = $(srccom)/sim-config.h -sim-core_h = $(srccom)/sim-core.h -sim-cpu_h = $(srccom)/sim-cpu.h -sim-endian_h = $(srccom)/sim-endian.h \ - $(srccom)/sim-endian.c -sim-engine_h = $(srccom)/sim-engine.h -sim-events_h = $(srccom)/sim-events.h -sim-fpu_h = $(srccom)/sim-fpu.h -sim-hw_h = $(srccom)/sim-hw.h -sim-inline_h = $(srccom)/sim-inline.h -sim-io_h = $(srccom)/sim-io.h -sim-memopt_h = $(srccom)/sim-memopt.h -sim-model_h = $(srccom)/sim-model.h -sim-module_h = $(srccom)/sim-module.h -sim-n-bits_h = $(srccom)/sim-n-bits.h -sim-n-core_h = $(srccom)/sim-n-core.h -sim-n-endian_h = $(srccom)/sim-n-endian.h -sim-options_h = $(srccom)/sim-options.h -sim-profile_h = $(srccom)/sim-profile.h -sim-signal_h = $(srccom)/sim-signal.h -sim-trace_h = $(srccom)/sim-trace.h -sim-types_h = $(srccom)/sim-types.h -sim-utils_h = $(srccom)/sim-utils.h -sim-watch_h = $(srccom)/sim-watch.h - -hw-alloc_h = $(srccom)/hw-alloc.h -hw-base_h = $(srccom)/hw-base.h -hw-device_h = $(srccom)/hw-device.h -hw-events_h = $(srccom)/hw-events.h -hw-handles_h = $(srccom)/hw-handles.h -hw-instances_h = $(srccom)/hw-instances.h -hw-ports_h = $(srccom)/hw-ports.h -hw-properties_h = $(srccom)/hw-properties.h -hw-tree_h = $(srccom)/hw-tree.h - -hw_main_headers = \ - $(srccom)/hw-main.h \ - $(hw-alloc_h) \ - $(hw-base_h) \ - $(hw-device_h) \ - $(hw-events_h) \ - $(hw-instances_h) \ - $(hw-handles_h) \ - $(hw-ports_h) \ - $(hw-properties_h) \ - # # Dependency tracking. Most of this is conditional on GNU Make being # found by configure; if GNU Make is not found, we fall back to a @@ -440,14 +321,6 @@ stamp-modules: Makefile $(SIM_OBJS:.o=.c) $(SILENCE) rm -f $@.l-tmp $@.tmp $(SILENCE) touch $@ -# CGEN support. - -# For use in Makefile.in for cpu-specific files. -CGEN_MAIN_CPU_DEPS = \ - $(SIM_MAIN_DEPS) \ - $(srccom)/cgen-ops.h \ - $(srccom)/cgen-mem.h - # Support targets. install: install-common $(SIM_EXTRA_INSTALL) diff --git a/sim/cr16/Makefile.in b/sim/cr16/Makefile.in index f37bdccf08d..f62589207ee 100644 --- a/sim/cr16/Makefile.in +++ b/sim/cr16/Makefile.in @@ -24,6 +24,4 @@ SIM_OBJS = \ table.o \ simops.o -SIM_EXTRA_DEPS = simops.h - ## COMMON_POST_CONFIG_FRAG diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in index c3660e76f0d..7b69c114d92 100644 --- a/sim/cris/Makefile.in +++ b/sim/cris/Makefile.in @@ -33,12 +33,6 @@ SIM_OBJS = \ SIM_EXTRA_HW_DEVICES = rv cris cris_900000xx -# Extra headers included by sim-main.h. -# FIXME: $(srccom)/cgen-ops.h should be in CGEN_INCLUDE_DEPS. -SIM_EXTRA_DEPS = \ - $(CGEN_INCLUDE_DEPS) $(srccom)/cgen-ops.h \ - arch.h cpuall.h cris-sim.h engv10.h engv32.h - SIM_EXTRA_CLEAN = cris-clean ## COMMON_POST_CONFIG_FRAG @@ -56,20 +50,6 @@ rvdummy$(EXEEXT): rvdummy.o $(EXTRA_LIBDEPS) $(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=CC --mode=link \ $(CC) $(ALL_CFLAGS) -o rvdummy$(EXEEXT) rvdummy.o $(EXTRA_LIBS) -rvdummy.o: rvdummy.c $(remote_sim_h) $(callback_h) - -# CRISV10 objs - -CRISV10F_INCLUDE_DEPS = \ - $(CGEN_MAIN_CPU_DEPS) \ - cpuv10.h decodev10.h engv10.h - -# CRISV32 objs - -CRISV32F_INCLUDE_DEPS = \ - $(CGEN_MAIN_CPU_DEPS) \ - cpuv32.h decodev32.h engv32.h - cris-clean: -rm -f stamp-arch -rm -f tmp-* rvdummy$(EXEEXT) diff --git a/sim/d10v/Makefile.in b/sim/d10v/Makefile.in index 458fd80eb67..0437e803fe5 100644 --- a/sim/d10v/Makefile.in +++ b/sim/d10v/Makefile.in @@ -25,9 +25,4 @@ SIM_OBJS = \ simops.o \ endian.o -SIM_EXTRA_DEPS = simops.h - -INCLUDE = d10v_sim.h $(srcroot)/include/sim/callback.h endian.c \ - $(srcroot)/include/gdb/sim-d10v.h - ## COMMON_POST_CONFIG_FRAG diff --git a/sim/frv/Makefile.in b/sim/frv/Makefile.in index effd03699be..3d0646f6ae7 100644 --- a/sim/frv/Makefile.in +++ b/sim/frv/Makefile.in @@ -29,13 +29,6 @@ SIM_OBJS = \ profile.o profile-fr400.o profile-fr450.o profile-fr500.o profile-fr550.o options.o \ reset.o registers.o -# Extra headers included by sim-main.h. -SIM_EXTRA_DEPS = \ - $(CGEN_INCLUDE_DEPS) \ - arch.h cpuall.h frv-sim.h $(srcdir)/../../opcodes/frv-desc.h cache.h \ - registers.h profile.h eng.h \ - $(sim-options_h) - SIM_EXTRA_CFLAGS = @SIM_FRV_TRAPDUMP_FLAGS@ SIM_EXTRA_CLEAN = frv-clean @@ -47,13 +40,6 @@ memory.o sem.o: SIM_WERROR_CFLAGS = arch = frv -# FRV objs - -FRVBF_INCLUDE_DEPS = \ - $(CGEN_MAIN_CPU_DEPS) \ - $(SIM_EXTRA_DEPS) \ - cpu.h decode.h eng.h - frv-clean: rm -f tmp-* rm -f stamp-arch stamp-cpu diff --git a/sim/iq2000/Makefile.in b/sim/iq2000/Makefile.in index e7e0c71ea86..2d8c94cdd02 100644 --- a/sim/iq2000/Makefile.in +++ b/sim/iq2000/Makefile.in @@ -26,11 +26,6 @@ SIM_OBJS = \ sim-if.o arch.o \ $(IQ2000_OBJS) -# Extra headers included by sim-main.h. -SIM_EXTRA_DEPS = \ - $(CGEN_INCLUDE_DEPS) \ - arch.h cpuall.h $(srcdir)/../../opcodes/iq2000-desc.h eng.h - ALL_CPU_CFLAGS = -DHAVE_CPU_IQ2000BF -DHAVE_CPU_IQ10BF SIM_EXTRA_CLEAN = iq2000-clean @@ -45,10 +40,6 @@ arch.o: arch.c # IQ2000 objs -IQ2000BF_INCLUDE_DEPS = \ - $(CGEN_MAIN_CPU_DEPS) \ - cpu.h decode.h eng.h - iq2000-clean: rm -f tmp-* rm -f stamp-arch stamp-cpu diff --git a/sim/lm32/Makefile.in b/sim/lm32/Makefile.in index 05191597414..5d78e36bf6b 100644 --- a/sim/lm32/Makefile.in +++ b/sim/lm32/Makefile.in @@ -14,21 +14,12 @@ SIM_OBJS = \ SIM_EXTRA_HW_DEVICES = lm32cpu lm32timer lm32uart -# List of extra dependencies. -# Generally this consists of simulator specific files included by sim-main.h. -SIM_EXTRA_DEPS = $(CGEN_INCLUDE_DEPS) $(srcdir)/../../opcodes/lm32-desc.h \ - eng.h - SIM_EXTRA_CLEAN = lm32-clean ## COMMON_POST_CONFIG_FRAG arch = lm32 -LM32BF_INCLUDE_DEPS = \ - $(CGEN_MAIN_CPU_DEPS) \ - cpu.h decode.h eng.h - lm32-clean: rm -f stamp-arch stamp-cpu rm -f tmp-* diff --git a/sim/m32r/Makefile.in b/sim/m32r/Makefile.in index 935c33da6e2..6a0e2e5fcf5 100644 --- a/sim/m32r/Makefile.in +++ b/sim/m32r/Makefile.in @@ -35,12 +35,6 @@ SIM_OBJS = \ SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart -# Extra headers included by sim-main.h. -SIM_EXTRA_DEPS = \ - $(CGEN_INCLUDE_DEPS) \ - arch.h cpuall.h m32r-sim.h $(srcdir)/../../opcodes/m32r-desc.h \ - eng.h engx.h eng2.h - SIM_EXTRA_CLEAN = m32r-clean # Some modules don't build cleanly yet. diff --git a/sim/mn10300/Makefile.in b/sim/mn10300/Makefile.in index 5240fc62929..f8ac93cdd56 100644 --- a/sim/mn10300/Makefile.in +++ b/sim/mn10300/Makefile.in @@ -27,9 +27,6 @@ SIM_OBJS = $(MN10300_OBJS) interp.o SIM_EXTRA_HW_DEVICES = mn103cpu mn103int mn103tim mn103ser mn103iop -# Extra dependencies for "sim-main.h" -SIM_EXTRA_DEPS = mn10300_sim.h itable.h idecode.h - # List of extra flags to always pass to $(CC). SIM_EXTRA_CFLAGS = -DPOLL_QUIT_INTERVAL=0x20 diff --git a/sim/or1k/Makefile.in b/sim/or1k/Makefile.in index 20952cb2f14..fdf49835c7b 100644 --- a/sim/or1k/Makefile.in +++ b/sim/or1k/Makefile.in @@ -40,36 +40,19 @@ SIM_OBJS = \ SIM_OBJS += $(OR1K_OBJS) -# Extra headers included by sim-main.h. -SIM_EXTRA_DEPS = \ - $(CGEN_INCLUDE_DEPS) \ - or1k-sim.h \ - $(srcdir)/../../opcodes/or1k-desc.h \ - arch.h \ - cpuall.h \ - decode.h - ## COMMON_POST_CONFIG_FRAG arch = or1k -# or1k32bf - -OR1K32BF_INCLUDE_DEPS = \ - $(CGEN_MAIN_CPU_DEPS) \ - cpu.h \ - decode.h \ - eng.h - -or1k.o: or1k.c $(OR1K32BF_INCLUDE_DEPS) +or1k.o: or1k.c $(COMPILE) $< $(POSTCOMPILE) -sim-if.o: sim-if.c $(SIM_MAIN_DEPS) $(srcdir)/../common/sim-core.h eng.h +sim-if.o: sim-if.c $(COMPILE) $< $(POSTCOMPILE) -traps.o: traps.c $(SIM_MAIN_DEPS) eng.h +traps.o: traps.c $(COMPILE) $< $(POSTCOMPILE) diff --git a/sim/sh/Makefile.in b/sim/sh/Makefile.in index 4bba7059ff8..1960cb1fcf4 100644 --- a/sim/sh/Makefile.in +++ b/sim/sh/Makefile.in @@ -21,6 +21,5 @@ SIM_OBJS = \ interp.o \ $(SIM_NEW_COMMON_OBJS) \ table.o -SIM_EXTRA_DEPS = table.c code.c ppi.c ## COMMON_POST_CONFIG_FRAG diff --git a/sim/v850/Makefile.in b/sim/v850/Makefile.in index ab4214526a4..ec70b0bb15a 100644 --- a/sim/v850/Makefile.in +++ b/sim/v850/Makefile.in @@ -23,8 +23,4 @@ SIM_OBJS = \ itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \ sim-resume.o -# List of extra dependencies. -# Generally this consists of simulator specific files included by sim-main.h. -SIM_EXTRA_DEPS = v850_sim.h sim-main.h - ## COMMON_POST_CONFIG_FRAG