diff options
author | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-06-30 22:07:04 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-06-30 22:07:04 +0000 |
commit | d4f7af436d07c7bc4dd61ac45bff3414a1c12c74 (patch) | |
tree | 049f5903fea26153466932a6b271c49f10b75ba8 /packages/gcc/gcc-4.3.1/zecke-no-host-includes.patch | |
parent | 873ce28c40814edb45f534003450318c6e9b2650 (diff) | |
parent | 7339a83b4095582728045cee92aa215373607caf (diff) |
merge of '08199c52a592fe71e2675200cf618a439d710884'
and '3e5f187370604cf4577025ebc49d90ca52a72d4d'
Diffstat (limited to 'packages/gcc/gcc-4.3.1/zecke-no-host-includes.patch')
-rw-r--r-- | packages/gcc/gcc-4.3.1/zecke-no-host-includes.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/gcc/gcc-4.3.1/zecke-no-host-includes.patch b/packages/gcc/gcc-4.3.1/zecke-no-host-includes.patch new file mode 100644 index 0000000000..6afb10d6ef --- /dev/null +++ b/packages/gcc/gcc-4.3.1/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); + } + |