diff options
author | Joseph Myers <joseph@codesourcery.com> | 2006-04-28 12:17:00 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2006-04-28 12:17:00 +0000 |
commit | 3ae1ab501c7f3c9023ec0b5303a19e3a62751cbf (patch) | |
tree | 30d1061ad4a695b0ee2884884bac7c3d1fe8ffe0 | |
parent | 1463b1c4f91cb6dcb4b61543e04053f1152bdb6d (diff) |
* gcc/gcc.c (process_command): Add program name to GCC_EXEC_PREFIXcsl/morpho/4.1-4
value before passing to make_relative_prefix.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@113346 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | ChangeLog.csl | 5 | ||||
-rw-r--r-- | gcc/gcc.c | 14 |
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl index 888d914d331..207d90543c9 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,8 @@ +2006-04-28 Joseph S. Myers <joseph@codesourcery.com> + + * gcc/gcc.c (process_command): Add program name to GCC_EXEC_PREFIX + value before passing to make_relative_prefix. + 2006-04-26 Joseph Myers <joseph@codesourcery.com> From Bugzilla: diff --git a/gcc/gcc.c b/gcc/gcc.c index b3b781a6ee5..383ee0ddcaa 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3254,9 +3254,17 @@ process_command (int argc, const char **argv) putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL)); } else - gcc_libexec_prefix = make_relative_prefix (gcc_exec_prefix, - standard_exec_prefix, - standard_libexec_prefix); + { + /* make_relative_prefix requires a program name, but + GCC_EXEC_PREFIX is typically a directory name with a trailing + / (which is ignored by make_relative_prefix), so append a + program name. */ + char *tmp_prefix = concat (gcc_exec_prefix, "gcc", NULL); + gcc_libexec_prefix = make_relative_prefix (tmp_prefix, + standard_exec_prefix, + standard_libexec_prefix); + free (tmp_prefix); + } #else #endif |