From da888c87a615085d0d9608416816da63e734024e Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <bonzini@gnu.org>
Date: Wed, 30 Jul 2008 15:03:57 +0000
Subject: [PATCH] 2008-07-30 Paolo Bonzini  <bonzini@gnu.org>

	Sync with gcc:
	2008-07-30 Paolo Bonzini  <bonzini@gnu.org>

        * configure.ac: Add makefile fragments for hpux.
        * Makefile.def (flags_to_pass): Add ADA_CFLAGS.
        * Makefile.tpl (HOST_EXPORTS): Pass ADA_CFLAGS.
        * configure: Regenerate.
        * Makefile.in: Regenerate.

	2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * Makefile.tpl ($(srcdir)/configure): Update dependencies.
        * Makefile.in: Regenerate.
        * configure: Regenerate.

config:
2008-07-30  Paolo Bonzini  <bonzini@gnu.org>

	* mh-pa: New, from gcc/config/pa/x-ada.
	* mh-pa-hpux10: New, from gcc/config/pa/x-ada-hpux10.

2008-06-11  Bernhard Fischer  <aldot@gcc.gnu.org>

        * tls.m4: Fix typos.
---
 ChangeLog           | 17 +++++++++++++++++
 Makefile.def        |  1 +
 Makefile.in         |  5 ++++-
 Makefile.tpl        |  4 +++-
 config/ChangeLog    | 11 ++++++++++-
 config/mh-pa        |  4 ++++
 config/mh-pa-hpux10 |  4 ++++
 config/tls.m4       |  2 +-
 configure           | 12 ++++++++++--
 configure.ac        | 12 ++++++++++--
 10 files changed, 64 insertions(+), 8 deletions(-)
 create mode 100644 config/mh-pa
 create mode 100644 config/mh-pa-hpux10

diff --git a/ChangeLog b/ChangeLog
index a40be7e3c00..d20819b67a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2008-07-30 Paolo Bonzini  <bonzini@gnu.org>
+
+	Sync with gcc:
+	2008-07-30 Paolo Bonzini  <bonzini@gnu.org>
+
+        * configure.ac: Add makefile fragments for hpux.
+        * Makefile.def (flags_to_pass): Add ADA_CFLAGS.
+        * Makefile.tpl (HOST_EXPORTS): Pass ADA_CFLAGS.
+        * configure: Regenerate.
+        * Makefile.in: Regenerate.
+
+	2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+        * Makefile.tpl ($(srcdir)/configure): Update dependencies.
+        * Makefile.in: Regenerate.
+        * configure: Regenerate.
+
 2008-06-18  Ian Lance Taylor  <iant@google.com>
 
 	* src-release (BINUTILS_SUPPORT_DIRS): Remove mkdep and depcomp.
diff --git a/Makefile.def b/Makefile.def
index 3924617ebd3..832fc4236e9 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -226,6 +226,7 @@ flags_to_pass = { flag= YACC ; };
 
 // Host tools
 flags_to_pass = { flag= ADAFLAGS ; optional=true ; };
+flags_to_pass = { flag= ADA_CFLAGS ; };
 flags_to_pass = { flag= AR_FLAGS ; };
 flags_to_pass = { flag= BOOT_ADAFLAGS ; optional=true ; };
 flags_to_pass = { flag= BOOT_CFLAGS ; };
diff --git a/Makefile.in b/Makefile.in
index 8a43024ccae..d9ef0681497 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -164,6 +164,7 @@ HOST_SUBDIR = @host_subdir@
 HOST_EXPORTS = \
 	$(BASE_EXPORTS) \
 	CC="$(CC)"; export CC; \
+	ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
 	CFLAGS="$(CFLAGS)"; export CFLAGS; \
 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
 	CXX="$(CXX)"; export CXX; \
@@ -514,6 +515,7 @@ BASE_FLAGS_TO_PASS = \
 	"SHELL=$(SHELL)" \
 	"YACC=$(YACC)" \
 	"`echo 'ADAFLAGS=$(ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
+	"ADA_CFLAGS=$(ADA_CFLAGS)" \
 	"AR_FLAGS=$(AR_FLAGS)" \
 	"`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
 	"BOOT_CFLAGS=$(BOOT_CFLAGS)" \
@@ -53606,7 +53608,8 @@ config.status: configure
 
 # Rebuilding configure.
 AUTOCONF = autoconf
