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