From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 2358C3858427; Wed, 31 Aug 2022 20:02:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2358C3858427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661976134; bh=xYn0V5ufHjRvLX6PkGTL01bKEotVL2DJATZSZbc+c0s=; h=From:To:Subject:Date:From; b=c/VefvbB6JB0EHWbY2xBDMFe6TlG996GaZpfc1QNVhF7biF1X2y02rZIz+/HJxBMw O/F2GiRfVut3tHFHAmtAuGpw/MfCq0fSC1NaqOKWtS2pvN/QYWiJGpqmiWH//jm7mD /SuEPLrZ3G9u12S0g0xKI28Gt0Zw4t84Rh18XV3A= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2319] Support --disable-fixincludes. X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/master X-Git-Oldrev: 5f932c9f93c45440a7baf7d9059d3b33a0f2d2db X-Git-Newrev: be9dd80f9334800300a80268dbb92cf3fafcfcf8 Message-Id: <20220831200214.2358C3858427@sourceware.org> Date: Wed, 31 Aug 2022 20:02:14 +0000 (GMT) List-Id: https://gcc.gnu.org/g:be9dd80f9334800300a80268dbb92cf3fafcfcf8 commit r13-2319-gbe9dd80f9334800300a80268dbb92cf3fafcfcf8 Author: Martin Liska Date: Wed Aug 31 21:55:45 2022 +0200 Support --disable-fixincludes. Always install limits.h and syslimits.h header files to include folder. When --disable-fixincludes is used, then no system 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. Diff: --- gcc/Makefile.in | 30 +++++++++++++----------------- gcc/configure | 10 ++++++++-- gcc/configure.ac | 6 ++++++ 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 203f0a15187..034f4677fe2 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3166,24 +3166,27 @@ 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 - cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README - chmod a+r include-fixed/README + if [ x$(STMP_FIXINC) != x ]; then \ + rm -f include-fixed/README; \ + cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README; \ + chmod a+r include-fixed/README; \ + fi; $(STAMP) $@ .PHONY: install-gcc-tooldir @@ -3268,13 +3271,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 @@ -3992,7 +3988,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 80498e68e36..5c0367c0e04 100755 --- a/gcc/configure +++ b/gcc/configure @@ -13577,6 +13577,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= @@ -19703,7 +19709,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19706 "configure" +#line 19712 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19809,7 +19815,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19812 "configure" +#line 19818 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 819b490d1b6..31ec7d9d38b 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2510,6 +2510,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=