source: patches/gcc-4.1.1-cross_search_paths-1.patch@ c6e8b64f

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since c6e8b64f was 89d1048, checked in by Jim Gifford <clfs@…>, 18 years ago

Updated to GCC 4.1.1 patches

  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[69cde8d]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)
[e7a7a6f]5 Rediffed against 4.1.0 by Chris Staub
[69cde8d]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
[e7a7a6f]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 @@
[69cde8d]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.