aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1995-03-29 15:10:28 -0800
committerJim Wilson <wilson@gcc.gnu.org>1995-03-29 15:10:28 -0800
commite8601ecbcb174e3b981248f6c955758c2e7075a3 (patch)
tree05fef6ad60e6852433ecbe12e7bd6a2e3e3c52a0 /gcc
parent2f99f437c1c9d56154c2bfad61604c644fad2558 (diff)
downloadgcc-e8601ecbcb174e3b981248f6c955758c2e7075a3.zip
gcc-e8601ecbcb174e3b981248f6c955758c2e7075a3.tar.gz
gcc-e8601ecbcb174e3b981248f6c955758c2e7075a3.tar.bz2
(process_command): Delete code modifying gcc_exec_prefix.
(main): Put it here after last use of gcc_exec_prefix. For cross compiler, set startfile_prefixes if gcc_exec_prefix is set and standard_startfile_prefix is a relative path. From-SVN: r9253
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gcc.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 5fd2b9e..4883125 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3048,19 +3048,6 @@ process_command (argc, argv)
switches[n_switches].part1 = 0;
infiles[n_infiles].name = 0;
-
- /* If we have a GCC_EXEC_PREFIX envvar, modify it for cpp's sake. */
- if (gcc_exec_prefix)
- {
- temp = (char *) xmalloc (strlen (gcc_exec_prefix) + strlen (spec_version)
- + strlen (spec_machine) + 3);
- strcpy (temp, gcc_exec_prefix);
- strcat (temp, spec_machine);
- strcat (temp, dir_separator_str);
- strcat (temp, spec_version);
- strcat (temp, dir_separator_str);
- gcc_exec_prefix = temp;
- }
}
/* Process a spec string, accumulating and running commands. */
@@ -4447,6 +4434,27 @@ main (argc, argv)
add_prefix (&startfile_prefixes, "./", 0, 1, NULL_PTR);
#endif
}
+ else
+ {
+ if (*standard_startfile_prefix != DIR_SEPARATOR && gcc_exec_prefix)
+ add_prefix (&startfile_prefixes,
+ concat (gcc_exec_prefix, standard_startfile_prefix),
+ 0, 0, NULL_PTR);
+ }
+
+ /* If we have a GCC_EXEC_PREFIX envvar, modify it for cpp's sake. */
+ if (gcc_exec_prefix)
+ {
+ char * temp = (char *) xmalloc (strlen (gcc_exec_prefix)
+ + strlen (spec_version)
+ + strlen (spec_machine) + 3);
+ strcpy (temp, gcc_exec_prefix);
+ strcat (temp, spec_machine);
+ strcat (temp, dir_separator_str);
+ strcat (temp, spec_version);
+ strcat (temp, dir_separator_str);
+ gcc_exec_prefix = temp;
+ }
/* Now we have the specs.
Set the `valid' bits for switches that match anything in any spec. */