aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Remus <jremus@linux.ibm.com>2023-12-20 11:14:47 +0100
committerAndreas Krebbel <krebbel@linux.ibm.com>2023-12-20 11:50:32 +0100
commit78aa7688e896cccae138d0bf13099f7b729150c2 (patch)
tree9fcad5cf69bfd629e411ea1aa56184f4cf4dcaec
parent06f05f35856b37bc6db014d0921638932dd5a97a (diff)
downloadgdb-78aa7688e896cccae138d0bf13099f7b729150c2.zip
gdb-78aa7688e896cccae138d0bf13099f7b729150c2.tar.gz
gdb-78aa7688e896cccae138d0bf13099f7b729150c2.tar.bz2
s390: Fix build when using EXEEXT_FOR_BUILD
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>
-rw-r--r--opcodes/Makefile.am7
-rw-r--r--opcodes/Makefile.in7
2 files changed, 10 insertions, 4 deletions
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 5804dd1..ea26498 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -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
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index e2c6e5a..7586b54 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -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