Skip to content

Commit

Permalink
s390: Fix build when using EXEEXT_FOR_BUILD
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Remus authored and ouuleilei-bot committed Dec 15, 2023
1 parent 324998b commit ece4a08
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions opcodes/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,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
Expand Down
7 changes: 5 additions & 2 deletions opcodes/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -1551,8 +1551,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
Expand Down

0 comments on commit ece4a08

Please sign in to comment.