Contents of /trunk/gcc/patches/gcc-4.0.2-cross_search_paths-1.patch
Parent Directory | Revision Log
Revision 169 -
(show annotations)
(download)
Tue May 8 21:36:54 2007 UTC (17 years, 4 months ago) by niro
File size: 1971 byte(s)
Tue May 8 21:36:54 2007 UTC (17 years, 4 months ago) by niro
File size: 1971 byte(s)
-moved to patches subdir
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 | 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 | diff -Naur gcc-4.0.1.orig/gcc/gcc.c gcc-4.0.1/gcc/gcc.c |
21 | --- gcc-4.0.1.orig/gcc/gcc.c 2005-06-06 19:20:29.000000000 +0000 |
22 | +++ gcc-4.0.1/gcc/gcc.c 2005-08-27 21:16:02.000000000 +0000 |
23 | @@ -3797,16 +3797,22 @@ |
24 | PREFIX_PRIORITY_LAST, 2, 0); |
25 | add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS", |
26 | PREFIX_PRIORITY_LAST, 2, 0); |
27 | - add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS", |
28 | + if (*cross_compile == '0') |
29 | + { |
30 | + add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS", |
31 | PREFIX_PRIORITY_LAST, 2, 0); |
32 | - add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS", |
33 | + add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS", |
34 | PREFIX_PRIORITY_LAST, 2, 0); |
35 | + } |
36 | #endif |
37 | |
38 | add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS", |
39 | PREFIX_PRIORITY_LAST, 1, 0); |
40 | - add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS", |
41 | + if (*cross_compile == '0') |
42 | + { |
43 | + add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS", |
44 | PREFIX_PRIORITY_LAST, 1, 0); |
45 | + } |
46 | |
47 | tooldir_prefix = concat (tooldir_base_prefix, spec_machine, |
48 | dir_separator_str, NULL); |