[Ada] Add support for XDR streaming in the default runtime

Message ID 20200707092736.GA41530@adacore.com
State New
Headers show
Series
  • [Ada] Add support for XDR streaming in the default runtime
Related show

Commit Message

Pierre-Marie de Rodat July 7, 2020, 9:27 a.m.
Since we no longer need to distribute s-stratt__xdr.adb, some code in
Makefile.rtl is now dead. Update the GNAT UG accordingly.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* Makefile.rtl: Remove dead code.
	* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
	Document gnatbind -xdr switch.
	* gnat_ugn.texi: Regenerate.

Patch

diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -2704,10 +2704,7 @@  setup-rts: force
 	$(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
 	                $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
 	for f in $(RTSDIR)/*-*__*.ads $(RTSDIR)/*-*__*.adb; do \
-	  case "$$f" in \
-	    $(RTSDIR)/s-stratt__*) ;; \
-	    *) $(RM) $$f ;; \
-	  esac; \
+	  $(RM) $$f ; \
 	done
 # Copy new target dependent sources
 	$(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \


diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
--- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
+++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
@@ -6711,6 +6711,14 @@  be presented in subsequent sections.
   Exclude source files (check object consistency only).
 
 
+  .. index:: -xdr  (gnatbind)
+
+:switch:`-xdr`
+  Use the target-independent XDR protocol for stream oriented attributes
+  instead of the default implementation which is based on direct binary
+  representations and is therefore target-and endianness-dependent.
+
+
   .. index:: -Xnnn  (gnatbind)
 
 :switch:`-X{nnn}`


diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -16142,6 +16142,14 @@  Override default wide character encoding for standard Text_IO files.
 
 Exclude source files (check object consistency only).
 
+@geindex -xdr (gnatbind)
+
+@item @code{-xdr}
+
+Use the target-independent XDR protocol for stream oriented attributes
+instead of the default implementation which is based on direct binary
+representations and is therefore target-and endianness-dependent.
+
 @geindex -Xnnn (gnatbind)
 
 @item @code{-X@emph{nnn}}