From 717b8f50b4eec158500c99e4082f97471b9a21f3 Mon Sep 17 00:00:00 2001
From: daney <daney@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 21 Jul 2006 20:49:06 +0000
Subject: [PATCH] libstdc++-v3/ 	PR libgcj/28426 	* acinclude.m4: Added
 a comment. config/ 	PR libgcj/28426 	* gxx-include-dir.m4: Use
 target_alias in path for cross build. libjava/ 	PR libgcj/28426 
 * configure: Regenerated.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115650 138bc75d-0d04-0410-961f-82ee72b054a4
---
 config/ChangeLog          | 5 +++++
 config/gxx-include-dir.m4 | 8 +++++++-
 libjava/ChangeLog         | 5 +++++
 libjava/configure         | 8 +++++++-
 libstdc++-v3/ChangeLog    | 5 +++++
 libstdc++-v3/acinclude.m4 | 1 +
 6 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/config/ChangeLog b/config/ChangeLog
index 7aaf7cae36a0..46070e8c3c99 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-21  David Daney  <ddaney@avtrex.com>
+
+	PR libgcj/28426
+	* gxx-include-dir.m4: Use target_alias in path for cross build.
+
 2006-07-18  Paolo Bonzini  <bonzini@gnu.org>
 
         * acx.m4: Support --with-build-libsubdir and AC_SUBST
diff --git a/config/gxx-include-dir.m4 b/config/gxx-include-dir.m4
index 0e6e4ffc3975..4f54d427f7e2 100644
--- a/config/gxx-include-dir.m4
+++ b/config/gxx-include-dir.m4
@@ -17,7 +17,13 @@ case "${with_gxx_include_dir}" in
       yes) gxx_include_dir='$(libsubdir)/include/c++' ;;
       *)
 	libstdcxx_incdir='c++/$(gcc_version)'
-	gxx_include_dir='$(prefix)/include/$(libstdcxx_incdir)' ;;
+	gxx_include_dir='include/$(libstdcxx_incdir)'
+	if test -n "$with_cross_host" && 
+           test x"$with_cross_host" != x"no"; then	
+          gxx_include_dir='${prefix}/${target_alias}/'"$gxx_include_dir"
+        else
+          gxx_include_dir='${prefix}/'"$gxx_include_dir"
+        fi;;
     esac ;;
   *) gxx_include_dir=${with_gxx_include_dir} ;;
 esac
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index e793eea2397d..de6066846703 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-21  David Daney  <ddaney@avtrex.com>
+
+	PR libgcj/28426
+	* configure: Regenerated.
+
 2006-07-21  Mark Wielaard  <mark@klomp.org>
 
 	* java/io/OutputStreamWriter.java (flush): Create work if null.
diff --git a/libjava/configure b/libjava/configure
index abdda6d87f82..c2c5ddc8e61a 100755
--- a/libjava/configure
+++ b/libjava/configure
@@ -15055,7 +15055,13 @@ echo "$as_me: error: --with-gxx-include-dir=[dir] requires a directory" >&2;}
       yes) gxx_include_dir='$(libsubdir)/include/c++' ;;
       *)
 	libstdcxx_incdir='c++/$(gcc_version)'
-	gxx_include_dir='$(prefix)/include/$(libstdcxx_incdir)' ;;
+	gxx_include_dir='include/$(libstdcxx_incdir)'
+	if test -n "$with_cross_host" &&
+           test x"$with_cross_host" != x"no"; then
+          gxx_include_dir='${prefix}/${target_alias}/'"$gxx_include_dir"
+        else
+          gxx_include_dir='${prefix}/'"$gxx_include_dir"
+        fi;;
     esac ;;
   *) gxx_include_dir=${with_gxx_include_dir} ;;
 esac
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index ce07b45e897c..b16d571d3ace 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-21  David Daney  <ddaney@avtrex.com>
+
+	PR libgcj/28426
+	* acinclude.m4: Added a comment.
+
 2006-07-20  Benjamin Kosnik  <bkoz@redhat.com>
 	    Jakub Jelinek  <jakub@redhat.com>
 	
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index a15e351fc0ce..e5020593598f 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -675,6 +675,7 @@ dnl Assumes cross_compiling bits already done, and with_cross_host in
 dnl particular.
 dnl
 dnl This logic must match gcc/configure.ac's setting of gcc_gxx_include_dir.
+dnl config/gxx-include-dir.m4 must be kept consistant with this as well.
 AC_DEFUN([GLIBCXX_EXPORT_INSTALL_INFO], [
   glibcxx_toolexecdir=no
   glibcxx_toolexeclibdir=no
-- 
GitLab