First stage in cleaning the built-in pathes of gcc. Adapted patch from
[dragonfly.git] / gnu / usr.bin / cc34 / cc_prep / patches / gcc.c.patch
1 $DragonFly: src/gnu/usr.bin/cc34/cc_prep/patches/gcc.c.patch,v 1.1 2004/06/19 11:13:30 joerg Exp $
2
3 --- gcc.c.orig  2004-06-18 23:08:11.000000000 +0200
4 +++ gcc.c       2004-06-19 12:22:05.000000000 +0200
5 @@ -1408,8 +1408,7 @@
6  static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
7  static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
8  static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
9 -static const char *const standard_startfile_prefix_1 = "/lib/";
10 -static const char *const standard_startfile_prefix_2 = "/usr/lib/";
11 +static const char *const standard_startfile_prefix_1 = STANDARD_STARTFILE_PREFIX_1;
12  
13  static const char *const tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
14  static const char *tooldir_prefix;
15 @@ -3211,8 +3210,6 @@
16        set_std_prefix (gcc_exec_prefix, len);
17        add_prefix (&exec_prefixes, gcc_libexec_prefix, "GCC",
18                   PREFIX_PRIORITY_LAST, 0, NULL, 0);
19 -      add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC",
20 -                 PREFIX_PRIORITY_LAST, 0, NULL, 0);
21      }
22  
23    /* COMPILER_PATH and LIBRARY_PATH have values
24 @@ -3760,11 +3757,6 @@
25               PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0);
26  #endif
27  
28 -  add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
29 -             PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0);
30 -  add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
31 -             PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0);
32 -
33    tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
34                            dir_separator_str, NULL);
35  
36 @@ -3787,10 +3779,6 @@
37                       concat (gcc_exec_tooldir_prefix, "bin",
38                               dir_separator_str, NULL),
39                       NULL, PREFIX_PRIORITY_LAST, 0, NULL, 0);
40 -         add_prefix (&startfile_prefixes,
41 -                     concat (gcc_exec_tooldir_prefix, "lib",
42 -                             dir_separator_str, NULL),
43 -                     NULL, PREFIX_PRIORITY_LAST, 0, NULL, 1);
44         }
45  
46        tooldir_prefix = concat (standard_exec_prefix, spec_machine,
47 @@ -3801,9 +3789,6 @@
48    add_prefix (&exec_prefixes,
49               concat (tooldir_prefix, "bin", dir_separator_str, NULL),
50               "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 0);
51 -  add_prefix (&startfile_prefixes,
52 -             concat (tooldir_prefix, "lib", dir_separator_str, NULL),
53 -             "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1);
54  
55  #if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS)
56    /* If the normal TARGET_SYSTEM_ROOT is inside of $exec_prefix,
57 @@ -6121,35 +6106,10 @@
58         add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix_1,
59                               "GCC", PREFIX_PRIORITY_LAST, 0, NULL, 1);
60  
61 -      /* If standard_startfile_prefix is relative, base it on
62 -        standard_exec_prefix.  This lets us move the installed tree
63 -        as a unit.  If GCC_EXEC_PREFIX is defined, base
64 -        standard_startfile_prefix on that as well.
65 -
66 -         If the prefix is relative, only search it for native compilers;
67 -         otherwise we will search a directory containing host libraries.  */
68 -      if (IS_ABSOLUTE_PATH (standard_startfile_prefix))
69 -       add_sysrooted_prefix (&startfile_prefixes,
70 -                             standard_startfile_prefix, "BINUTILS",
71 -                             PREFIX_PRIORITY_LAST, 0, NULL, 1);
72 -      else if (*cross_compile == '0')
73 -       {
74 -         if (gcc_exec_prefix)
75 -           add_prefix (&startfile_prefixes,
76 -                       concat (gcc_exec_prefix, machine_suffix,
77 -                               standard_startfile_prefix, NULL),
78 -                       NULL, PREFIX_PRIORITY_LAST, 0, NULL, 1);
79 -         add_prefix (&startfile_prefixes,
80 -                     concat (standard_exec_prefix,
81 -                             machine_suffix,
82 -                             standard_startfile_prefix, NULL),
83 -                     NULL, PREFIX_PRIORITY_LAST, 0, NULL, 1);
84 -       }
85 -
86 -      add_sysrooted_prefix (&startfile_prefixes, standard_startfile_prefix_1,
87 -                           "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1);
88 -      add_sysrooted_prefix (&startfile_prefixes, standard_startfile_prefix_2,
89 -                           "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1);
90 +      add_prefix (&startfile_prefixes, standard_startfile_prefix,
91 +                           "GCC", PREFIX_PRIORITY_LAST, 0, NULL, 1);
92 +      add_prefix (&startfile_prefixes, standard_startfile_prefix_1,
93 +                           "GCC", PREFIX_PRIORITY_LAST, 0, NULL, 1);
94  #if 0 /* Can cause surprises, and one can use -B./ instead.  */
95        add_prefix (&startfile_prefixes, "./", NULL,
96                   PREFIX_PRIORITY_LAST, 1, NULL, 0);