From patchwork Thu Oct 19 09:30:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 155406 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp260517vqb; Thu, 19 Oct 2023 02:30:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjGs0PVXYFcRdsu4iXFXhHuK5LkDoPjV4H7X3jPN+Lwutf+MJTiPHZELUGSRRsk1iQdQP5 X-Received: by 2002:ac8:5842:0:b0:41c:c2db:2180 with SMTP id h2-20020ac85842000000b0041cc2db2180mr1766957qth.57.1697707843682; Thu, 19 Oct 2023 02:30:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697707843; cv=pass; d=google.com; s=arc-20160816; b=0mhwKZoAE95syT1R90qkHsS7eZI28YPSkNezsuAwMSu3KEprZG0vUE3F6SM97Npym5 LlTObjW5PLZ5L5FnVKRy1YrH17j0L7nt0M1CujvGCGnq4BA1AC0iiPCkDRjgj6TsxUoG qgPkF+il8BOgGndCyup9T/bxv04dfssPTP2t3JwvwTgjVk71P7rfDlyNUHXw2gCFmhgK z3q/DBj1fjxgDb8WiH1XiMRpZ1RTP7FxabyFliakA+JHAjLGp7c0V9non46TcFimxZb3 FsXxVLm8hFEfscUIkZPj8HINJf/rTsUfc1E8lFG/hg9Yk1GEXK/0Rv/rHqzaeQIuLjei DJAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:ironport-sdr :arc-filter:dmarc-filter:delivered-to; bh=p5XrE86NFikdSObaa/iyEiNIhgP+m1GCin+r2+lMPxM=; fh=jly4K/f8UWu34uvJIEfAQiZGyoaZOCsQC9ond6Ko/c0=; b=uYjFjJ9TgLYb5xW8XCwR7O8z7EdS/7NtALaZRIEBWo0ACGRzTbXJEj41L3WooSIq4j paVs+KiheqPhz0SMcoLj6b+e3LUJAEJMSE+u2jSnhUSQnsq4VndDfcABEfhjTxjtDBf6 0UH/pOGD8fJg9SNkauEQJ7uvS6OVTPb+/ol1w0GqTbFKoBdBviWmdyuqWVfihyjRmTke x3jnfyeW8PNMmphAKTN/7XrDQluATzBON1oLUeq1OkObRxAWALymzWj5O/hVpQA9/WNy mQiOJwAse44pGzh8tRrRPKdvMw4Bfm2Z2HeGanzPw8iKHq5i6iEFKUxfugcv0oHBVspO ySfA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s15-20020a05622a018f00b004180054f084si1264962qtw.74.2023.10.19.02.30.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 02:30:43 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 491BB3857736 for ; Thu, 19 Oct 2023 09:30:42 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id ED5AD3858D35; Thu, 19 Oct 2023 09:30:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ED5AD3858D35 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 ED5AD3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.180 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697707818; cv=none; b=Q3+b9cskfdg/FUI1l0RlO41WlPivZkB7AJiohGKkTFkDlkV2/3bYckK7wieVZ7WXtMwmv4z4aidUaoLLSNIvrB90oMWcKph/1dwCU4XH9fSIpGYFREoBOcIOa90ugfpcCXB2J27PUMckixaIb/rDOulE8VzBigGffTdkWB0s7cQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697707818; c=relaxed/simple; bh=wc0i07L6ZNQhvGAlq1lfwzss4ti+Cn/ccvA8YpC/vwI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=O6NU27x2COJTTo/zUKJ4a/p+MFHixpCmyZrZoahuMp7TTCLb0MFoM1XtxrCMZlxKYOsdK/vy8xEQkJ1uLy9+bmTKhxkE/R8S1OfqBWY7UvIUe9zNM1XzGEB+/LFpqm2jPAbomChegzzz+fkUx+Crt1aJnUfN8EV4JHMQ3M+TZhE= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: u92mZLizSnGcihO6XZCusQ== X-CSE-MsgGUID: I6XBPMS3SbyBsE9lXMXC9g== X-IronPort-AV: E=Sophos;i="6.03,236,1694764800"; d="scan'208,223";a="20097788" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 19 Oct 2023 01:30:14 -0800 IronPort-SDR: R2BVnQ09OnHo3ztrVo0RpkESxaln/3iZdUPo77Ou6t7tbUE89LdUrXoDOl7jaqpgUdlMyRuFii btmNuroSD0+dDSG4J0fbBTCnbqMnasUOgQ/hYNhwAOoqcudCRBRI7YIRazkZe097WLt1cOa1sv Se/hXauCZfRGL8J2vfcQqFUDoCr3pfIGZPBX5qVka7idYKOReaHrMNwzRqefpwjzPV4qGrKiRJ 86JJFpcZbVvSNIcccX392fGAbgpROHHVAArWy5Uy2oTfpgrjfkuJtfAnSwzMFVKUawTueoGEna CTk= From: Thomas Schwinge To: <3246251196ryan@gmail.com>, CC: Iain Sandoe , , Paolo Bonzini , Nathanael Nerode , Alexandre Oliva , Ralf Wildenhues , "Joseph Myers" Subject: Enable top-level recursive 'autoreconf' (was: Hints on reconfiguring GCC) In-Reply-To: References: <4BD76988-F7CE-4AD1-8802-BAE371D1F9F5@sandoe.co.uk> <875y343xah.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 11:30:08 +0200 Message-ID: <87v8b37ye7.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780175699831016939 X-GMAIL-MSGID: 1780175699831016939 Hi! 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 configuring > GCC. e.g. AC_SUBDIRS in the top level? ('AC_CONFIG_SUBDIRS' you mean.) You know, often it just takes someone to ask the right questions... ;-) What do people think about the attached "Enable top-level recursive 'autoreconf'"? Only lightly tested, so far. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 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