public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] limits.h, syslimits.h: do not install to include-fixed
@ 2022-05-09  9:02 Martin Liška
  2022-05-24 12:06 ` Martin Liška
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2022-05-09  9:02 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jakub Jelinek

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(-)

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 ; \
-- 
2.36.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] limits.h, syslimits.h: do not install to include-fixed
  2022-05-09  9:02 [PATCH] limits.h, syslimits.h: do not install to include-fixed Martin Liška
@ 2022-05-24 12:06 ` Martin Liška
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Liška @ 2022-05-24 12:06 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jakub Jelinek

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-24 12:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09  9:02 [PATCH] limits.h, syslimits.h: do not install to include-fixed Martin Liška
2022-05-24 12:06 ` Martin Liška

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).