From patchwork Tue May 24 12:05:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 54340 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A5AE382CC9F for ; Tue, 24 May 2022 12:06:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id CF41638312B4 for ; Tue, 24 May 2022 12:05:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CF41638312B4 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F33FF1F8D6; Tue, 24 May 2022 12:05:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1653393936; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KdnZlJHkAoslUH5gfC20YP0zPxVyu6VwFV1F4CzjVOQ=; b=edpQMzedjb35BWIygLa+eeCjn2CZf6BIKbRqc5/DarCk7tiORh5wnAAxRkojdOM/mQE21G Q6o8NjB/+PLxZQU5Wwx4EGFiLq6RIezKyzexD+PGdb5/x4kM6EcyK2l21+Eg69W977HZk/ A71hzDLYJ6gblnbowjkji7tup/1CFZM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1653393936; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KdnZlJHkAoslUH5gfC20YP0zPxVyu6VwFV1F4CzjVOQ=; b=aj4ZxjqKkxlhRptOMloPir1Yigz+XNx7Cm4MWja5Z5wXc0lNNchhUWiyKpYvfxyB0wGFL+ 64sLqMRZ669MGJAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D7CF613ADF; Tue, 24 May 2022 12:05:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id I9SiMw/KjGLsTwAAMHmgww (envelope-from ); Tue, 24 May 2022 12:05:35 +0000 Message-ID: Date: Tue, 24 May 2022 14:05:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: [PATCH v2] Support --disable-fixincludes. Content-Language: en-US To: Alexandre Oliva References: <2e2c7061-3f3f-fde4-6e8c-d2118820a5b6@suse.cz> <87pmkkutdz.fsf@igel.home> From: =?utf-8?q?Martin_Li=C5=A1ka?= In-Reply-To: X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gcc-patches@gcc.gnu.org, Andreas Schwab , Joseph Myers Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" On 5/20/22 14:42, Alexandre Oliva wrote: > On May 11, 2022, Martin Liška wrote: > >> Ready to be installed? > > Hmm... I don't like that --disable-fixincludes would still configure, > build and even install fixincludes. This would be surprising, given > that the semantics of disabling a component is to not even configure it. > > How about leaving the top-level alone, and changing gcc/configure.ac to > clear STMP_FIXINC when --disable-fixincludes is given? > Sure, that's a good idea. Allways install limits.h and syslimits.h header files to include folder. When --disable-fixincludes is used, then no systen header files are fixed by the tools in fixincludes. Moreover, the fixincludes tools are not built any longer. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin From ba9bed4512d73d34d4c9bf5830e758097d517bc3 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 24 May 2022 13:06:07 +0200 Subject: [PATCH] Support --disable-fixincludes. Allways install limits.h and syslimits.h header files to include folder. When --disable-fixincludes is used, then no systen header files are fixed by the tools in fixincludes. Moreover, the fixincludes tools are not built any longer. gcc/ChangeLog: * Makefile.in: Always install limits.h and syslimits.h to include folder. * configure.ac: Assign STMP_FIXINC blank if --disable-fixincludes is used. * configure: Regenerate. --- gcc/Makefile.in | 22 ++++++++-------------- gcc/configure | 10 ++++++++-- gcc/configure.ac | 6 ++++++ 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 97e5450ecb5..3ab8e36e1ed 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3153,19 +3153,20 @@ stmp-int-hdrs: $(STMP_FIXINC) $(T_GLIMITS_H) $(T_STDINT_GCC_H) $(USER_H) fixinc_ set -e; for ml in `cat fixinc_list`; do \ sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \ multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \ - fix_dir=include-fixed$${multi_dir}; \ + include_dir=include$${multi_dir}; \ if $(LIMITS_H_TEST) ; then \ cat $(srcdir)/limitx.h $(T_GLIMITS_H) $(srcdir)/limity.h > tmp-xlimits.h; \ else \ cat $(T_GLIMITS_H) > tmp-xlimits.h; \ fi; \ - $(mkinstalldirs) $${fix_dir}; \ - chmod a+rx $${fix_dir} || true; \ + $(mkinstalldirs) $${include_dir}; \ + chmod a+rx $${include_dir} || true; \ $(SHELL) $(srcdir)/../move-if-change \ tmp-xlimits.h tmp-limits.h; \ - rm -f $${fix_dir}/limits.h; \ - cp -p tmp-limits.h $${fix_dir}/limits.h; \ - chmod a+r $${fix_dir}/limits.h; \ + rm -f $${include_dir}/limits.h; \ + cp -p tmp-limits.h $${include_dir}/limits.h; \ + chmod a+r $${include_dir}/limits.h; \ + cp $(srcdir)/gsyslimits.h $${include_dir}/syslimits.h; \ done # Install the README rm -f include-fixed/README @@ -3255,13 +3256,6 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \ cd $(build_objdir)/fixincludes && \ $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \ $(BUILD_SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \ - rm -f $${fix_dir}/syslimits.h; \ - if [ -f $${fix_dir}/limits.h ]; then \ - mv $${fix_dir}/limits.h $${fix_dir}/syslimits.h; \ - else \ - cp $(srcdir)/gsyslimits.h $${fix_dir}/syslimits.h; \ - fi; \ - chmod a+r $${fix_dir}/syslimits.h; \ done; \ fi $(STAMP) stmp-fixinc @@ -3979,7 +3973,7 @@ install-mkheaders: stmp-int-hdrs install-itoolsdirs \ set -e; for ml in `cat fixinc_list`; do \ multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \ $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include$${multi_dir}; \ - $(INSTALL_DATA) include-fixed$${multi_dir}/limits.h $(DESTDIR)$(itoolsdatadir)/include$${multi_dir}/limits.h; \ + $(INSTALL_DATA) include$${multi_dir}/limits.h $(DESTDIR)$(itoolsdatadir)/include$${multi_dir}/limits.h; \ done $(INSTALL_SCRIPT) $(srcdir)/../mkinstalldirs \ $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \ diff --git a/gcc/configure b/gcc/configure index 37e0dd5e414..711e8e9b559 100755 --- a/gcc/configure +++ b/gcc/configure @@ -13548,6 +13548,12 @@ then BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' fi + +if test x$enable_fixincludes = xno; +then + STMP_FIXINC='' +fi + # Expand extra_headers to include complete path. # This substitutes for lots of t-* files. extra_headers_list= @@ -19674,7 +19680,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19676 "configure" +#line 19683 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19780,7 +19786,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19782 "configure" +#line 19789 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 23bee7010a3..8a2dd5a193a 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2501,6 +2501,12 @@ then BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' fi + +if test x$enable_fixincludes = xno; +then + STMP_FIXINC='' +fi + # Expand extra_headers to include complete path. # This substitutes for lots of t-* files. extra_headers_list= -- 2.36.1