Author: archaic
Date: 2005-05-04 11:13:56 -0600 (Wed, 04 May 2005)
New Revision: 941

Added:
   trunk/gcc/gcc-3.4.3-cross_search_paths-1.patch
Log:
Added gcc-3.4.3-cross_search_paths-1.patch.

Added: trunk/gcc/gcc-3.4.3-cross_search_paths-1.patch
===================================================================
--- trunk/gcc/gcc-3.4.3-cross_search_paths-1.patch      2005-05-01 15:21:04 UTC 
(rev 940)
+++ trunk/gcc/gcc-3.4.3-cross_search_paths-1.patch      2005-05-04 17:13:56 UTC 
(rev 941)
@@ -0,0 +1,47 @@
+Submitted by: Ryan Oliver <[EMAIL PROTECTED]>
+Date: 2005-05-02
+Initial Package Version: 3.4.3
+Origin: Ryan Oliver (issue reported by Erik-Jan Post)
+Upstream Status: N/A
+Description: 
+  Removes standard_exec_prefix_2 from library search path when cross-compiling.
+  Removes both standard_exec_prefix_1 and standard_exec_prefix_2 from the gcc
+  executable search path when cross-compiling.
+
+  ie: if cross_compile = 1 in the specs file, do not
+      - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} to the library search path
+      - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} or
+                   /usr/libexec/gcc/${TARGET}/${GCC_VER}
+        to the executable search path
+
+  This avoids the possibility of linking in libraries from the host if they
+  exist under those directories.
+
+--- gcc-3.4.3/gcc/gcc.c-orig   2004-09-09 01:16:11.000000000 +1000
++++ gcc-3.4.3/gcc/gcc.c        2005-05-02 21:16:05.000000000 +1000
+@@ -3757,16 +3757,22 @@
+             PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0);
+   add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
+             PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0);
+-  add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
++  if (*cross_compile == '0')
++    {
++      add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
+             PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0);
+-  add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
++      add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
+             PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0);
++    }
+ #endif
+ 
+   add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
+             PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0);
+-  add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
++  if (*cross_compile == '0')
++    {
++      add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
+             PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0);
++    }
+ 
+   tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
+                          dir_separator_str, NULL);

-- 
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to