source: patches/gcc-4.2.1-cross_search_paths-1.patch@ 2baa4a3

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 2baa4a3 was 01dba47, checked in by Joe Ciccone <jciccone@…>, 17 years ago

Update patches.

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

    Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
    Date: 2007-02-14
    Initial Package Version: 4.2.0
    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
    	Rediffed against 4.2.0 by Joe Ciccone
    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.2.0.orig/gcc/gcc.c gcc-4.2.0/gcc/gcc.c
    old new  
    39493949              PREFIX_PRIORITY_LAST, 2, 0);
    39503950  add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
    39513951              PREFIX_PRIORITY_LAST, 2, 0);
    3952   add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
     3952  if (*cross_compile == '0')
     3953    {
     3954      add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
    39533955              PREFIX_PRIORITY_LAST, 2, 0);
    3954   add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
     3956      add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
    39553957              PREFIX_PRIORITY_LAST, 2, 0);
     3958    }
    39563959#endif
    39573960
    39583961  add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
    39593962              PREFIX_PRIORITY_LAST, 1, 0);
    3960   add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
     3963  if (*cross_compile == '0')
     3964    {
     3965      add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
    39613966              PREFIX_PRIORITY_LAST, 1, 0);
     3967    }
    39623968
    39633969  tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
    39643970                           dir_separator_str, NULL);
Note: See TracBrowser for help on using the repository browser.