]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
s390: Fix build when using EXEEXT_FOR_BUILD
authorJens Remus <jremus@linux.ibm.com>
Wed, 20 Dec 2023 10:14:47 +0000 (11:14 +0100)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Wed, 20 Dec 2023 10:50:32 +0000 (11:50 +0100)
Suffix the s390-mkopc build utility executable file name with
EXEEXT_FOR_BUILD. Otherwise it cannot be located when building with
EXEEXT_FOR_BUILD. Use pattern used for other architecture build
utilities and compile and link s390-mkopc in two steps.

While at it also specify the dependencies of s390-mkopc.c.

opcodes/
* Makefile.am: Add target to build s390-mkopc.o. Correct
  target to build s390-mkopc$(EXEEXT_FOR_BUILD).
* Makefile.in: Regenerate.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Reviewed-by: Andreas Krebbel <krebbel@linux.ibm.com>
opcodes/Makefile.am
opcodes/Makefile.in

index 5804dd1ab386cfddcaa259ee4d1209900c8eba46..ea26498950990f72166f48c4494412d5999c2db1 100644 (file)
@@ -570,8 +570,11 @@ opc2c$(EXEEXT_FOR_BUILD): opc2c.o $(BUILD_LIBS_DEPS)
 opc2c.o: opc2c.c $(INCDIR)/libiberty.h
        $(AM_V_CC)$(COMPILE_FOR_BUILD) -c $(srcdir)/opc2c.c
 
-s390-mkopc$(EXEEXT_FOR_BUILD): s390-mkopc.c
-       $(AM_V_CCLD)$(COMPILE_FOR_BUILD) -o s390-mkopc $(srcdir)/s390-mkopc.c
+s390-mkopc$(EXEEXT_FOR_BUILD): s390-mkopc.o
+       $(AM_V_CCLD)$(LINK_FOR_BUILD) s390-mkopc.o
+
+s390-mkopc.o: s390-mkopc.c $(INCDIR)/opcode/s390.h
+       $(COMPILE_FOR_BUILD) -c $(srcdir)/s390-mkopc.c
 
 s390-opc.tab: s390-mkopc$(EXEEXT_FOR_BUILD) s390-opc.txt
        $(AM_V_GEN)./s390-mkopc$(EXEEXT_FOR_BUILD) < $(srcdir)/s390-opc.txt > s390-opc.tab
index e2c6e5a4374ba3ef7f51d5f74c4b357563c2ea3a..7586b54fbd83c40dffbac1f48dccd0f34cb34dd9 100644 (file)
@@ -1548,8 +1548,11 @@ opc2c$(EXEEXT_FOR_BUILD): opc2c.o $(BUILD_LIBS_DEPS)
 opc2c.o: opc2c.c $(INCDIR)/libiberty.h
        $(AM_V_CC)$(COMPILE_FOR_BUILD) -c $(srcdir)/opc2c.c
 
-s390-mkopc$(EXEEXT_FOR_BUILD): s390-mkopc.c
-       $(AM_V_CCLD)$(COMPILE_FOR_BUILD) -o s390-mkopc $(srcdir)/s390-mkopc.c
+s390-mkopc$(EXEEXT_FOR_BUILD): s390-mkopc.o
+       $(AM_V_CCLD)$(LINK_FOR_BUILD) s390-mkopc.o
+
+s390-mkopc.o: s390-mkopc.c $(INCDIR)/opcode/s390.h
+       $(COMPILE_FOR_BUILD) -c $(srcdir)/s390-mkopc.c
 
 s390-opc.tab: s390-mkopc$(EXEEXT_FOR_BUILD) s390-opc.txt
        $(AM_V_GEN)./s390-mkopc$(EXEEXT_FOR_BUILD) < $(srcdir)/s390-opc.txt > s390-opc.tab