diff options
Diffstat (limited to 'sys-devel/gcc/files/4.3.1/gcc-4.3.1-repair-incpath.patch')
-rw-r--r-- | sys-devel/gcc/files/4.3.1/gcc-4.3.1-repair-incpath.patch | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/sys-devel/gcc/files/4.3.1/gcc-4.3.1-repair-incpath.patch b/sys-devel/gcc/files/4.3.1/gcc-4.3.1-repair-incpath.patch deleted file mode 100644 index 657de62..0000000 --- a/sys-devel/gcc/files/4.3.1/gcc-4.3.1-repair-incpath.patch +++ /dev/null @@ -1,50 +0,0 @@ -Fix the include directories for cross compilation automagically -(patch by Ned Ludd <solar@gentoo.org> on the Gentoo embedded mailinglist 2008-09-21) - ---- gcc/c-incpath.c 2007-09-01 08:28:30.000000000 -0700 -+++ gcc/c-incpath.c 2008-09-19 20:32:27.000000000 -0700 -@@ -332,6 +332,32 @@ - tails[chain] = p; - } - -+#ifdef CROSS_COMPILE -+/* Rewrite the include paths for cross compiles */ -+char *cross_fixup_path(char *path); -+char *cross_fixup_path(char *path) { -+ char *name, *root, *ptr; -+ int len; -+ -+ root = getenv("ROOT"); -+ if (root == NULL) -+ return name; -+ -+ if (strstr(path, "/usr/include") != path) -+ return path; -+ -+ name = xstrdup(path); -+ len = strlen(root) + strlen(name) + 2; -+ ptr = (char *) xmalloc (len); -+ sprintf(ptr, "%s/%s", root, name); -+ fprintf(stderr, _("Autofixing Invalid Cross Include Path: %s -> %s\n"), name, ptr); -+ free(path); -+ path = ptr; -+ name = path; -+ return name; -+} -+#endif -+ - /* Add PATH to the include chain CHAIN. PATH must be malloc-ed and - NUL-terminated. */ - void -@@ -359,6 +385,11 @@ - p->construct = 0; - p->user_supplied_p = user_supplied_p; - -+#ifdef CROSS_COMPILE -+ path = cross_fixup_path(path); -+ p->name = path; -+#endif -+ - add_cpp_dir_path (p, chain); - } - |