This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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:
> 
>    -# development.sh is used to determine -Werror default.
>    -CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
>    +# development.sh is used to determine -Werror default, libbfd.la is needed
>    +# for function availability checks.
>    +CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh ../bfd/libbfd.la
> 
> 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. 

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

Diff below excludes the reversion.

diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 3e9dc54..a441feb 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -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
+else
+if AMDEP
+	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+endif
+	$(LTCOMPILE) -c -o $@ $(MIPS_DEFS) $<
+endif
+
 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]