+2005-03-23 Mark Mitchell <mark@codesourcery.com>
+
+ * gcc.c (do_spec_1): Do not add a -L path for a directory in
+ the prefix list if we have already added a multilib directory
+ based on that path.
+ (main): Do not add MD_EXEC_PREFIX to the list of directories to
+ search with -L.
+
2005-03-22 Kazu Hirata <kazu@cs.umass.edu>
* reload1.c (indirect_symref_ok, reload_obstack): Make them
static size_t bufsize = 0;
static char *buffer;
int idx;
+ bool multilib_p = false;
/* Used on systems which record the specified -L dirs
and use them to search for dynamic linking. */
strcat (buffer, machine_suffix);
if (is_directory (buffer, dir_for_machine_suffix, 1))
{
+ multilib_p = true;
do_spec_1 (option, separate_options, NULL);
if (separate_options)
do_spec_1 (" ", 0, NULL);
{
if (is_directory (pl->prefix, dir_for_no_suffix, 1))
{
+ multilib_p = true;
do_spec_1 (option, separate_options, NULL);
if (separate_options)
do_spec_1 (" ", 0, NULL);
}
}
- if (only_subdir)
+ if (only_subdir || multilib_p)
return;
if (machine_suffix)
startfile_prefix_spec exclusively. */
else if (*cross_compile == '0' || target_system_root)
{
- if (*md_exec_prefix)
- add_sysrooted_prefix (&startfile_prefixes, md_exec_prefix, "GCC",
- PREFIX_PRIORITY_LAST, 0, 1);
-
if (*md_startfile_prefix)
add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix,
"GCC", PREFIX_PRIORITY_LAST, 0, 1);