source: patches/gcc-4.2.1-cross_search_paths-1.patch@ c30178f

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since c30178f was 01dba47, checked in by Joe Ciccone <jciccone@…>, 17 years ago

Update patches.

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[69cde8d]1Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
[2c79b57]2Date: 2007-02-14
[08c058a]3Initial Package Version: 4.2.0
[69cde8d]4Origin: Ryan Oliver (issue reported by Erik-Jan Post)
[e7a7a6f]5 Rediffed against 4.1.0 by Chris Staub
[08c058a]6 Rediffed against 4.1.2 by Jim Gifford
7 Rediffed against 4.2.0 by Joe Ciccone
[69cde8d]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.
[08c058a]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 @@
[69cde8d]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.