diff options
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.6/COLLECT_GCC_OPTIONS.patch')
-rw-r--r-- | toolchain-layer/recipes-devtools/gcc/gcc-4.6/COLLECT_GCC_OPTIONS.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/COLLECT_GCC_OPTIONS.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/COLLECT_GCC_OPTIONS.patch new file mode 100644 index 000000000..38856c2d8 --- /dev/null +++ b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/COLLECT_GCC_OPTIONS.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | #This patck added --sysroot into COLLECT_GCC_OPTIONS which is used to | ||
4 | #invoke collect2. | ||
5 | |||
6 | Index: gcc-4.6.0/gcc/gcc.c | ||
7 | =================================================================== | ||
8 | --- gcc-4.6.0.orig/gcc/gcc.c | ||
9 | +++ gcc-4.6.0/gcc/gcc.c | ||
10 | @@ -3948,6 +3948,15 @@ set_collect_gcc_options (void) | ||
11 | sizeof ("COLLECT_GCC_OPTIONS=") - 1); | ||
12 | |||
13 | first_time = TRUE; | ||
14 | +#ifdef HAVE_LD_SYSROOT | ||
15 | + if (target_system_root_changed && target_system_root) | ||
16 | + { | ||
17 | + obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1); | ||
18 | + obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root)); | ||
19 | + obstack_grow (&collect_obstack, "'", 1); | ||
20 | + first_time = FALSE; | ||
21 | + } | ||
22 | +#endif | ||
23 | for (i = 0; (int) i < n_switches; i++) | ||
24 | { | ||
25 | const char *const *args; | ||