source: patches/gcc-4.0.3-cross_search_paths-1.patch@ 4af05f3

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 4af05f3 was 69cde8d, checked in by Jim Gifford <clfs@…>, 19 years ago

Added: All patches needed for the book.

  • Property mode set to 100644
File size: 1.9 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)
5Upstream Status: N/A
6Description:
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
20diff -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);
Note: See TracBrowser for help on using the repository browser.