This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, RFA] opcodes: Use autoconf to check for `bfd_mips_elf_get_abiflags' in BFD

On Tue, Dec 27, 2016 at 02:08:41PM +0400, Joel Brobecker wrote:
> The reason for the failure is the following change:
>    -# is used to determine -Werror default.
>    +# is used to determine -Werror default, is needed
>    +# for function availability checks.
> It causes the following scenario to fail:
>    $ ./configure
>    $ make configure-host
>    $ make distclean
> I'm pretty sure "./configure; make; make distclean" fails the same way,

Yes, it does.  So let's revert that patch and simply modify the make
rule for mips-dis.lo (ie. provide it to overrided the default automake
rule) to test whether elfxx-mips.c has been compiled in.  The top
level makefile already has the required directory dependencies. 

	* Revert 2016-12-23.
	* Likewise.
	(MIPS_DEFS): Define.
	(mips-dis.lo): Add rule.
	* Regenerate.
	* aclocal.m4: Regenerate.
	* Regenerate.
	* configure: Regenerate.

Diff below excludes the reversion.

diff --git a/opcodes/ b/opcodes/
index 3e9dc54..a441feb 100644
--- a/opcodes/
+++ b/opcodes/
@@ -610,6 +609,19 @@ $(srcdir)/z8k-opc.h: @MAINT@ z8kgen$(EXEEXT_FOR_BUILD)
 z8k-dis.lo: $(srcdir)/z8k-opc.h
+MIPS_DEFS=`case \`cat ../bfd/ofiles\` in *elfxx-mips*) echo "-DHAVE_BFD_MIPS_ELF_GET_ABIFLAGS=1";; esac`
+mips-dis.lo: mips-dis.c
+if am__fastdepCC
+	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(MIPS_DEFS) $<
+	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+	$(LTCOMPILE) -c -o $@ $(MIPS_DEFS) $<
 sh-dis.lo: sh-dis.c
 if am__fastdepCC
 	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ @archdefs@ $(srcdir)/sh-dis.c

Alan Modra
Australia Development Lab, IBM

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]