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