From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110827 invoked by alias); 27 Dec 2016 10:08:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 110810 invoked by uid 89); 27 Dec 2016 10:08:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*amodra, joel, BFD64, bfd64 X-Spam-User: qpsmtpd, 2 recipients X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Dec 2016 10:08:48 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7C84A1167B6; Tue, 27 Dec 2016 05:08:46 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ClZBWg1iV8qi; Tue, 27 Dec 2016 05:08:46 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 0BBEE1167A7; Tue, 27 Dec 2016 05:08:46 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 8FA3F67174; Tue, 27 Dec 2016 14:08:41 +0400 (RET) Date: Tue, 27 Dec 2016 10:08:00 -0000 From: Joel Brobecker To: "Maciej W. Rozycki" Cc: Alan Modra , binutils@sourceware.org, gdb-patches@sourceware.org, Tristan Gingold Subject: Re: [PATCH, RFA] opcodes: Use autoconf to check for `bfd_mips_elf_get_abiflags' in BFD Message-ID: <20161227100841.25zlpfrfcl6vp3xl@adacore.com> References: <20161215230316.GM10584@bubble.grove.modra.org> <20161222123958.GA2896@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2-neo (2016-08-21) X-SW-Source: 2016-12/txt/msg00426.txt.bz2 > Fix a regression introduced with commit 5e7fc731f80e ("MIPS/opcodes: > Also set disassembler's ASE flags from ELF structures"), further updated > with commit 4df995c77118 ("MIPS/opcodes: Also set disassembler's ASE > flags from ELF structures"), and use autoconf to check for the presence > of `bfd_mips_elf_get_abiflags' in BFD. > > opcodes/ > * mips-dis.c (set_default_mips_dis_options): Use > HAVE_BFD_MIPS_ELF_GET_ABIFLAGS rather than BFD64 to guard the > call to `bfd_mips_elf_get_abiflags'. > * configure.ac: Check for `bfd_mips_elf_get_abiflags' in BFD. > * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add `libbfd.la'. > * aclocal.m4: Regenerate. > * configure: Regenerate. > * config.in: Regenerate. > * Makefile.in: Regenerate. Unfortunately, this change breaks the following scenario, used by the src-release.sh script (used to produce our nightly source packages, as well as our official releases). It also looks like the change is in the binutils 2.28 branch as well, so if Tristan uses that script to produce the release, it's not going to work. 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, but I haven't bothered trying. The reason it fails is that "make distclean" depends on distclean-host which then depends on: distclean-host: maybe-distclean-bfd distclean-host: maybe-distclean-opcodes So, "make distclean" first does a "distclean" in bfd, followed by a "distclean" in opcodes. The bfd distclean results in libbfd.la being deleted. And because opcodes' Makefile now depends on it, we get this error: | make: Entering directory '/[...]/obj/opcodes' | make: *** No rule to make target '../bfd/libbfd.la', needed by 'config.status'. Stop. | make: Leaving directory '/[...]/obj/opcodes' I haven't been able to figure out how distclean depends on CONFIG_STATUS_DEPENDENCIES, but I'm thiking it's probably one of the implicit dependencies. But looking at the automake documentation about CONFIG_STATUS_DEPENDENCIES, it looks like this is meant to be listing the depedencies to re-generate the Makefile. It don't think libbfd.a/la is in this category, is it? I don't have a solution. Perhaps one way to approach the problem might be to distclean in the reverse order to configure/build? If opcodes depends on bfd and we distclean bfd, then there might indeed be some dependencies missing. We need a solution fairly quickly... -- Joel