diff options
author | Joseph Myers <joseph@codesourcery.com> | 2006-04-28 13:15:36 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2006-04-28 13:15:36 +0100 |
commit | c7370b83758695690f4b4f1874b26130ae234d26 (patch) | |
tree | 2435331c718e3492f9de38305794f938289d1a5d /gcc/gcc.c | |
parent | bb6a0ee1c53d0f9b54f976017fa31aa2affd2240 (diff) | |
download | gcc-c7370b83758695690f4b4f1874b26130ae234d26.zip gcc-c7370b83758695690f4b4f1874b26130ae234d26.tar.gz gcc-c7370b83758695690f4b4f1874b26130ae234d26.tar.bz2 |
gcc.c (process_command): Add program name to GCC_EXEC_PREFIX value before passing to make_relative_prefix.
* gcc.c (process_command): Add program name to GCC_EXEC_PREFIX
value before passing to make_relative_prefix.
From-SVN: r113345
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -3376,9 +3376,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 |