source: clfs-embedded/patches/gcc-4.1.2-cross_search_paths-1.patch@ 9642843

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

Updated to GCC 4.1.2

  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[e666df1]1Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
[0602db2]2Date: 2007-02-14
3Initial Package Version: 4.1.2
[e666df1]4Origin: Ryan Oliver (issue reported by Erik-Jan Post)
5 Rediffed against 4.1.0 by Chris Staub
[0602db2]6 Rediffed against 4.1.2 by Jim Gifford
[e666df1]7Upstream Status: N/A
8Description:
9 Removes standard_exec_prefix_2 from library search path when cross-compiling.
10 Removes both standard_exec_prefix_1 and standard_exec_prefix_2 from the gcc
11 executable search path when cross-compiling.
12
13 ie: if cross_compile = 1 in the specs file, do not
14 - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} to the library search path
15 - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} or
16 /usr/libexec/gcc/${TARGET}/${GCC_VER}
17 to the executable search path
18
19 This avoids the possibility of linking in libraries from the host if they
20 exist under those directories.
21
[0602db2]22diff -Naur gcc-4.1.2.orig/gcc/gcc.c gcc-4.1.2/gcc/gcc.c
23--- gcc-4.1.2.orig/gcc/gcc.c 2006-11-07 06:26:21.000000000 -0800
24+++ gcc-4.1.2/gcc/gcc.c 2007-02-14 07:48:55.000000000 -0800
25@@ -3821,16 +3821,22 @@
[e666df1]26 PREFIX_PRIORITY_LAST, 2, 0);
27 add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
28 PREFIX_PRIORITY_LAST, 2, 0);
29- add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
30+ if (*cross_compile == '0')
31+ {
32+ add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
33 PREFIX_PRIORITY_LAST, 2, 0);
34- add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
35+ add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
36 PREFIX_PRIORITY_LAST, 2, 0);
37+ }
38 #endif
39
40 add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
41 PREFIX_PRIORITY_LAST, 1, 0);
42- add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
43+ if (*cross_compile == '0')
44+ {
45+ add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
46 PREFIX_PRIORITY_LAST, 1, 0);
47+ }
48
49 tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
50 dir_separator_str, NULL);
Note: See TracBrowser for help on using the repository browser.