source: scripts/patches/gcc-3.4.3-clean_exec_and_lib_search_paths_when_cross-1.patch @ a7d67ca

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since a7d67ca was 7f65c0e, checked in by Jim Gifford <clfs@…>, 18 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[617118d]1Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
2Date: 2005-05-02
3Initial Package Version: 3.4.3
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
20--- gcc-3.4.3/gcc/gcc.c-orig    2004-09-09 01:16:11.000000000 +1000
21+++ gcc-3.4.3/gcc/gcc.c 2005-05-02 21:16:05.000000000 +1000
22@@ -3757,16 +3757,22 @@
23              PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0);
24   add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
25              PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0);
26-  add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
27+  if (*cross_compile == '0')
28+    {
29+      add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
30              PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0);
31-  add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
32+      add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
33              PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0);
34+    }
35 #endif
36 
37   add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
38              PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0);
39-  add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
40+  if (*cross_compile == '0')
41+    {
42+      add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
43              PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0);
44+    }
45 
46   tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
47                           dir_separator_str, NULL);
Note: See TracBrowser for help on using the repository browser.