From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 5600BUmNmGBgDAAAWB0awg (envelope-from ) for ; Sun, 09 May 2021 21:32:57 -0400 Received: by simark.ca (Postfix, from userid 112) id 085EE1F11C; Sun, 9 May 2021 21:32:57 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D09FE1E54D for ; Sun, 9 May 2021 21:32:52 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7EA72385782C; Mon, 10 May 2021 01:32:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7EA72385782C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1620610372; bh=hL+yXSDzJDvyGB3SLh5R7eKxPyGWAA4oD2jFnCRulrk=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=k72lJdVSsf6rvHSx7SrlxuyIfh55zizm7dTuwp9b+we7gd8mYfTwLCu8N10kPOqfz iQJeEo5+g8Y2P5i++iqqiNiXQdAblSJgHZMPrACbo1GglkwJ6f1E1hkp0vnFYwRhna GZNkbsOSwNgBXsuB5neUaj9X6ILDIJkNOWJL5ZzU= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id AA9CD385782C for ; Mon, 10 May 2021 01:32:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AA9CD385782C Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 14A1WhSF029873 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 9 May 2021 21:32:47 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 14A1WhSF029873 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 123B11E54D for ; Sun, 9 May 2021 21:32:43 -0400 (EDT) Subject: Re: [PATCH] gdb: add ../config/pkg.m4 in acinclude.m4 To: gdb-patches@sourceware.org References: <20210509012432.1154603-1-simon.marchi@polymtl.ca> <04311a21-f880-b6d5-eb5d-5cd70d95b607@polymtl.ca> Message-ID: <7955e847-2307-48ad-d436-adf3280db586@polymtl.ca> Date: Sun, 9 May 2021 21:32:42 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 10 May 2021 01:32:43 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2021-05-09 9:14 p.m., Mike Frysinger wrote: > On 09 May 2021 20:16, Simon Marchi via Gdb-patches wrote: >> On 2021-05-09 4:00 p.m., Mike Frysinger wrote: >>> On 08 May 2021 21:24, Simon Marchi via Gdb-patches wrote: >>>> Since commit adeab0c5b33f ("config/debuginfod: do not include pkg.m4 >>>> directly"), it no longer works to re-generate the autoconf stuff in GDB >>>> without passing "-I ../config": >>>> >>>> $ autoreconf -f >>>> configure.ac:161: error: possibly undefined macro: AC_MSG_ERROR >>>> If this token and others are legitimate, please use m4_pattern_allow. >>>> See the Autoconf documentation. >>>> configure.ac:329: error: possibly undefined macro: AC_MSG_WARN >>>> configure.ac:409: error: possibly undefined macro: AC_DEFINE >>>> autoreconf: /opt/autostuff/2.69/bin/autoconf failed with exit status: 1 >>>> >>>> The reason is: since that commit, the PKG_CHECK_MODULES macro is not >>>> found. When passing "-I ../config" to the autoconf tools, then it's >>>> found. But if I understand correctly, the reason why we have all these >>>> includes in acinclude.m4 is to avoid having to specify that, to make the >>>> default invocation without special arguments "just work". >>> >>> how about this instead ? i can run `aclocal && autoconf` with this. >>> >>> --- a/gdb/configure.ac >>> +++ b/gdb/configure.ac >>> @@ -18,9 +18,8 @@ dnl along with this program. If not, see . >>> >>> dnl Process this file with autoconf to produce a configure script. >>> >>> -m4_include(../config/debuginfod.m4) >>> - >>> AC_INIT >>> +AC_CONFIG_MACRO_DIRS([../config]) >>> AC_CONFIG_SRCDIR([main.c]) >>> AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h]) >>> AM_MAINTAINER_MODE >> >> Ah yes, that sounds much better. If we have this, could we remove all >> lines in acinclude.m4 that refer to a file in ../config? > > we can remove most, but not all. there seems to be some bugs in aclocal where > it warns about not finding a few of the macros, but it actually does. probably > worth leaving the explicit includes so as to not confuse devs. > > updated patch below > -mike > > --- a/gdb/acinclude.m4 > +++ b/gdb/acinclude.m4 > @@ -21,49 +21,12 @@ m4_include(../gdbsupport/selftest.m4) > dnl gdb/configure.in uses BFD_NEED_DECLARATION, so get its definition. > m4_include(../bfd/bfd.m4) > > -dnl This gets the standard macros. > -m4_include(../config/acinclude.m4) > - > -dnl This gets GCC_ENABLE. > -sinclude(../config/enable.m4) > - > -dnl This gets AC_PLUGINS, needed by ACX_LARGEFILE. > -m4_include(../config/plugins.m4) > - > -dnl For ACX_LARGEFILE. > -m4_include(../config/largefile.m4) > - > -dnl For AM_SET_LEADING_DOT. > -m4_include(../config/lead-dot.m4) > - > -dnl This gets autoconf bugfixes. > -m4_include(../config/override.m4) > - > -dnl For ZW_GNU_GETTEXT_SISTER_DIR. > -m4_include(../config/gettext-sister.m4) > - > -dnl For AC_LIB_HAVE_LINKFLAGS. > -m4_include(../config/lib-ld.m4) > -m4_include(../config/lib-prefix.m4) > -m4_include(../config/lib-link.m4) > - > -dnl For ACX_PKGVERSION and ACX_BUGURL. > -m4_include(../config/acx.m4) > - > -dnl for TCL definitions > -m4_include(../config/tcl.m4) > - > -dnl For dependency tracking macros. > -m4_include([../config/depstand.m4]) > - > dnl For AM_LC_MESSAGES > m4_include([../config/lcmessage.m4]) > > dnl For AM_LANGINFO_CODESET. > m4_include([../config/codeset.m4]) > > -m4_include([../config/iconv.m4]) > - > m4_include([../config/zlib.m4]) > > m4_include([../gdbsupport/common.m4]) > @@ -76,8 +39,6 @@ m4_include(../gdbsupport/ptrace.m4) > > m4_include(ax_cxx_compile_stdcxx.m4) > > -m4_include([../config/ax_pthread.m4]) > - > dnl written by Guido Draheim , original by Alexandre Oliva > dnl Version 1.3 (2001/03/02) > dnl source http://www.gnu.org/software/ac-archive/Miscellaneous/ac_define_dir.html > --- a/gdb/aclocal.m4 > +++ b/gdb/aclocal.m4 > @@ -199,5 +199,20 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) > # Public sister of _AM_SUBST_NOTMAKE. > AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) > > +m4_include([../config/acx.m4]) > +m4_include([../config/ax_pthread.m4]) > +m4_include([../config/debuginfod.m4]) > +m4_include([../config/depstand.m4]) > +m4_include([../config/enable.m4]) > +m4_include([../config/gettext-sister.m4]) > +m4_include([../config/iconv.m4]) > +m4_include([../config/largefile.m4]) > +m4_include([../config/lead-dot.m4]) > +m4_include([../config/lib-ld.m4]) > +m4_include([../config/lib-link.m4]) > +m4_include([../config/lib-prefix.m4]) > +m4_include([../config/override.m4]) > m4_include([../config/pkg.m4]) > +m4_include([../config/plugins.m4]) > +m4_include([../config/tcl.m4]) > m4_include([acinclude.m4]) > --- a/gdb/configure > +++ b/gdb/configure > @@ -2990,6 +2990,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu > > > > + > ac_config_headers="$ac_config_headers config.h:config.in" > > > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -18,9 +18,8 @@ dnl along with this program. If not, see . > > dnl Process this file with autoconf to produce a configure script. > > -m4_include(../config/debuginfod.m4) > - > AC_INIT > +AC_CONFIG_MACRO_DIRS([../config]) > AC_CONFIG_SRCDIR([main.c]) > AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h]) > AM_MAINTAINER_MODE > Seeing that there is no significant change to the generated configure, that LGTM. However, it would be good to maybe wait for Tom Tromey's approval, he has more experience with this. Also, the same should be applied to gdbsupport and gdbserver. Simon