diff options
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.5/COLLECT_GCC_OPTIONS.patch')
-rw-r--r-- | toolchain-layer/recipes-devtools/gcc/gcc-4.5/COLLECT_GCC_OPTIONS.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.5/COLLECT_GCC_OPTIONS.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.5/COLLECT_GCC_OPTIONS.patch new file mode 100644 index 0000000..076e9a6 --- /dev/null +++ b/toolchain-layer/recipes-devtools/gcc/gcc-4.5/COLLECT_GCC_OPTIONS.patch @@ -0,0 +1,23 @@ +#This patck added --sysroot into COLLECT_GCC_OPTIONS which is used to +#invoke collect2. + +Index: gcc-4_5-branch/gcc/gcc.c +=================================================================== +--- gcc-4_5-branch.orig/gcc/gcc.c ++++ gcc-4_5-branch/gcc/gcc.c +@@ -4667,6 +4667,15 @@ set_collect_gcc_options (void) + sizeof ("COLLECT_GCC_OPTIONS=") - 1); + + first_time = TRUE; ++#ifdef HAVE_LD_SYSROOT ++ if (target_system_root_changed && target_system_root) ++ { ++ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1); ++ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root)); ++ obstack_grow (&collect_obstack, "'", 1); ++ first_time = FALSE; ++ } ++#endif + for (i = 0; (int) i < n_switches; i++) + { + const char *const *args; |