[8f3d581] | 1 | Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
|
---|
[dbab86c] | 2 | Date: 2007-02-14
|
---|
| 3 | Initial Package Version: 4.1.2
|
---|
[8f3d581] | 4 | Origin: Ryan Oliver (issue reported by Erik-Jan Post)
|
---|
| 5 | Rediffed against 4.1.0 by Chris Staub
|
---|
[dbab86c] | 6 | Rediffed against 4.1.2 by Jim Gifford
|
---|
[8f3d581] | 7 | Upstream Status: N/A
|
---|
| 8 | Description:
|
---|
| 9 | Removes standard_exec_prefix_2 from library search path when cross-compiling.
|
---|
| 10 | Removes both standard_exec_prefix_1 and standard_exec_prefix_2 from the gcc
|
---|
| 11 | executable search path when cross-compiling.
|
---|
| 12 |
|
---|
| 13 | ie: if cross_compile = 1 in the specs file, do not
|
---|
| 14 | - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} to the library search path
|
---|
| 15 | - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} or
|
---|
| 16 | /usr/libexec/gcc/${TARGET}/${GCC_VER}
|
---|
| 17 | to the executable search path
|
---|
| 18 |
|
---|
| 19 | This avoids the possibility of linking in libraries from the host if they
|
---|
| 20 | exist under those directories.
|
---|
| 21 |
|
---|
[dbab86c] | 22 | diff -Naur gcc-4.1.2.orig/gcc/gcc.c gcc-4.1.2/gcc/gcc.c
|
---|
| 23 | --- gcc-4.1.2.orig/gcc/gcc.c 2006-11-07 06:26:21.000000000 -0800
|
---|
| 24 | +++ gcc-4.1.2/gcc/gcc.c 2007-02-14 07:48:55.000000000 -0800
|
---|
| 25 | @@ -3821,16 +3821,22 @@
|
---|
[8f3d581] | 26 | PREFIX_PRIORITY_LAST, 2, 0);
|
---|
| 27 | add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
|
---|
| 28 | PREFIX_PRIORITY_LAST, 2, 0);
|
---|
| 29 | - add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
|
---|
| 30 | + if (*cross_compile == '0')
|
---|
| 31 | + {
|
---|
| 32 | + add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
|
---|
| 33 | PREFIX_PRIORITY_LAST, 2, 0);
|
---|
| 34 | - add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
|
---|
| 35 | + add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
|
---|
| 36 | PREFIX_PRIORITY_LAST, 2, 0);
|
---|
| 37 | + }
|
---|
| 38 | #endif
|
---|
| 39 |
|
---|
| 40 | add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
|
---|
| 41 | PREFIX_PRIORITY_LAST, 1, 0);
|
---|
| 42 | - add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
|
---|
| 43 | + if (*cross_compile == '0')
|
---|
| 44 | + {
|
---|
| 45 | + add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
|
---|
| 46 | PREFIX_PRIORITY_LAST, 1, 0);
|
---|
| 47 | + }
|
---|
| 48 |
|
---|
| 49 | tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
|
---|
| 50 | dir_separator_str, NULL);
|
---|