From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Ga7uJxaJmGAwDAAAWB0awg (envelope-from ) for ; Sun, 09 May 2021 21:15:02 -0400 Received: by simark.ca (Postfix, from userid 112) id 90F521F11C; Sun, 9 May 2021 21:15:02 -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 27C1D1E54D for ; Sun, 9 May 2021 21:14:58 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AB8BE3848404; Mon, 10 May 2021 01:14:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB8BE3848404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1620609297; bh=sEz+9YG4ydj1vLSefIYSl9DvdgxdgGu2KPItVJb0bLs=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Z/hguinO6tMW/biaIbIjZzgbyCRWsKGHJpvGLctrqCmqag1jozSzAY63Ttkb6o/2Z lHaFhVGZ9sigvCf7VYGGRvIU50CeJtMfqL9g3HON5QY1ggDGSkkx3o7TzWEnGeQPy9 GRBoVFzHwjwq6smQx6BPYbgn45neN5yVsqkRED3Y= Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 5480B385E017 for ; Mon, 10 May 2021 01:14:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5480B385E017 Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3C1D8335CD8; Mon, 10 May 2021 01:14:51 +0000 (UTC) Date: Sun, 9 May 2021 21:14:50 -0400 To: Simon Marchi Subject: Re: [PATCH] gdb: add ../config/pkg.m4 in acinclude.m4 Message-ID: Mail-Followup-To: Simon Marchi , gdb-patches@sourceware.org References: <20210509012432.1154603-1-simon.marchi@polymtl.ca> <04311a21-f880-b6d5-eb5d-5cd70d95b607@polymtl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <04311a21-f880-b6d5-eb5d-5cd70d95b607@polymtl.ca> 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: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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