limits.h, syslimits.h: do not install to include-fixed

Message ID df0d627c-605f-9646-9b17-c17d90773939@suse.cz
State New
Headers
Series limits.h, syslimits.h: do not install to include-fixed |

Commit Message

Martin Liška May 9, 2022, 9:02 a.m. UTC
  Hi.

The header files limits.h are syslimits.h are not a product of fix-includes,
so let's install it to a proper include location.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

	* Makefile.in: Install limits.h, syslimits.h to includes
	and not include-fixed.
---
 gcc/Makefile.in | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)
  

Comments

Martin Liška May 24, 2022, 12:06 p.m. UTC | #1
On 5/9/22 11:02, Martin Liška wrote:
> |Ready to be installed?|

This patch should be replaced with:
https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595495.html

Martin
  

Patch

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 31ff95500c9..10abb29fa59 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3151,19 +3151,19 @@  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; \
 	done
 # Install the README
 	rm -f include-fixed/README
@@ -3229,6 +3229,9 @@  stmp-fixinc: gsyslimits.h macro_list fixinc_list \
 	rm -rf include-fixed; mkdir include-fixed
 	-chmod a+rx include-fixed
 	if [ -d ../prev-gcc ]; then \
+	  mkdir `pwd`/../gcc/include && \
+	  cp ../prev-gcc/include/limits.h `pwd`/../gcc/include && \
+	  cp ../prev-gcc/include/syslimits.h `pwd`/../gcc/include && \
 	  cd ../prev-gcc && \
 	  $(MAKE) real-$(INSTALL_HEADERS_DIR) DESTDIR=`pwd`/../gcc/ \
 	    libsubdir=. ; \
@@ -3237,6 +3240,7 @@  stmp-fixinc: gsyslimits.h macro_list fixinc_list \
 	    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 ! $(inhibit_libc) && test ! -d ${BUILD_SYSTEM_HEADER_DIR}; then \
 	      echo The directory that should contain system headers does not exist: >&2 ; \
 	      echo "  ${BUILD_SYSTEM_HEADER_DIR}" >&2 ; \
@@ -3253,13 +3257,15 @@  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; \
+	    $(mkinstalldirs) $${include_dir}; \
+	    chmod a+rx $${include_dir} || true; \
+	    rm -f $${include_dir}/syslimits.h; \
+	    if [ -f $${include_dir}/limits.h ]; then \
+	      mv $${include_dir}/limits.h $${include_dir}/syslimits.h; \
 	    else \
-	      cp $(srcdir)/gsyslimits.h $${fix_dir}/syslimits.h; \
+	      cp $(srcdir)/gsyslimits.h $${include_dir}/syslimits.h; \
 	    fi; \
-	    chmod a+r $${fix_dir}/syslimits.h; \
+	    chmod a+r $${include_dir}/syslimits.h; \
 	  done; \
 	fi
 	$(STAMP) stmp-fixinc
@@ -3977,7 +3983,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 ; \