Commit c648ab8a by Richard Stallman

(process_command): When GCC_EXEC_PREFIX is defined and tooldir is relative...

(process_command): When GCC_EXEC_PREFIX is defined and
tooldir is relative, add it to search path in addition to standard
directory rather than instead of.

From-SVN: r4588
parent db25e492
......@@ -2352,36 +2352,47 @@ process_command (argc, argv)
n_infiles++;
}
/* Set up the search paths before we go looking for config files. */
/* These come before the md prefixes so that we will find gcc's subcommands
(such as cpp) rather than those of the host system. */
/* Use 2 as fourth arg meaning try just the machine as a suffix,
as well as trying the machine and the version. */
add_prefix (&exec_prefix, standard_exec_prefix, 0, 2, NULL_PTR);
add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 2, NULL_PTR);
add_prefix (&startfile_prefix, standard_exec_prefix, 0, 1, NULL_PTR);
add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 1, NULL_PTR);
tooldir_prefix = concat (tooldir_base_prefix, spec_machine, "/");
/* If tooldir is relative, base it on exec_prefix. A relative
tooldir lets us move the installed tree as a unit. */
tooldir lets us move the installed tree as a unit.
If GCC_EXEC_PREFIX is defined, then we want to add two relative
directories, so that we can search both the user specified directory
and the standard place. */
if (*tooldir_prefix != '/')
{
if (gcc_exec_prefix)
tooldir_prefix = concat (concat (gcc_exec_prefix, spec_machine, "/"),
{
char *gcc_exec_tooldir_prefix
= concat (concat (gcc_exec_prefix, spec_machine, "/"),
concat (spec_version, "/", tooldir_prefix),
"");
else
add_prefix (&exec_prefix, concat (gcc_exec_tooldir_prefix, "bin", "/"),
0, 0, NULL_PTR);
add_prefix (&startfile_prefix, concat (gcc_exec_tooldir_prefix, "lib", "/"),
0, 0, NULL_PTR);
}
tooldir_prefix = concat (concat (standard_exec_prefix, spec_machine, "/"),
concat (spec_version, "/", tooldir_prefix),
"");
}
/* Set up the search paths before we go looking for config files. */
/* These come before the md prefixes so that we will find gcc's subcommands
(such as cpp) rather than those of the host system. */
/* Use 2 as fourth arg meaning try just the machine as a suffix,
as well as trying the machine and the version. */
add_prefix (&exec_prefix, standard_exec_prefix, 0, 2, NULL_PTR);
add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 2, NULL_PTR);
add_prefix (&startfile_prefix, standard_exec_prefix, 0, 1, NULL_PTR);
add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 1, NULL_PTR);
add_prefix (&exec_prefix, concat (tooldir_prefix, "bin", "/"),
0, 0, NULL_PTR);
add_prefix (&startfile_prefix, concat (tooldir_prefix, "lib", "/"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment