diff options
Diffstat (limited to 'patches/gcc-linaro-4.5-2011.02-0/0001-no-host-includes.diff')
-rw-r--r-- | patches/gcc-linaro-4.5-2011.02-0/0001-no-host-includes.diff | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/patches/gcc-linaro-4.5-2011.02-0/0001-no-host-includes.diff b/patches/gcc-linaro-4.5-2011.02-0/0001-no-host-includes.diff deleted file mode 100644 index 39df653..0000000 --- a/patches/gcc-linaro-4.5-2011.02-0/0001-no-host-includes.diff +++ /dev/null @@ -1,54 +0,0 @@ -From: Marc Kleine-Budde <m.kleine-budde@pengutronix.de> - -With this patch gcc bails out if you include a host include path into -the searchlist (-I). This patch is not intended for upstream and was -inspired by - -http://www.openembedded.org/repo/org.openembedded.dev/packages/gcc/gcc-4.1.1/zecke-no-host-includes.patch - -Signed-off-by: Marc Kleine-Budde <m.kleine-budde@pengutronix.de> -Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> - ---- - gcc/incpath.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -Index: gcc-4.5.1/gcc/incpath.c -=================================================================== ---- gcc-4.5.1.orig/gcc/incpath.c -+++ gcc-4.5.1/gcc/incpath.c -@@ -417,6 +417,34 @@ add_path (char *path, int chain, int cxx - 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. */ -+ { -+ unsigned int i; -+ const char *bad_path[] = { -+ "/usr/include", -+ "/usr/local/include", -+ "/sw/include", -+ "/opt/include", -+ }; -+ -+ for (i = 0; i < sizeof(bad_path)/sizeof(bad_path[0]); i++) { -+ if( strstr(p->name, bad_path[i]) == p->name ) { -+ fprintf(stderr,_("\n" -+ "CROSS COMPILE Badness: %s in INCLUDEPATH: %s\n" -+ "\n"), -+ -+ bad_path[i], p->name); -+ -+ exit (FATAL_EXIT_CODE); -+ } -+ } -+ } -+#endif -+ - add_cpp_dir_path (p, chain); - } - |