public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: bpf: move arch-specific file compilation to top-level
@ 2023-01-10  6:25 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2023-01-10  6:25 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=75015a129feec801a5bc275742a8490f05ef6f87

commit 75015a129feec801a5bc275742a8490f05ef6f87
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Jan 1 13:37:18 2023 -0500

    sim: bpf: move arch-specific file compilation to top-level
    
    We can drop the arch-specific rules from the subdir as they're no
    longer used.

Diff:
---
 sim/Makefile.in     | 10 +++++++---
 sim/bpf/Makefile.in | 23 -----------------------
 sim/bpf/local.mk    | 11 ++++++++---
 3 files changed, 15 insertions(+), 29 deletions(-)

diff --git a/sim/Makefile.in b/sim/Makefile.in
index 1c788da82a3..e36211341c5 100644
--- a/sim/Makefile.in
+++ b/sim/Makefile.in
@@ -2100,6 +2100,13 @@ testsuite_common_CPPFLAGS = \
 @SIM_ENABLE_ARCH_bfin_TRUE@	bfin_wp \
 @SIM_ENABLE_ARCH_bfin_TRUE@	eth_phy
 
+@SIM_ENABLE_ARCH_bpf_TRUE@AM_CPPFLAGS_bpf = -DWITH_TARGET_WORD_BITSIZE=64
+@SIM_ENABLE_ARCH_bpf_TRUE@AM_CPPFLAGS_bpf_mloop_le.o = -DWANT_ISA_EBPFLE
+@SIM_ENABLE_ARCH_bpf_TRUE@AM_CPPFLAGS_bpf_mloop_be.o = -DWANT_ISA_EBPFBE
+@SIM_ENABLE_ARCH_bpf_TRUE@AM_CPPFLAGS_bpf_decode_le.o = -DWANT_ISA_EBPFLE
+@SIM_ENABLE_ARCH_bpf_TRUE@AM_CPPFLAGS_bpf_decode_be.o = -DWANT_ISA_EBPFBE
+@SIM_ENABLE_ARCH_bpf_TRUE@AM_CPPFLAGS_bpf_sem_le.o = -DWANT_ISA_EBPFLE
+@SIM_ENABLE_ARCH_bpf_TRUE@AM_CPPFLAGS_bpf_sem_be.o = -DWANT_ISA_EBPFBE
 @SIM_ENABLE_ARCH_bpf_TRUE@bpf_libsim_a_SOURCES = 
 @SIM_ENABLE_ARCH_bpf_TRUE@bpf_libsim_a_LIBADD = \
 @SIM_ENABLE_ARCH_bpf_TRUE@	$(common_libcommon_a_OBJECTS) \
@@ -4723,9 +4730,6 @@ testsuite/common/bits64m63.c: testsuite/common/bits-gen$(EXEEXT) testsuite/commo
 @SIM_ENABLE_ARCH_bfin_TRUE@	$(AM_V_at)touch $(srcdir)/bfin/linux-fixed-code.h
 @SIM_ENABLE_ARCH_bpf_TRUE@$(bpf_libsim_a_OBJECTS) $(bpf_libsim_a_LIBADD): bpf/hw-config.h
 
-@SIM_ENABLE_ARCH_bpf_TRUE@bpf/%.o: bpf/%.c
-@SIM_ENABLE_ARCH_bpf_TRUE@	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
-
 @SIM_ENABLE_ARCH_bpf_TRUE@bpf/%.o: common/%.c
 @SIM_ENABLE_ARCH_bpf_TRUE@	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
 @SIM_ENABLE_ARCH_bpf_TRUE@bpf/modules.c: | $(bpf_BUILD_OUTPUTS)
diff --git a/sim/bpf/Makefile.in b/sim/bpf/Makefile.in
index 64ec667c12c..2376b859dd8 100644
--- a/sim/bpf/Makefile.in
+++ b/sim/bpf/Makefile.in
@@ -22,27 +22,4 @@ SIM_EXTRA_CFLAGS = -DWITH_TARGET_WORD_BITSIZE=64
 
 ## COMMON_POST_CONFIG_FRAG
 
-# Dependencies for binaries from CGEN generated source
-
-mloop-le.o: mloop-le.c
-	$(COMPILE) -DWANT_ISA_EBPFLE mloop-le.c
-	$(POSTCOMPILE)
-mloop-be.o: mloop-be.c
-	$(COMPILE) -DWANT_ISA_EBPFBE mloop-be.c
-	$(POSTCOMPILE)
-
-decode-le.o: decode-le.c
-	$(COMPILE) -DWANT_ISA_EBPFLE $(srcdir)/decode-le.c
-	$(POSTCOMPILE)
-decode-be.o: decode-be.c
-	$(COMPILE) -DWANT_ISA_EBPFBE $(srcdir)/decode-be.c
-	$(POSTCOMPILE)
-
-sem-le.o: sem-le.c
-	$(COMPILE) -DWANT_ISA_EBPFLE $(srcdir)/sem-le.c
-	$(POSTCOMPILE)
-sem-be.o: sem-be.c
-	$(COMPILE) -DWANT_ISA_EBPFBE $(srcdir)/sem-be.c
-	$(POSTCOMPILE)
-
 arch = bpf
diff --git a/sim/bpf/local.mk b/sim/bpf/local.mk
index 19dcc25736c..580f744520c 100644
--- a/sim/bpf/local.mk
+++ b/sim/bpf/local.mk
@@ -15,6 +15,14 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+AM_CPPFLAGS_%C% = -DWITH_TARGET_WORD_BITSIZE=64
+AM_CPPFLAGS_%C%_mloop_le.o = -DWANT_ISA_EBPFLE
+AM_CPPFLAGS_%C%_mloop_be.o = -DWANT_ISA_EBPFBE
+AM_CPPFLAGS_%C%_decode_le.o = -DWANT_ISA_EBPFLE
+AM_CPPFLAGS_%C%_decode_be.o = -DWANT_ISA_EBPFBE
+AM_CPPFLAGS_%C%_sem_le.o = -DWANT_ISA_EBPFLE
+AM_CPPFLAGS_%C%_sem_be.o = -DWANT_ISA_EBPFBE
+
 %C%_libsim_a_SOURCES =
 %C%_libsim_a_LIBADD = \
 	$(common_libcommon_a_OBJECTS) \
@@ -44,9 +52,6 @@ $(%C%_libsim_a_OBJECTS) $(%C%_libsim_a_LIBADD): %D%/hw-config.h
 
 noinst_LIBRARIES += %D%/libsim.a
 
-%D%/%.o: %D%/%.c
-	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
-
 %D%/%.o: common/%.c
 	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-10  6:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10  6:25 [binutils-gdb] sim: bpf: move arch-specific file compilation to top-level Michael Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).