diff options
author | Carlos O'Donell <carlos@codesourcery.com> | 2006-12-20 22:34:14 +0000 |
---|---|---|
committer | Carlos O'Donell <carlos@gcc.gnu.org> | 2006-12-20 22:34:14 +0000 |
commit | 0fd212e1bd1d3039be765ac7344c23b7b14e3585 (patch) | |
tree | 9af19fb270ecd93480cfc319ab384c69413c926d /gcc/c-incpath.c | |
parent | 2502ff194e0b5090ddae4c977d500ef8488a66a1 (diff) | |
download | gcc-0fd212e1bd1d3039be765ac7344c23b7b14e3585.zip gcc-0fd212e1bd1d3039be765ac7344c23b7b14e3585.tar.gz gcc-0fd212e1bd1d3039be765ac7344c23b7b14e3585.tar.bz2 |
re PR c/30242 (internal error in gcc break compilation)
gcc/
2006-12-20 Carlos O'Donell <carlos@codesourcery.com>
PR bootstrap/30242
* gcc/c-incpath.c (add_standard_paths): Only relocate paths that
begin with the configured prefix.
From-SVN: r120088
Diffstat (limited to 'gcc/c-incpath.c')
-rw-r--r-- | gcc/c-incpath.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/c-incpath.c b/gcc/c-incpath.c index 2c5ac6d..fe863d5 100644 --- a/gcc/c-incpath.c +++ b/gcc/c-incpath.c @@ -164,13 +164,12 @@ add_standard_paths (const char *sysroot, const char *iprefix, /* Should this directory start with the sysroot? */ if (sysroot && p->add_sysroot) str = concat (sysroot, p->fname, NULL); - else if (!p->add_sysroot && relocated) + else if (!p->add_sysroot && relocated + && strncmp (p->fname, cpp_PREFIX, cpp_PREFIX_len) == 0) { /* If the compiler is relocated, and this is a configured prefix relative path, then we use gcc_exec_prefix instead of the configured prefix. */ - gcc_assert (strncmp (p->fname, cpp_PREFIX, - cpp_PREFIX_len) == 0); str = concat (gcc_exec_prefix, p->fname + cpp_PREFIX_len, NULL); str = update_path (str, p->component); |