From patchwork Fri Oct 25 11:14:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 1184049 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-511746-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ZPKaFk8w"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4701jm3nPqz9sPZ for ; Fri, 25 Oct 2019 22:15:07 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=H0de9CYfnE+MXK2dHbmgoUWG60PcSGsz0Uucc5BZheoYrU6ASL I+fUO8jc9bQNcN0NGx4Q5hWBnIQu4YrqFoMVXDzDyeEZrgS3zeVYaSNq+wTrgP8I vKp+UJ3Z4kNfL6rBFPebBF69LP0QVty8Q52agoTi6ZKGzmlSA88RSY1Wg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=vw4JjsWG3FxwIxuOn3oJi1bjMTs=; b=ZPKaFk8w9I8Pl2VKbq4f SHb+4bTycxNkguspjY0KAVTUIrtdw0HUHBSVa3Rktk2cx0nicuCNfhfU6rxap6Ow X9j52zZWBjaBYreSCVepdwhdSJ99dxd68blhFO5M8fb+TjP43OskZ7BEFUEOFP2u SdUtOw/Ls0mlI4vRItMvTzA= Received: (qmail 35565 invoked by alias); 25 Oct 2019 11:14:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 35546 invoked by uid 89); 25 Oct 2019 11:14:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LINEPADDING, KAM_SHORT autolearn=ham version=3.3.1 spammy=Leaving, regenerated, HTo:D*gmx.de, HTo:U*neroden X-HELO: esa3.mentor.iphmx.com Received: from esa3.mentor.iphmx.com (HELO esa3.mentor.iphmx.com) (68.232.137.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Oct 2019 11:14:49 +0000 IronPort-SDR: RLmdraMkJAKCT7lhSDMJjOF7hZfmHfcsCiVYSkRk3CLEWAD1IQEcXxzZnTOafB+OvQnDfNNlCV 2bMgH5mZS6vKgugezhP89ks6TaksB1U9NeNwn3bxSbc1FWCHW0i9P+GRtW7uJgpk2xloma3Yra TSDOjq76xf8ETrBTtf1jKYQxFxI4iXpFNM9sT8CkXnkBrUNIJ81zJSySGpJwI0vZk5+1A8KJvl sW/JH4xVxgXMySAesbIckH4FBs+UIUjw8/ONJWH8fX6f1pJP8S7SJtpdWEfXDA4f5tL5oLnBHW pp0= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 25 Oct 2019 03:14:47 -0800 IronPort-SDR: hCVs4ckkjpTNMzr589+mat+76qoFF+t9IbWCIuQ2MRy4yQLS3gOtMDIv8qAI0cOLPHSidmjB2z Rl8SRTAa8W91i8m/1Qlq2eScQWShyW8x53mI7zLmCuSHZ4AXx/AjMoXiG5e++2F37LkMePjKKl GkGbnPhGlDsJbJSmQtVWOGxNTK5pjoLXpsV0+hX8Mo8LT84Ntv2Jo4H/GemQPbU0KWZ/yxAhNK 3FSai4uHXWCzDK6ragdneL0Tg6oDoqRQ62zi3joT3Bgf5Bzg8pJ+q8mnZHVx4ZjkeFqLEsTThf JFY= From: Thomas Schwinge To: , Paolo Bonzini , Nathanael Nerode , Alexandre Oliva , Ralf Wildenhues CC: Subject: [build] Properly track GCC language configure fragments User-Agent: Notmuch/0.29.1+93~g67ed7df (https://notmuchmail.org) Emacs/26.1 (x86_64-pc-linux-gnu) Date: Fri, 25 Oct 2019 13:14:29 +0200 Message-ID: <87pnilrsa2.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Hi! I'm aware that incremental builds aren't really supported, but during day-to-day development, they're still useful -- as long as they work. ;-) A recent change (adding '\$(srcdir)/cp/logic.cc' to 'gtfiles' in 'gcc/cp/config-lang.in') broke things: [...]/source-gcc/gcc/cp/logic.cc:907:25: fatal error: gt-cp-logic.h: No such file or directory compilation terminated. Makefile:1117: recipe for target 'cp/logic.o' failed make[2]: *** [cp/logic.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '[...]/build-gcc-offload-nvptx-none/gcc' Makefile:4336: recipe for target 'all-gcc' failed make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory '[...]/build-gcc-offload-nvptx-none' Makefile:936: recipe for target 'all' failed make: *** [all] Error 2 That's because the build machinery didn't notice the 'gcc/cp/config-lang.in' change, and thus files didn't get regenerated; 'gtfiles' are encoded in 'gcc/Makefile', and that's how/where the missing 'gt-cp-logic.h' would be generated. Please find attached a patch with rationale. OK to commit? If approving this patch, please respond with "Reviewed-by: NAME " so that your effort will be recorded in the commit log, see . Grüße Thomas From dae93e7c2ed195fb3d1d6c4ccf0ddb5ef54bf8ee Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 25 Oct 2019 12:37:05 +0200 Subject: [PATCH] [build] Properly track GCC language configure fragments The 'gcc/configure' script sources all 'gcc/*/config-lang.in' files, but fails to emit such dependency information into the build machinery. That means, currently, when something gets changed in a 'gcc/*/config-lang.in' file, this is not noticed, and doesn't propagate through the build machinery. Handling of configure fragments is modelled in the same way as it already exists for Makefile fragments. gcc/ * Makefile.in (LANG_CONFIGUREFRAGS): Define. (config.status): Use/depend on it. * configure.ac (all_lang_configurefrags): Track, 'AC_SUBST'. * configure: Regenerate. --- gcc/Makefile.in | 3 ++- gcc/configure | 10 +++++++--- gcc/configure.ac | 5 ++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index c82858fa93e..bec5d8cf431 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1122,6 +1122,7 @@ endif # Support for additional languages (other than C). # C can be supported this way too (leave for later). +LANG_CONFIGUREFRAGS = @all_lang_configurefrags@ LANG_MAKEFRAGS = @all_lang_makefrags@ # Used by gcc/jit/Make-lang.in @@ -1902,7 +1903,7 @@ cstamp-h: config.in config.status # Really, really stupid make features, such as SUN's KEEP_STATE, may force # a target to build even if it is up-to-date. So we must verify that # config.status does not exist before failing. -config.status: $(srcdir)/configure $(srcdir)/config.gcc +config.status: $(srcdir)/configure $(srcdir)/config.gcc $(LANG_CONFIGUREFRAGS) @if [ ! -f config.status ] ; then \ echo You must configure gcc. Look at http://gcc.gnu.org/install/ for details.; \ false; \ diff --git a/gcc/configure b/gcc/configure index 9de9ef85f24..84b3578fb2b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -701,6 +701,7 @@ build_exeext all_selected_languages all_languages all_lang_makefrags +all_lang_configurefrags all_gtfiles all_compilers srcdir @@ -18851,7 +18852,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18854 "configure" +#line 18855 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18957,7 +18958,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18960 "configure" +#line 18961 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -29824,7 +29825,8 @@ lang_tree_files= all_languages= all_compilers= all_outputs='Makefile' -# List of language makefile fragments. +# List of language configure and makefile fragments. +all_lang_configurefrags= all_lang_makefrags= # Additional files for gengtype all_gtfiles="$target_gtfiles" @@ -29910,6 +29912,7 @@ do esac $ok || continue + all_lang_configurefrags="$all_lang_configurefrags \$(srcdir)/$gcc_subdir/config-lang.in" all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in" if test -f $srcdir/$gcc_subdir/lang.opt; then lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt" @@ -30061,6 +30064,7 @@ fi + diff --git a/gcc/configure.ac b/gcc/configure.ac index 62f4b2651cc..f89bb43d19c 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -6284,7 +6284,8 @@ lang_tree_files= all_languages= all_compilers= all_outputs='Makefile' -# List of language makefile fragments. +# List of language configure and makefile fragments. +all_lang_configurefrags= all_lang_makefrags= # Additional files for gengtype all_gtfiles="$target_gtfiles" @@ -6372,6 +6373,7 @@ changequote([,])dnl esac $ok || continue + all_lang_configurefrags="$all_lang_configurefrags \$(srcdir)/$gcc_subdir/config-lang.in" all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in" if test -f $srcdir/$gcc_subdir/lang.opt; then lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt" @@ -6479,6 +6481,7 @@ AC_SUBST(subdirs) AC_SUBST(srcdir) AC_SUBST(all_compilers) AC_SUBST(all_gtfiles) +AC_SUBST(all_lang_configurefrags) AC_SUBST(all_lang_makefrags) AC_SUBST(all_languages) AC_SUBST(all_selected_languages) -- 2.17.1