diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-05 22:28:33 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-05 22:31:28 +0300 |
commit | 193236933b0f4ab91b1625b64e2187e2db4e0e8f (patch) | |
tree | e12769d7c76d8b0517d6de3d3c72189753d253ed /poky/meta/recipes-devtools/gcc/gcc-8.3/0028-Search-target-sysroot-gcc-version-specific-dirs-with.patch | |
parent | bd93df9478f2f56ffcbc8cb88f1709c735dcd85b (diff) | |
download | openbmc-193236933b0f4ab91b1625b64e2187e2db4e0e8f.tar.xz |
reset upstream subtrees to HEAD
Reset the following subtrees on HEAD:
poky: 8217b477a1(master)
meta-xilinx: 64aa3d35ae(master)
meta-openembedded: 0435c9e193(master)
meta-raspberrypi: 490a4441ac(master)
meta-security: cb6d1c85ee(master)
Squashed patches:
meta-phosphor: drop systemd 239 patches
meta-phosphor: mrw-api: use correct install path
Change-Id: I268e2646d9174ad305630c6bbd3fbc1a6105f43d
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/gcc/gcc-8.3/0028-Search-target-sysroot-gcc-version-specific-dirs-with.patch')
-rw-r--r-- | poky/meta/recipes-devtools/gcc/gcc-8.3/0028-Search-target-sysroot-gcc-version-specific-dirs-with.patch | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/gcc/gcc-8.3/0028-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/poky/meta/recipes-devtools/gcc/gcc-8.3/0028-Search-target-sysroot-gcc-version-specific-dirs-with.patch new file mode 100644 index 0000000000..1b25d7808b --- /dev/null +++ b/poky/meta/recipes-devtools/gcc/gcc-8.3/0028-Search-target-sysroot-gcc-version-specific-dirs-with.patch @@ -0,0 +1,102 @@ +From 62240d4c725ea0b43abfb901ddad90e83e29a25c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 7 Dec 2015 23:41:45 +0000 +Subject: [PATCH 28/40] Search target sysroot gcc version specific dirs with + multilib. + +We install the gcc libraries (such as crtbegin.p) into +<sysroot><libdir>/<target-sys>/5.2.0/ +which is a default search path for GCC (aka multi_suffix in the +code below). <target-sys> is 'machine' in gcc's terminology. We use +these directories so that multiple gcc versions could in theory +co-exist on target. + +We only want to build one gcc-cross-canadian per arch and have this work +for all multilibs. <target-sys> can be handled by mapping the multilib +<target-sys> to the one used by gcc-cross-canadian, e.g. +mips64-polkmllib32-linux +is symlinked to by mips64-poky-linux. + +The default gcc search path in the target sysroot for a "lib64" mutlilib +is: + +<sysroot>/lib32/mips64-poky-linux/5.2.0/ +<sysroot>/lib32/../lib64/ +<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/ +<sysroot>/usr/lib32/../lib64/ +<sysroot>/lib32/ +<sysroot>/usr/lib32/ + +which means that the lib32 crtbegin.o will be found and the lib64 ones +will not which leads to compiler failures. + +This patch injects a multilib version of that path first so the lib64 +binaries can be found first. With this change the search path becomes: + +<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/ +<sysroot>/lib32/mips64-poky-linux/5.2.0/ +<sysroot>/lib32/../lib64/ +<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/ +<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/ +<sysroot>/usr/lib32/../lib64/ +<sysroot>/lib32/ +<sysroot>/usr/lib32/ + +Upstream-Status: Pending +RP 2015/7/31 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + gcc/gcc.c | 29 ++++++++++++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index cd0c7fbe961..f6f3aa077c8 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -2527,7 +2527,7 @@ for_each_path (const struct path_prefix *paths, + if (path == NULL) + { + len = paths->max_len + extra_space + 1; +- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len); ++ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len); + path = XNEWVEC (char, len); + } + +@@ -2539,6 +2539,33 @@ for_each_path (const struct path_prefix *paths, + /* Look first in MACHINE/VERSION subdirectory. */ + if (!skip_multi_dir) + { ++ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir)) ++ { ++ const char *this_multi; ++ size_t this_multi_len; ++ ++ if (pl->os_multilib) ++ { ++ this_multi = multi_os_dir; ++ this_multi_len = multi_os_dir_len; ++ } ++ else ++ { ++ this_multi = multi_dir; ++ this_multi_len = multi_dir_len; ++ } ++ ++ /* Look in multilib MACHINE/VERSION subdirectory first */ ++ if (this_multi_len) ++ { ++ memcpy (path + len, this_multi, this_multi_len + 1); ++ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1); ++ ret = callback (path, callback_info); ++ if (ret) ++ break; ++ } ++ } ++ + memcpy (path + len, multi_suffix, suffix_len + 1); + ret = callback (path, callback_info); + if (ret) +-- +2.21.0 + |