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