source: patches/gcc-4.1.2-cross_search_paths-1.patch@ 2c6d8c4

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 2c6d8c4 was 2c79b57, 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 
[69cde8d]1Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
[2c79b57]2Date: 2007-02-14
3Initial Package Version: 4.1.2
[69cde8d]4Origin: Ryan Oliver (issue reported by Erik-Jan Post)
[e7a7a6f]5 Rediffed against 4.1.0 by Chris Staub
[2c79b57]6 Rediffed against 4.1.2 by Jim Gifford
[69cde8d]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
[2c79b57]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 @@
[69cde8d]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.