-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \
+	$(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4
 	cd $(srcdir) && $(AUTOCONF)
 
 # ------------------------------
diff --git a/Makefile.tpl b/Makefile.tpl
index 9c72014295d..1f0c318012f 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -167,6 +167,7 @@ HOST_SUBDIR = @host_subdir@
 HOST_EXPORTS = \
 	$(BASE_EXPORTS) \
 	CC="$(CC)"; export CC; \
+	ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
 	CFLAGS="$(CFLAGS)"; export CFLAGS; \
 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
 	CXX="$(CXX)"; export CXX; \
@@ -1650,7 +1651,8 @@ config.status: configure
 
 # Rebuilding configure.
 AUTOCONF = autoconf
-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \
+	$(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4
 	cd $(srcdir) && $(AUTOCONF)
 
 # ------------------------------
diff --git a/config/ChangeLog b/config/ChangeLog
index 0ec955dce15..a35fe14673c 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-30  Paolo Bonzini  <bonzini@gnu.org>
+
+	* mh-pa: New, from gcc/config/pa/x-ada.
+	* mh-pa-hpux10: New, from gcc/config/pa/x-ada-hpux10.
+
 2008-07-25  Keith Seitz  <keiths@redhat.com>
 
 	* acinclude.m4: Remove libide, libgui, and all the other Tcl
@@ -21,10 +26,14 @@
 	version _GCC_AUTOCONF_VERSION throughout the tree.
 	(m4_wrap): New override, fix for Posix semantics of m4wrap.
 
+2008-06-11  Bernhard Fischer  <aldot@gcc.gnu.org>
+
+	* tls.m4: Fix typos.
+
 2008-06-08  Joseph Myers  <joseph@codesourcery.com>
 
 	PR tree-optimization/36218
-	* config/mh-mingw (LDFLAGS): Define.
+	* mh-mingw (LDFLAGS): Define.
 
 2008-06-05  Danny Smith  <dannysmith@users.sourceforge.net>
 
diff --git a/config/mh-pa b/config/mh-pa
new file mode 100644
index 00000000000..b0005a25d4d
--- /dev/null
+++ b/config/mh-pa
@@ -0,0 +1,4 @@
+# The ada virtual array implementation requires that indexing be disabled on
+# hosts such as hpux that use a segmented memory architecture.  Both the c
+# and ada files need to be compiled with this option for correct operation.
+ADA_CFLAGS = -mdisable-indexing
diff --git a/config/mh-pa-hpux10 b/config/mh-pa-hpux10
new file mode 100644
index 00000000000..99a2278f281
--- /dev/null
+++ b/config/mh-pa-hpux10
@@ -0,0 +1,4 @@
+# The ada virtual array implementation requires that indexing be disabled on
+# hosts such as hpux that use a segmented memory architecture.  Both the c
+# and ada files need to be compiled with this option for correct operation.
+ADA_CFLAGS = -mdisable-indexing -D_X_HPUX10
diff --git a/config/tls.m4 b/config/tls.m4
index b6c4c4a6a7d..acb123f6986 100644
--- a/config/tls.m4
+++ b/config/tls.m4
@@ -77,7 +77,7 @@ AC_DEFUN([GCC_CHECK_TLS], [
 dnl Check whether the target assembler supports TLS.
 AC_DEFUN([GCC_CHECK_CC_TLS], [
   GCC_ENABLE(tls, yes, [], [Use thread-local storage])
-  AC_CACHE_CHECK([whether the target asssembler upports thread-local storage],
+  AC_CACHE_CHECK([whether the target assembler supports thread-local storage],
 		 gcc_cv_have_cc_tls, [
     AC_COMPILE_IFELSE([__thread int a; int b; int main() { return a = b; }],
       [gcc_cv_have_cc_tls=yes], [gcc_cv_have_cc_tls=no])]
diff --git a/configure b/configure
index 1c190078943..797cfcf5562 100755
--- a/configure
+++ b/configure
@@ -2844,10 +2844,18 @@ fi
     # without overflowing the jump tables (-J says to use a 32 bit table)
     tentative_cc="cc -J"
     ;;
-  *-hp-hpux*)
+  hppa*-hp-hpux10*)
     tentative_cc="cc -Wp,-H256000"
+    host_makefile_frag="config/mh-pa-hpux10"
     ;;
-  *-*-hiux*)
+  hppa*-hp-hpux* | hppa*-*-hiux*)
+    tentative_cc="cc -Wp,-H256000"
+    host_makefile_frag="config/mh-pa"
+    ;;
+  hppa*-*)
+    host_makefile_frag="config/mh-pa"
+    ;;
+  *-hp-hpux* | *-*-hiux*)
     tentative_cc="cc -Wp,-H256000"
     ;;
   rs6000-*-lynxos*)
diff --git a/configure.ac b/configure.ac
index b7fb222298d..dc9ffacf7c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1067,10 +1067,18 @@ case "${host}" in
     # without overflowing the jump tables (-J says to use a 32 bit table)
     tentative_cc="cc -J"
     ;;
-  *-hp-hpux*)
+  hppa*-hp-hpux10*)
     tentative_cc="cc -Wp,-H256000"
+    host_makefile_frag="config/mh-pa-hpux10"
     ;;
-  *-*-hiux*)
+  hppa*-hp-hpux* | hppa*-*-hiux*)
+    tentative_cc="cc -Wp,-H256000"
+    host_makefile_frag="config/mh-pa"
+    ;;
+  hppa*-*)	
+    host_makefile_frag="config/mh-pa"
+    ;;
+  *-hp-hpux* | *-*-hiux*)
     tentative_cc="cc -Wp,-H256000"
     ;;
   rs6000-*-lynxos*)
-- 
GitLab