From 6e5b2331d0a6dc0b1e39672c2c7717219277711f Mon Sep 17 00:00:00 2001
From: Christian Wiese <christian.wiese@securepoint.de>
Date: Wed, 24 Mar 2010 12:38:43 +0100
Subject: [PATCH] gcc: replaced and renamed patch which assures that we do not
 run the 'fixinc.sh' script

Note:

The fixincludes script attempts to "fix" the system headers installed so far.
Since GCC is cross-compiled expecting the system headers to be in
/usr/include, the script will be looking at the host system's headers.
---
 base/gcc/fixincl.patch        | 27 ---------------------------
 base/gcc/no-fixincludes.patch | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 27 deletions(-)
 delete mode 100644 base/gcc/fixincl.patch
 create mode 100644 base/gcc/no-fixincludes.patch

diff --git a/base/gcc/fixincl.patch b/base/gcc/fixincl.patch
deleted file mode 100644
index d7e2d8a63..000000000
--- a/base/gcc/fixincl.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-# --- SDE-COPYRIGHT-NOTE-BEGIN ---
-# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
-#
-# Filename: package/.../gcc/fixincl.patch
-# Copyright (C) 2004 - 2006 The T2 SDE Project
-#
-# More information can be found in the files COPYING and README.
-#
-# This patch file is dual-licensed. It is available under the license the
-# patched project is licensed under, as long as it is an OpenSource license
-# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
-# of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-# --- SDE-COPYRIGHT-NOTE-END ---
- 
---- gcc-4.0.1/fixincludes/fixinc.in.vanilla	2005-08-23 22:28:53.000000000 +0200
-+++ gcc-4.0.1/fixincludes/fixinc.in	2005-08-23 22:29:25.000000000 +0200
-@@ -164,6 +164,8 @@
-     INPUTLIST="$@"
- fi
- 
-+exit # not with us -ReneR
-+
- for INPUT in ${INPUTLIST} ; do
- 
- cd ${ORIGDIR}
diff --git a/base/gcc/no-fixincludes.patch b/base/gcc/no-fixincludes.patch
new file mode 100644
index 000000000..06e6740a5
--- /dev/null
+++ b/base/gcc/no-fixincludes.patch
@@ -0,0 +1,32 @@
+# --- SDE-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+#
+# Filename: package/.../gcc/no-fixincludes.patch
+# Copyright (C) 2010 The OpenSDE Project
+#
+# More information can be found in the files COPYING and README.
+#
+# This patch file is dual-licensed. It is available under the license the
+# patched project is licensed under, as long as it is an OpenSource license
+# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
+# of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+# --- SDE-COPYRIGHT-NOTE-END ---
+
+# Do not run the 'fixinc.sh' script.
+# The fixincludes script attempts to "fix" the system headers installed so far.
+# Since GCC is cross-compiled expecting the system headers to be in
+# /usr/include, the script will be looking at the host system's headers.
+
+--- gcc-4.4.3/gcc/Makefile.in.orig	2010-03-22 12:15:16.545004067 +0100
++++ gcc-4.4.3/gcc/Makefile.in	2010-03-24 10:41:00.857074903 +0100
+@@ -3701,7 +3701,7 @@
+ 	      SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \
+ 	      export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
+ 	      cd $(build_objdir)/fixincludes && \
+-	      $(SHELL) ./fixinc.sh ../../gcc/$${fix_dir} \
++	      $(SHELL) -c true ../../gcc/$${fix_dir} \
+ 	        $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
+ 	    rm -f $${fix_dir}/syslimits.h; \
+ 	    if [ -f $${fix_dir}/limits.h ]; then \