source: clfs-embedded/patches/gcc-4.1.1-cross_search_paths-1.patch@ d88959a

Last change on this file since d88959a was e666df1, checked in by Jim Gifford <clfs@…>, 18 years ago

Updated Date
Added Busybox
Added Patches
Updated uClibc to build Busybox

  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[e666df1]1Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
2Date: 2005-05-02
3Initial Package Version: 4.0.1
4Origin: Ryan Oliver (issue reported by Erik-Jan Post)
5 Rediffed against 4.1.0 by Chris Staub
6Upstream Status: N/A
7Description:
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
21diff -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);
Note: See TracBrowser for help on using the repository browser.