This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] MIPS: Opcode membership proposal
- From: Alan Modra <amodra at gmail dot com>
- To: "Maciej W. Rozycki" <macro at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 17 Jun 2013 21:21:41 +0930
- Subject: Re: [PATCH] MIPS: Opcode membership proposal
- References: <alpine dot DEB dot 1 dot 10 dot 1012181108290 dot 4142 at tp dot orcam dot me dot uk> <alpine dot DEB dot 1 dot 10 dot 1110311233290 dot 28657 at tp dot orcam dot me dot uk> <87obway4f5 dot fsf at firetop dot home> <alpine dot DEB dot 1 dot 10 dot 1208092012040 dot 20608 at tp dot orcam dot me dot uk>
On Fri, Aug 10, 2012 at 12:07:11PM +0100, Maciej W. Rozycki wrote:
> +micromips-opc.lo: micromips-opc.c
> + $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) -c -o $@ $<
> +
> +mips-opc.lo: mips-opc.c
> + $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) -c -o $@ $<
> +
> +mips16-opc.lo: mips16-opc.c
> + $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) -c -o $@ $<
> +
This patch resulted in no dependencies being generated for the mips
opcode files, causing my regression tests to fail spectacularly from
time to time. I finally got around to looking into the problem.
* Makefile.am (mips-opc.lo): Add rules to create automatic
dependency files. Pass archdefs.
(micromips-opc.lo, mips16-opc.lo): Likewise.
* Makefile.in: Regenerate.
Index: opcodes/Makefile.am
===================================================================
RCS file: /cvs/src/src/opcodes/Makefile.am,v
retrieving revision 1.172
diff -u -p -r1.172 Makefile.am
--- opcodes/Makefile.am 6 Feb 2013 23:22:25 -0000 1.172
+++ opcodes/Makefile.am 17 Jun 2013 11:06:21 -0000
@@ -573,13 +573,43 @@ $(srcdir)/rl78-decode.c: @MAINT@ $(srcdi
./opc2c$(EXEEXT_FOR_BUILD) $(srcdir)/rl78-decode.opc > $(srcdir)/rl78-decode.c
micromips-opc.lo: micromips-opc.c
- $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) -c -o $@ $<
+if am__fastdepCC
+ $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) \
+ -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ @archdefs@ $<
+ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+else
+if AMDEP
+ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+endif
+ $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) -c -o $@ @archdefs@ $<
+endif
mips-opc.lo: mips-opc.c
- $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) -c -o $@ $<
+if am__fastdepCC
+ $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) \
+ -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ @archdefs@ $<
+ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+else
+if AMDEP
+ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+endif
+ $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) -c -o $@ @archdefs@ $<
+endif
mips16-opc.lo: mips16-opc.c
- $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) -c -o $@ $<
+if am__fastdepCC
+ $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) \
+ -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ @archdefs@ $<
+ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+else
+if AMDEP
+ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+endif
+ $(LTCOMPILE) $(NO_WMISSING_FIELD_INITIALIZERS) -c -o $@ @archdefs@ $<
+endif
$(srcdir)/rx-decode.c: @MAINT@ $(srcdir)/rx-decode.opc opc2c$(EXEEXT_FOR_BUILD)
./opc2c$(EXEEXT_FOR_BUILD) $(srcdir)/rx-decode.opc > $(srcdir)/rx-decode.c
--
Alan Modra
Australia Development Lab, IBM