# DP: Revert Linaro local patch to build armv4t multilibs. Index: b/src/gcc/incpath.c =================================================================== --- a/src/gcc/incpath.c +++ b/src/gcc/incpath.c @@ -148,22 +148,20 @@ if (!filename_ncmp (p->fname, cpp_GCC_INCLUDE_DIR, len)) { char *str = concat (iprefix, p->fname + len, NULL); - if (p->multilib && imultilib) - { - str = reconcat (str, str, dir_separator_str, - imultilib, NULL); - add_path (str, SYSTEM, p->cxx_aware, false); - } - else - add_path (str, SYSTEM, p->cxx_aware, false); - - if (p->multilib && imultiarch) + if (p->multilib == 1 && imultilib) + str = reconcat (str, str, dir_separator_str, + imultilib, NULL); + else if (p->multilib == 2) { - char *str = concat (iprefix, p->fname + len, NULL); + if (!imultiarch) + { + free (str); + continue; + } str = reconcat (str, str, dir_separator_str, imultiarch, NULL); - add_path (str, SYSTEM, p->cxx_aware, false); } + add_path (str, SYSTEM, p->cxx_aware, false); } } } @@ -173,7 +171,7 @@ { if (!p->cplusplus || cxx_stdinc) { - char *str, *str2; + char *str; /* Should this directory start with the sysroot? */ if (sysroot && p->add_sysroot) @@ -217,20 +215,19 @@ else str = update_path (p->fname, p->component); - str2 = xstrdup(str); - if (p->multilib && imultilib) + if (p->multilib == 1 && imultilib) + str = reconcat (str, str, dir_separator_str, imultilib, NULL); + else if (p->multilib == 2) { - str = reconcat (str, str, dir_separator_str, imultilib, NULL); - add_path (str, SYSTEM, p->cxx_aware, false); + if (!imultiarch) + { + free (str); + continue; + } + str = reconcat (str, str, dir_separator_str, imultiarch, NULL); } - else - add_path (str, SYSTEM, p->cxx_aware, false); - if (p->multilib && imultiarch) - { - str2 = reconcat (str2, str2, dir_separator_str, imultiarch, NULL); - add_path (str2, SYSTEM, p->cxx_aware, false); - } + add_path (str, SYSTEM, p->cxx_aware, false); } } } Index: b/src/gcc/gcc.c =================================================================== --- a/src/gcc/gcc.c +++ b/src/gcc/gcc.c @@ -2227,7 +2227,7 @@ } /* Now try the multiarch path. */ - if (!skip_multi_dir && !multi_dir + if (!skip_multi_dir && !pl->require_machine_suffix && multiarch_dir) { memcpy (path + len, multiarch_suffix, multiarch_len + 1); @@ -2263,16 +2263,6 @@ if (ret) break; } - - /* Now try the multiarch path. */ - if (!skip_multi_dir - && !pl->require_machine_suffix && multiarch_dir) - { - memcpy (path + len, multiarch_suffix, multiarch_len + 1); - ret = callback (path, callback_info); - if (ret) - break; - } } if (pl) break; @@ -7672,21 +7662,6 @@ ++p; } - if (first) - { - if (this_path_len > 3 - && this_path[0] == '.' - && this_path[1] == ':' - && this_path[2] == ':') - { - char *new_multiarch_dir = XNEWVEC (char, this_path_len + 1); - - strncpy (new_multiarch_dir, this_path, this_path_len); - new_multiarch_dir[this_path_len] = '\0'; - multiarch_dir = &new_multiarch_dir[3]; - } - } - if (ok && first) { if (this_path_len != 1 Index: b/src/gcc/ChangeLog.linaro =================================================================== --- a/src/gcc/ChangeLog.linaro +++ b/src/gcc/ChangeLog.linaro @@ -312,14 +312,6 @@ GCC Linaro 4.8-2014.01 released. * LINARO-VERSION: Update. -2014-01-16 Zhenqiang Chen - - Linaro local patch for armv4t multilib support. - * gcc/config/arm/t-mlibs: New file. - * config.gcc: Add t-mlibs. - * incpath.c (add_standard_paths): Try multilib path first. - * gcc.c (for_each_path): Likewise. - 2013-12-21 Christophe Lyon * LINARO-VERSION: Bump version. Index: b/src/gcc/config.gcc =================================================================== --- a/src/gcc/config.gcc +++ b/src/gcc/config.gcc @@ -878,7 +878,7 @@ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ;; esac - tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi arm/t-mlibs" + tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h vxworks-dummy.h arm/arm.h" # Define multilib configuration for arm-linux-androideabi. case ${target} in Index: b/src/gcc/config/arm/t-mlibs =================================================================== --- a/src/gcc/config/arm/t-mlibs +++ /dev/null @@ -1,21 +0,0 @@ -# A set of predefined MULTILIB for different ARM targets. -# Through the configure option --with-multilib-list, user can customize the -# final MULTILIB implementation. - -comma := , -space := -space += - -MULTILIB_OPTIONS = marm -MULTILIB_DIRNAMES = arm -MULTILIB_OPTIONS += march=armv4t -MULTILIB_DIRNAMES += armv4t -MULTILIB_OPTIONS += mfloat-abi=soft -MULTILIB_DIRNAMES += soft - -MULTILIB_EXCEPTIONS = - -MULTILIB_REQUIRED = marm/march=armv4t/mfloat-abi=soft - -MULTILIB_OSDIRNAMES = marm/march.armv4t/mfloat-abi.soft=!arm-linux-gnueabi -