summaryrefslogtreecommitdiff
path: root/packages/mamona/gcc-noemu-4.1.2/zecke-no-host-includes.patch
diff options
context:
space:
mode:
authorCliff Brake <cbrake@bec-systems.com>2008-10-23 21:34:47 -0400
committerCliff Brake <cbrake@bec-systems.com>2008-10-23 21:34:47 -0400
commit97f239bff818c4836572495c05f983a9fab09202 (patch)
tree52341b9eefdf1b551d7d2a3fdd0ee391270f10fd /packages/mamona/gcc-noemu-4.1.2/zecke-no-host-includes.patch
parenta57a4df1e3d3ec67465253688a638adecc8caf6d (diff)
parent3a83d1fb3fd0fdbbf763e5f495ef9046f09e15b9 (diff)
Merge commit 'openembedded.org/org.openembedded.dev' into org.openembedded.dev
Diffstat (limited to 'packages/mamona/gcc-noemu-4.1.2/zecke-no-host-includes.patch')
-rw-r--r--packages/mamona/gcc-noemu-4.1.2/zecke-no-host-includes.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/mamona/gcc-noemu-4.1.2/zecke-no-host-includes.patch b/packages/mamona/gcc-noemu-4.1.2/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..6afb10d6ef
--- /dev/null
+++ b/packages/mamona/gcc-noemu-4.1.2/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
+Index: gcc-4.0.2/gcc/c-incpath.c
+===================================================================
+--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
+@@ -350,6 +350,26 @@
+ p->construct = 0;
+ p->user_supplied_p = user_supplied_p;
+
++#ifdef CROSS_COMPILE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ }
++ }
++#endif
++
+ add_cpp_dir_path (p, chain);
+ }
+