summaryrefslogtreecommitdiff
path: root/gcc/incpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/incpath.c')
-rw-r--r--gcc/incpath.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/incpath.c b/gcc/incpath.c
index 6693bf52450..efcd2c75e57 100644
--- a/gcc/incpath.c
+++ b/gcc/incpath.c
@@ -150,8 +150,14 @@ add_standard_paths (const char *sysroot, const char *iprefix,
if (!filename_ncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
{
char *str = concat (iprefix, p->fname + len, NULL);
- if (p->multilib && imultilib)
+ if (p->multilib == 1 && imultilib)
str = concat (str, dir_separator_str, imultilib, NULL);
+ else if (p->multilib == 2)
+ {
+ if (!imultiarch)
+ continue;
+ str = concat (str, dir_separator_str, imultiarch, NULL);
+ }
add_path (str, SYSTEM, p->cxx_aware, false);
}
}
@@ -203,8 +209,14 @@ add_standard_paths (const char *sysroot, const char *iprefix,
else
str = update_path (p->fname, p->component);
- if (p->multilib && imultilib)
+ if (p->multilib == 1 && imultilib)
str = concat (str, dir_separator_str, imultilib, NULL);
+ else if (p->multilib == 2)
+ {
+ if (!imultiarch)
+ continue;
+ str = concat (str, dir_separator_str, imultiarch, NULL);
+ }
add_path (str, SYSTEM, p->cxx_aware, false);
}