source: patches/gcc-4.0.3-cross_search_paths-1.patch@ 5bb6985

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 5bb6985 was 69cde8d, checked in by Jim Gifford <clfs@…>, 19 years ago

Added: All patches needed for the book.

  • Property mode set to 100644
File size: 1.9 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)
    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.0.1.orig/gcc/gcc.c gcc-4.0.1/gcc/gcc.c
    old new  
    37973797              PREFIX_PRIORITY_LAST, 2, 0);
    37983798  add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
    37993799              PREFIX_PRIORITY_LAST, 2, 0);
    3800   add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
     3800  if (*cross_compile == '0')
     3801    {
     3802      add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
    38013803              PREFIX_PRIORITY_LAST, 2, 0);
    3802   add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
     3804      add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
    38033805              PREFIX_PRIORITY_LAST, 2, 0);
     3806    }
    38043807#endif
    38053808
    38063809  add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
    38073810              PREFIX_PRIORITY_LAST, 1, 0);
    3808   add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
     3811  if (*cross_compile == '0')
     3812    {
     3813      add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
    38093814              PREFIX_PRIORITY_LAST, 1, 0);
     3815    }
    38103816
    38113817  tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
    38123818                           dir_separator_str, NULL);
Note: See TracBrowser for help on using the repository browser.