1 $DragonFly: src/gnu/usr.bin/cc34/cc_prep/patches/gcc.c.patch,v 1.4 2005/08/03 03:12:00 joerg Exp $
4 ===================================================================
5 RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/gcc-3.4/gcc/gcc.c,v
6 retrieving revision 1.3
8 --- gcc.c 24 May 2005 06:29:31 -0000 1.3
9 +++ gcc.c 2 Aug 2005 22:25:59 -0000
11 static const char *asm_spec = ASM_SPEC;
12 static const char *asm_final_spec = ASM_FINAL_SPEC;
13 static const char *link_spec = LINK_SPEC;
14 +static const char *pre_lib_spec = PRE_LIB_SPEC;
15 static const char *lib_spec = LIB_SPEC;
16 static const char *libgcc_spec = LIBGCC_SPEC;
17 static const char *endfile_spec = ENDFILE_SPEC;
19 static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
20 static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
21 static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
22 -static const char *const standard_startfile_prefix_1 = "/lib/";
23 -static const char *const standard_startfile_prefix_2 = "/usr/lib/";
24 +static const char *const standard_startfile_prefix_1 = STANDARD_STARTFILE_PREFIX_1;
26 static const char *const tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
27 static const char *tooldir_prefix;
29 INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec),
30 INIT_STATIC_SPEC ("endfile", &endfile_spec),
31 INIT_STATIC_SPEC ("link", &link_spec),
32 + INIT_STATIC_SPEC ("pre_lib", &pre_lib_spec),
33 INIT_STATIC_SPEC ("lib", &lib_spec),
34 INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
35 INIT_STATIC_SPEC ("startfile", &startfile_spec),
37 set_std_prefix (gcc_exec_prefix, len);
38 add_prefix (&exec_prefixes, gcc_libexec_prefix, "GCC",
39 PREFIX_PRIORITY_LAST, 0, NULL, 0);
40 - add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC",
41 - PREFIX_PRIORITY_LAST, 0, NULL, 0);
44 /* COMPILER_PATH and LIBRARY_PATH have values
45 @@ -3768,11 +3767,6 @@
46 PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0);
49 - add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
50 - PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0);
51 - add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
52 - PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0);
54 tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
55 dir_separator_str, NULL);
57 @@ -3795,10 +3789,6 @@
58 concat (gcc_exec_tooldir_prefix, "bin",
59 dir_separator_str, NULL),
60 NULL, PREFIX_PRIORITY_LAST, 0, NULL, 0);
61 - add_prefix (&startfile_prefixes,
62 - concat (gcc_exec_tooldir_prefix, "lib",
63 - dir_separator_str, NULL),
64 - NULL, PREFIX_PRIORITY_LAST, 0, NULL, 1);
67 tooldir_prefix = concat (standard_exec_prefix, spec_machine,
68 @@ -3806,13 +3796,6 @@
69 dir_separator_str, tooldir_prefix, NULL);
72 - add_prefix (&exec_prefixes,
73 - concat (tooldir_prefix, "bin", dir_separator_str, NULL),
74 - "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 0);
75 - add_prefix (&startfile_prefixes,
76 - concat (tooldir_prefix, "lib", dir_separator_str, NULL),
77 - "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1);
79 #if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS)
80 /* If the normal TARGET_SYSTEM_ROOT is inside of $exec_prefix,
81 then consider it to relocate with the rest of the GCC installation
82 @@ -6037,11 +6020,6 @@
83 n_compilers = n_default_compilers;
85 /* Read specs from a file if there is one. */
87 - machine_suffix = concat (spec_machine, dir_separator_str,
88 - spec_version, dir_separator_str, NULL);
89 - just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
91 specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, 0);
92 /* Read the specs file unless it is a default one. */
93 if (specs_file != 0 && strcmp (specs_file, "specs"))
94 @@ -6051,11 +6029,9 @@
96 /* We need to check standard_exec_prefix/just_machine_suffix/specs
97 for any override of as, ld and libraries. */
98 - specs_file = alloca (strlen (standard_exec_prefix)
99 - + strlen (just_machine_suffix) + sizeof ("specs"));
100 + specs_file = alloca (strlen (standard_exec_prefix) + sizeof ("specs"));
102 strcpy (specs_file, standard_exec_prefix);
103 - strcat (specs_file, just_machine_suffix);
104 strcat (specs_file, "specs");
105 if (access (specs_file, R_OK) == 0)
106 read_specs (specs_file, TRUE);
107 @@ -6129,35 +6105,10 @@
108 add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix_1,
109 "GCC", PREFIX_PRIORITY_LAST, 0, NULL, 1);
111 - /* If standard_startfile_prefix is relative, base it on
112 - standard_exec_prefix. This lets us move the installed tree
113 - as a unit. If GCC_EXEC_PREFIX is defined, base
114 - standard_startfile_prefix on that as well.
116 - If the prefix is relative, only search it for native compilers;
117 - otherwise we will search a directory containing host libraries. */
118 - if (IS_ABSOLUTE_PATH (standard_startfile_prefix))
119 - add_sysrooted_prefix (&startfile_prefixes,
120 - standard_startfile_prefix, "BINUTILS",
121 - PREFIX_PRIORITY_LAST, 0, NULL, 1);
122 - else if (*cross_compile == '0')
124 - if (gcc_exec_prefix)
125 - add_prefix (&startfile_prefixes,
126 - concat (gcc_exec_prefix, machine_suffix,
127 - standard_startfile_prefix, NULL),
128 - NULL, PREFIX_PRIORITY_LAST, 0, NULL, 1);
129 - add_prefix (&startfile_prefixes,
130 - concat (standard_exec_prefix,
132 - standard_startfile_prefix, NULL),
133 - NULL, PREFIX_PRIORITY_LAST, 0, NULL, 1);
136 - add_sysrooted_prefix (&startfile_prefixes, standard_startfile_prefix_1,
137 - "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1);
138 - add_sysrooted_prefix (&startfile_prefixes, standard_startfile_prefix_2,
139 - "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1);
140 + add_prefix (&startfile_prefixes, standard_startfile_prefix,
141 + "GCC", PREFIX_PRIORITY_LAST, 0, NULL, 1);
142 + add_prefix (&startfile_prefixes, standard_startfile_prefix_1,
143 + "GCC", PREFIX_PRIORITY_LAST, 0, NULL, 1);
144 #if 0 /* Can cause surprises, and one can use -B./ instead. */
145 add_prefix (&startfile_prefixes, "./", NULL,
146 PREFIX_PRIORITY_LAST, 1, NULL, 0);
147 @@ -6197,7 +6148,7 @@
149 if (print_search_dirs)
151 - printf (_("install: %s%s\n"), standard_exec_prefix, machine_suffix);
152 + printf (_("install: %s\n"), standard_exec_prefix);
153 printf (_("programs: %s\n"), build_search_list (&exec_prefixes, "", 0));
154 printf (_("libraries: %s\n"), build_search_list (&startfile_prefixes, "", 0));