From patchwork Fri Nov 4 00:46:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 59874 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 165263858403 for ; Fri, 4 Nov 2022 00:47:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 165263858403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667522822; bh=VnnIbF56ynnS6VwdJJj1A2sVN0XqDYy492o8jhCzU8Y=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=JcBFFGth1wFW69YzgNfX8cJWnlP+MIt5aCymZgSgrG0LyfT3vs64uSCZ82dwsi2Po 7Bi6Qvk/1uGstteAXfI0PRxW2keuovpyka5nse63eEc+chWpxDNR8oO6ogrpDyAAUE NvVl3h+jUxtBbe7qIZXCd3PsVttJYmfnWCG1oBvg= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 197F83858C39 for ; Fri, 4 Nov 2022 00:46:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 197F83858C39 Received: by smtp.gentoo.org (Postfix, from userid 559) id ABE353413E3; Fri, 4 Nov 2022 00:46:35 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH] sim: build: remove various obsolete generation dep variables Date: Fri, 4 Nov 2022 07:46:32 +0700 Message-Id: <20221104004632.22639-1-vapier@gentoo.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Mike Frysinger via Gdb-patches From: Mike Frysinger Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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. --- sim/bpf/Makefile.in | 20 +----- sim/common/Make-common.in | 127 -------------------------------------- sim/cr16/Makefile.in | 2 - sim/cris/Makefile.in | 20 ------ sim/d10v/Makefile.in | 5 -- sim/frv/Makefile.in | 14 ----- sim/iq2000/Makefile.in | 9 --- sim/lm32/Makefile.in | 9 --- sim/m32r/Makefile.in | 6 -- sim/mn10300/Makefile.in | 3 - sim/or1k/Makefile.in | 23 +------ sim/sh/Makefile.in | 1 - sim/v850/Makefile.in | 4 -- 13 files changed, 4 insertions(+), 239 deletions(-) diff --git a/sim/bpf/Makefile.in b/sim/bpf/Makefile.in index 23b103ce8332..522484235357 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 a79a375a90c5..2698f7b2b673 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 f37bdccf08d4..f62589207ee9 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 c3660e76f0d4..7b69c114d929 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 458fd80eb677..0437e803fe5b 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 effd03699be9..3d0646f6ae7c 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 e7e0c71ea866..2d8c94cdd024 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 05191597414c..5d78e36bf6bb 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 935c33da6e26..6a0e2e5fcf5e 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 5240fc629298..f8ac93cdd56e 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 20952cb2f149..fdf49835c7b8 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 4bba7059ff81..1960cb1fcf40 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 ab4214526a4c..ec70b0bb15a5 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