Welcome the build infrastructure for gcc41
[dragonfly.git] / gnu / usr.bin / cc41 / cc_prep / patches / gcc.c.patch
blobb4fda58687d2a4745d849496e6a4ebcd792b39b7
1 $DragonFly: src/gnu/usr.bin/cc41/cc_prep/patches/gcc.c.patch,v 1.1 2006/09/27 12:10:34 corecode Exp $
3 --- /usr/src/contrib/gcc-4.0/gcc/gcc.c 2005-09-10 20:52:20.000000000 +0200
4 +++ gcc.c 2005-09-11 13:21:55.000000000 +0200
5 @@ -730,6 +730,7 @@
6 static const char *asm_spec = ASM_SPEC;
7 static const char *asm_final_spec = ASM_FINAL_SPEC;
8 static const char *link_spec = LINK_SPEC;
9 +static const char *pre_lib_spec = PRE_LIB_SPEC;
10 static const char *lib_spec = LIB_SPEC;
11 static const char *mfwrap_spec = MFWRAP_SPEC;
12 static const char *mflib_spec = MFLIB_SPEC;
13 @@ -1523,6 +1524,7 @@
14 INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec),
15 INIT_STATIC_SPEC ("endfile", &endfile_spec),
16 INIT_STATIC_SPEC ("link", &link_spec),
17 + INIT_STATIC_SPEC ("pre_lib", &pre_lib_spec),
18 INIT_STATIC_SPEC ("lib", &lib_spec),
19 INIT_STATIC_SPEC ("mfwrap", &mfwrap_spec),
20 INIT_STATIC_SPEC ("mflib", &mflib_spec),
21 @@ -3254,8 +3256,6 @@
22 set_std_prefix (gcc_exec_prefix, len);
23 add_prefix (&exec_prefixes, gcc_libexec_prefix, "GCC",
24 PREFIX_PRIORITY_LAST, 0, 0);
25 - add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC",
26 - PREFIX_PRIORITY_LAST, 0, 0);
29 /* COMPILER_PATH and LIBRARY_PATH have values
30 @@ -3803,11 +3803,6 @@
31 PREFIX_PRIORITY_LAST, 2, 0);
32 #endif
34 - add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
35 - PREFIX_PRIORITY_LAST, 1, 0);
36 - add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
37 - PREFIX_PRIORITY_LAST, 1, 0);
39 tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
40 dir_separator_str, NULL);
42 @@ -3830,10 +3825,6 @@
43 concat (gcc_exec_tooldir_prefix, "bin",
44 dir_separator_str, NULL),
45 NULL, PREFIX_PRIORITY_LAST, 0, 0);
46 - add_prefix (&startfile_prefixes,
47 - concat (gcc_exec_tooldir_prefix, "lib",
48 - dir_separator_str, NULL),
49 - NULL, PREFIX_PRIORITY_LAST, 0, 1);
52 tooldir_prefix = concat (standard_exec_prefix, spec_machine,
53 @@ -3841,13 +3832,6 @@
54 dir_separator_str, tooldir_prefix, NULL);
57 - add_prefix (&exec_prefixes,
58 - concat (tooldir_prefix, "bin", dir_separator_str, NULL),
59 - "BINUTILS", PREFIX_PRIORITY_LAST, 0, 0);
60 - add_prefix (&startfile_prefixes,
61 - concat (tooldir_prefix, "lib", dir_separator_str, NULL),
62 - "BINUTILS", PREFIX_PRIORITY_LAST, 0, 1);
64 #if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS)
65 /* If the normal TARGET_SYSTEM_ROOT is inside of $exec_prefix,
66 then consider it to relocate with the rest of the GCC installation
67 @@ -6110,10 +6094,6 @@
69 /* Read specs from a file if there is one. */
71 - machine_suffix = concat (spec_machine, dir_separator_str,
72 - spec_version, dir_separator_str, NULL);
73 - just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
75 specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, 0);
76 /* Read the specs file unless it is a default one. */
77 if (specs_file != 0 && strcmp (specs_file, "specs"))
78 @@ -6123,11 +6103,9 @@
80 /* We need to check standard_exec_prefix/just_machine_suffix/specs
81 for any override of as, ld and libraries. */
82 - specs_file = alloca (strlen (standard_exec_prefix)
83 - + strlen (just_machine_suffix) + sizeof ("specs"));
84 + specs_file = alloca (strlen (standard_exec_prefix) + sizeof ("specs"));
86 strcpy (specs_file, standard_exec_prefix);
87 - strcat (specs_file, just_machine_suffix);
88 strcat (specs_file, "specs");
89 if (access (specs_file, R_OK) == 0)
90 read_specs (specs_file, TRUE);
91 @@ -6201,39 +6179,10 @@
92 add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix_1,
93 "GCC", PREFIX_PRIORITY_LAST, 0, 1);
95 - /* If standard_startfile_prefix is relative, base it on
96 - standard_exec_prefix. This lets us move the installed tree
97 - as a unit. If GCC_EXEC_PREFIX is defined, base
98 - standard_startfile_prefix on that as well.
100 - If the prefix is relative, only search it for native compilers;
101 - otherwise we will search a directory containing host libraries. */
102 - if (IS_ABSOLUTE_PATH (standard_startfile_prefix))
103 - add_sysrooted_prefix (&startfile_prefixes,
104 - standard_startfile_prefix, "BINUTILS",
105 - PREFIX_PRIORITY_LAST, 0, 1);
106 - else if (*cross_compile == '0')
108 - if (gcc_exec_prefix)
109 - add_prefix (&startfile_prefixes,
110 - concat (gcc_exec_prefix, machine_suffix,
111 - standard_startfile_prefix, NULL),
112 - NULL, PREFIX_PRIORITY_LAST, 0, 1);
113 - add_prefix (&startfile_prefixes,
114 - concat (standard_exec_prefix,
115 - machine_suffix,
116 - standard_startfile_prefix, NULL),
117 - NULL, PREFIX_PRIORITY_LAST, 0, 1);
120 - if (*standard_startfile_prefix_1)
121 - add_sysrooted_prefix (&startfile_prefixes,
122 - standard_startfile_prefix_1, "BINUTILS",
123 - PREFIX_PRIORITY_LAST, 0, 1);
124 - if (*standard_startfile_prefix_2)
125 - add_sysrooted_prefix (&startfile_prefixes,
126 - standard_startfile_prefix_2, "BINUTILS",
127 - PREFIX_PRIORITY_LAST, 0, 1);
128 + add_prefix (&startfile_prefixes, standard_startfile_prefix,
129 + "GCC", PREFIX_PRIORITY_LAST, 0, 1);
130 + add_prefix (&startfile_prefixes, standard_startfile_prefix_1,
131 + "GCC", PREFIX_PRIORITY_LAST, 0, 1);
134 /* Process any user specified specs in the order given on the command
135 @@ -6269,7 +6218,7 @@
137 if (print_search_dirs)
139 - printf (_("install: %s%s\n"), standard_exec_prefix, machine_suffix);
140 + printf (_("install: %s\n"), standard_exec_prefix);
141 printf (_("programs: %s\n"), build_search_list (&exec_prefixes, "", 0));
142 printf (_("libraries: %s\n"), build_search_list (&startfile_prefixes, "", 0));
143 return (0);