summaryrefslogtreecommitdiff
path: root/gcc/c-incpath.c
diff options
context:
space:
mode:
authorcarlos <carlos@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-20 22:34:14 +0000
committercarlos <carlos@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-20 22:34:14 +0000
commit44753b5af6138f98260a844f11f88969abc33c05 (patch)
tree9af19fb270ecd93480cfc319ab384c69413c926d /gcc/c-incpath.c
parent56177c97a4cf66b8ecb93403acfcff11be437ef5 (diff)
downloadgcc-44753b5af6138f98260a844f11f88969abc33c05.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120088 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-incpath.c')
-rw-r--r--gcc/c-incpath.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/c-incpath.c b/gcc/c-incpath.c
index 2c5ac6db89f..fe863d52b6e 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);