From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id B7DD53858D35; Thu, 19 Oct 2023 10:42:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B7DD53858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B7DD53858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.252 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697712159; cv=none; b=lQ60W/XXElGV0PddSP2SiUBl/KaDiuVGcWDiKg4DxlEdnYbEZ/NyPVaURzgOnbD7ZV3c2VnUNpdPJctTFcu1YY6bMCD4Ekt4zpvXtluwgWMfOrZFH4JZHOsDtl/uIHWtZZCS+iOo75BCsHuetGzURZwnHrJ/KnJ3QSp00uVERTY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697712159; c=relaxed/simple; bh=VDvlNgmR3uQS7nkBuEVwFQdUr3D3t4vaZrTvCAYl+v8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Y57rh/0YtdUw/U2/NJk0bOSz+mLoim0mKtJ45u4PMg9VR0D1L8nIDcz4/jfZOM3noIRh931C9ktuz3yxDYmfA/eZ6/bMhAf/53+JjJpWc/coF7JDd3Y6oJxse+CPKGHl63rLjLuhzlsH7blKC/IfRE0IHKqQtG4Axi7Pjud3FUo= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: 9RpVhLnaSXqOkI0uT0au8w== X-CSE-MsgGUID: 1WTxZW1rSKuzwOuEMsHDZA== X-IronPort-AV: E=Sophos;i="6.03,237,1694764800"; d="scan'208,223";a="20081593" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 19 Oct 2023 02:42:34 -0800 IronPort-SDR: EXpZb3hYuVHTTM682QWPROJ+ZIdXggpRwJfhBXi1cgaMdt2jvedhfs8vZnxl89m9gj9iNF2Npn vt/KO4c+6rKXBAoqP8Ap+VsmvCVlGvbdu99hm2xqJr8q7YYQmJm16MuWw+zxLt8/n04qWhisFn xELbpIksxfelukq0SjIfyFhIZXF+ucgPiCXm96G1uUxSfexaFBlhGQdEjdn9P9Y2/wvzniqCXg 5S6pHYz+mqcunuGkiyek2wsYyMzwiHoWin4jkYMPEkZI9CGKz61ovkR/FRrmOPOXmHXcZB1PVW n4o= From: Thomas Schwinge To: Andreas Schwab , , , CC: <3246251196ryan@gmail.com>, Iain Sandoe , , Paolo Bonzini , Nathanael Nerode , Alexandre Oliva , "Ralf Wildenhues" , Joseph Myers Subject: Re: Enable top-level recursive 'autoreconf' In-Reply-To: References: <4BD76988-F7CE-4AD1-8802-BAE371D1F9F5@sandoe.co.uk> <875y343xah.fsf@euler.schwinge.homeip.net> <87v8b37ye7.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Thu, 19 Oct 2023 12:42:26 +0200 Message-ID: <87r0lq99m5.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2023-10-19T11:57:33+0200, Andreas Schwab wrote: > On Okt 19 2023, Thomas Schwinge wrote: >> On 2023-10-18T15:42:18+0100, R jd <3246251196ryan@gmail.com> wrote: >>> I guess I can ask, why there is not a recursive approach for configurin= g >>> GCC. e.g. AC_SUBDIRS in the top level? >> >> ('AC_CONFIG_SUBDIRS' you mean.) You know, often it just takes someone t= o >> ask the right questions... ;-) >> >> What do people think about the attached >> "Enable top-level recursive 'autoreconf'"? Only lightly tested, so far. > > The top-level files are shared with binutils-gdb, which has a different > set of subdirs. Good point, thanks! Fortunately, the failure mode for non-existing directories is non-fatal (skipped with 'subdirectory [...] not present' diagnostic); with my original "Enable top-level recursive 'autoreconf'" (also re-attached) applied to Binutils/GDB Git master branch, we get: $ PATH=3D[...] autoreconf -v autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal autoreconf: configure.ac: tracing autoreconf: configure.ac: subdirectory c++tools not present autoreconf: configure.ac: subdirectory fixincludes not present autoreconf: configure.ac: subdirectory gcc not present autoreconf: configure.ac: subdirectory gcc/m2 not present autoreconf: configure.ac: subdirectory gnattools not present autoreconf: configure.ac: subdirectory gotools not present autoreconf: configure.ac: adding subdirectory intl to autoreconf autoreconf: Entering directory `intl' [...] autoreconf: Leaving directory `intl' autoreconf: configure.ac: subdirectory libada not present autoreconf: configure.ac: subdirectory libatomic not present autoreconf: configure.ac: adding subdirectory libbacktrace to autorecon= f autoreconf: Entering directory `libbacktrace' [...] So we could (a) simply list *all* directories in the shared top-level 'configure.ac', or (b) configure GCC vs. other projrcts via a non-shared file ('m4_include([config/AC_CONFIG_SUBDIRS.m4])' or similar -- is there an established procedure for non-shared top-level files)? (I don't have a strong preference either way.) It's just GCC and Binutils/GDB, or are the top-level files also shared with additional projects? Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-Enable-top-level-recursive-autoreconf.patch" >From 43127e5643337ca407071ad93bccbc716024352e Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 19 Oct 2023 10:28:30 +0200 Subject: [PATCH] Enable top-level recursive 'autoreconf' * configure.ac: At end of file, instantiate 'AC_CONFIG_SUBDIRS' for all relevant directories. * configure: Regenerate. --- configure | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++- configure.ac | 36 ++++++++++++++++++ 2 files changed, 136 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 8fc163d36bd..fcb4d591334 100755 --- a/configure +++ b/configure @@ -584,7 +584,8 @@ PACKAGE_URL= ac_unique_file="move-if-change" enable_option_checking=no -ac_subst_vars='LTLIBOBJS +ac_subst_vars='subdirs +LTLIBOBJS LIBOBJS compare_exclusions stage2_werror_flag @@ -909,7 +910,37 @@ READELF_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET' - +ac_subdirs_all='c++tools +fixincludes +gcc +gcc/m2 +gnattools +gotools +intl +libada +libatomic +libbacktrace +libcc1 +libcody +libcpp +libdecnumber +libffi +libgcc +libgfortran +libgm2 +libgo +libgomp +libiberty +libitm +libobjc +libphobos +libquadmath +libsanitizer +libssp +libstdc++-v3 +libvtv +lto-plugin +zlib' # Initialize some variables set by options. ac_init_help= @@ -20081,3 +20112,70 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + +# Enable top-level recursive 'autoreconf' by enumerating all relevant +# directories here. This is intentionally done at end of 'configure.ac', +# *after* 'AC_OUTPUT', so that we don't attempt to prematurely 'configure' +# these directories when the top-level 'configure' is invoked. +subdirs="$subdirs c++tools" + +subdirs="$subdirs fixincludes" + +subdirs="$subdirs gcc" + +subdirs="$subdirs gcc/m2" + +subdirs="$subdirs gnattools" + +subdirs="$subdirs gotools" + +subdirs="$subdirs intl" + +subdirs="$subdirs libada" + +subdirs="$subdirs libatomic" + +subdirs="$subdirs libbacktrace" + +subdirs="$subdirs libcc1" + +subdirs="$subdirs libcody" + +subdirs="$subdirs libcpp" + +subdirs="$subdirs libdecnumber" + +subdirs="$subdirs libffi" + +subdirs="$subdirs libgcc" + +subdirs="$subdirs libgfortran" + +subdirs="$subdirs libgm2" + +subdirs="$subdirs libgo" + +subdirs="$subdirs libgomp" + +subdirs="$subdirs libiberty" + +subdirs="$subdirs libitm" + +subdirs="$subdirs libobjc" + +subdirs="$subdirs libphobos" + +subdirs="$subdirs libquadmath" + +subdirs="$subdirs libsanitizer" + +subdirs="$subdirs libssp" + +subdirs="$subdirs libstdc++-v3" + +subdirs="$subdirs libvtv" + +subdirs="$subdirs lto-plugin" + +subdirs="$subdirs zlib" + diff --git a/configure.ac b/configure.ac index 1d16530140a..0d37d30196e 100644 --- a/configure.ac +++ b/configure.ac @@ -3944,3 +3944,39 @@ AC_CONFIG_FILES([Makefile], extrasub_host="$extrasub_host" extrasub_target="$extrasub_target"]) AC_OUTPUT + +# Enable top-level recursive 'autoreconf' by enumerating all relevant +# directories here. This is intentionally done at end of 'configure.ac', +# *after* 'AC_OUTPUT', so that we don't attempt to prematurely 'configure' +# these directories when the top-level 'configure' is invoked. +AC_CONFIG_SUBDIRS([c++tools]) +AC_CONFIG_SUBDIRS([fixincludes]) +AC_CONFIG_SUBDIRS([gcc]) +AC_CONFIG_SUBDIRS([gcc/m2]) +AC_CONFIG_SUBDIRS([gnattools]) +AC_CONFIG_SUBDIRS([gotools]) +AC_CONFIG_SUBDIRS([intl]) +AC_CONFIG_SUBDIRS([libada]) +AC_CONFIG_SUBDIRS([libatomic]) +AC_CONFIG_SUBDIRS([libbacktrace]) +AC_CONFIG_SUBDIRS([libcc1]) +AC_CONFIG_SUBDIRS([libcody]) +AC_CONFIG_SUBDIRS([libcpp]) +AC_CONFIG_SUBDIRS([libdecnumber]) +AC_CONFIG_SUBDIRS([libffi]) +AC_CONFIG_SUBDIRS([libgcc]) +AC_CONFIG_SUBDIRS([libgfortran]) +AC_CONFIG_SUBDIRS([libgm2]) +AC_CONFIG_SUBDIRS([libgo]) +AC_CONFIG_SUBDIRS([libgomp]) +AC_CONFIG_SUBDIRS([libiberty]) +AC_CONFIG_SUBDIRS([libitm]) +AC_CONFIG_SUBDIRS([libobjc]) +AC_CONFIG_SUBDIRS([libphobos]) +AC_CONFIG_SUBDIRS([libquadmath]) +AC_CONFIG_SUBDIRS([libsanitizer]) +AC_CONFIG_SUBDIRS([libssp]) +AC_CONFIG_SUBDIRS([libstdc++-v3]) +AC_CONFIG_SUBDIRS([libvtv]) +AC_CONFIG_SUBDIRS([lto-plugin]) +AC_CONFIG_SUBDIRS([zlib]) -- 2.34.1 --=-=-=--