source: clfs-sysroot/patches/gcc-4.2.0-cross_search_paths-1.patch@ b7f86eb

Last change on this file since b7f86eb was 82ae338, checked in by Joe Ciccone <jciccone@…>, 17 years ago

Updated to Tar 1.17.
Updated to Vim 7.1.
Updated to Findutils 4.2.31.
Updated to File 4.21.
Updated to Less 403.
Updated to Man Pages 2.57.
Copied missing gcc patches.

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[8f3d581]1Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
[dbab86c]2Date: 2007-02-14
[82ae338]3Initial Package Version: 4.2.0
[8f3d581]4Origin: Ryan Oliver (issue reported by Erik-Jan Post)
5 Rediffed against 4.1.0 by Chris Staub
[82ae338]6 Rediffed against 4.1.2 by Jim Gifford
7 Rediffed against 4.2.0 by Joe Ciccone
[8f3d581]8Upstream Status: N/A
9Description:
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.
[82ae338]22
23diff -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 @@
[8f3d581]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);
Note: See TracBrowser for help on using the repository browser.