sim: ppc: use common version.o too

Message ID 20210614020341.22238-1-vapier@gentoo.org
State New
Headers show
Series
  • sim: ppc: use common version.o too
Related show

Commit Message

Eli Zaretskii via Gdb-patches June 14, 2021, 2:03 a.m.
The common version.o we're building can be used for the ppc subdir,
so switch it over too.
---
 sim/ppc/Makefile.in | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

-- 
2.31.1

Patch

diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index af9695d23f06..0814a34fbc3d 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -493,6 +493,9 @@  MAIN_SRC = \
 	gdb-sim.c \
 	sim_calls.c
 
+COMMON_OBJS_NAMES = \
+	version.o
+COMMON_OBJS = $(COMMON_OBJS_NAMES:%=../common/common_libcommon_a-%)
 
 # NOTE: semantics, idecode and psim put last so smaller files are compiled
 #       first
@@ -527,7 +530,7 @@  LIB_OBJ = \
 	support.o \
 	@sim_fpu@ \
 	psim.o \
-	version.o \
+	$(COMMON_OBJS) \
 	$(PACKAGE_OBJ) \
 	$(HW_OBJ) \
 	options.o
@@ -554,12 +557,6 @@  $(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ)
 	$(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
 	$(RANLIB) $(TARGETLIB)
 
-version.c: Makefile $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcroot)/sim/common/create-version.sh
-	$(SHELL) $(srcroot)/sim/common/create-version.sh $(srcroot)/gdb $@.tmp
-	$(SHELL) $(srcroot)/move-if-change $@.tmp $@
-	touch $@
-version.o: version.c $(version_h)
-
 psim.o: psim.c $(CPU_H) $(IDECODE_H) $(OPTIONS_H) $(TREE_H) $(BFD_H)
 
 bits.o: bits.c $(BASICS_H)