source: patches/gcc-4.1.1-cross_search_paths-1.patch@ 31d07f11

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 31d07f11 was 89d1048, checked in by Jim Gifford <clfs@…>, 19 years ago

Updated to GCC 4.1.1 patches

  • Property mode set to 100644
File size: 2.0 KB
  • gcc/gcc.c

    Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
    Date: 2005-05-02
    Initial Package Version: 4.0.1
    Origin: Ryan Oliver (issue reported by Erik-Jan Post)
            Rediffed against 4.1.0 by Chris Staub
    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.0.orig/gcc/gcc.c gcc-4.1.0/gcc/gcc.c
    old new  
    38183818              PREFIX_PRIORITY_LAST, 2, 0);
    38193819  add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
    38203820              PREFIX_PRIORITY_LAST, 2, 0);
    3821   add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
     3821  if (*cross_compile == '0')
     3822    {
     3823      add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
    38223824              PREFIX_PRIORITY_LAST, 2, 0);
    3823   add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
     3825      add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
    38243826              PREFIX_PRIORITY_LAST, 2, 0);
     3827    }
    38253828#endif
    38263829
    38273830  add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
    38283831              PREFIX_PRIORITY_LAST, 1, 0);
    3829   add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
     3832  if (*cross_compile == '0')
     3833    {
     3834      add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
    38303835              PREFIX_PRIORITY_LAST, 1, 0);
     3836    }
    38313837
    38323838  tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
    38333839                           dir_separator_str, NULL);
Note: See TracBrowser for help on using the repository browser.