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