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

Last change on this file since 4d57ce8 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
  • gcc/gcc.c

    Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
    Date: 2007-02-14
    Initial Package Version: 4.1.2
    Origin: Ryan Oliver (issue reported by Erik-Jan Post)
            Rediffed against 4.1.0 by Chris Staub
    	Rediffed against 4.1.2 by Jim Gifford
    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.
     
    diff -Naur gcc-4.1.2.orig/gcc/gcc.c gcc-4.1.2/gcc/gcc.c
    old new  
    38213821              PREFIX_PRIORITY_LAST, 2, 0);
    38223822  add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
    38233823              PREFIX_PRIORITY_LAST, 2, 0);
    3824   add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
     3824  if (*cross_compile == '0')
     3825    {
     3826      add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
    38253827              PREFIX_PRIORITY_LAST, 2, 0);
    3826   add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
     3828      add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
    38273829              PREFIX_PRIORITY_LAST, 2, 0);
     3830    }
    38283831#endif
    38293832
    38303833  add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
    38313834              PREFIX_PRIORITY_LAST, 1, 0);
    3832   add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
     3835  if (*cross_compile == '0')
     3836    {
     3837      add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
    38333838              PREFIX_PRIORITY_LAST, 1, 0);
     3839    }
    38343840
    38353841  tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
    38363842                           dir_separator_str, NULL);
Note: See TracBrowser for help on using the repository browser.