[OE-core] [oe-core][PATCH 1/1] libgcc-common.inc: Fix symbol link to mutilib directories
Richard Purdie
richard.purdie at linuxfoundation.org
Mon Jan 23 08:15:39 UTC 2017
Hi,
On Mon, 2017-01-23 at 11:48 +0800, Yuanjie Huang wrote:
> From: Yuanjie Huang <yuanjie.huang at windriver.com>
>
> The multilib symbol links are created for gcc to locate libgcc files.
> Its source path contains TARGET_SYS of multilib libgcc. However, a
> multilib's TARGET_SYS is not generated correctly all the time now.
> For example,
>
> MACHINE = "qemumips64"
> DEFAULTTUNE = "mips64-n32"
> MULTILIBS = "multilib:lib64"
> DEFAULTTUNE_virtclass-multilib-lib64 = "mips64"
>
> In N32 libgcc, the symbol link for N64 is created as:
>
> 64 -> ../../../lib64/mips64-wrsmllib64-linux-gnun32/5.2.0/
>
> while it should be:
>
> 64 -> ../../../lib64/mips64-wrsmllib64-linux/5.2.0/
>
> This issue sometimes won't break compiler, since gcc also searches
> paths
> calculated with OS multilib directories beside multilib directories .
>
> This patch resolve the problem by reading TARGET_SYS from a localdata
> environment with proper multilib overrides.
>
> Signed-off-by: Yuanjie Huang <yuanjie.huang at windriver.com>
> ---
> meta/recipes-devtools/gcc/libgcc-common.inc | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc
> b/meta/recipes-devtools/gcc/libgcc-common.inc
> index a8a3f0d..69eeb26 100644
> --- a/meta/recipes-devtools/gcc/libgcc-common.inc
> +++ b/meta/recipes-devtools/gcc/libgcc-common.inc
> @@ -106,20 +106,19 @@ fakeroot python do_multilib_install() {
> bb.warn("Tune %s doesn't have a baselib set.
> Skipping..." % tune)
> continue
>
> - tune_arch = tune_parameters['arch']
> tune_bitness = tune_baselib.replace('lib', '')
> if not tune_bitness:
> tune_bitness = '32' # /lib => 32bit lib
>
> - tune_abiextension = tune_parameters['abiextension']
> - if tune_abiextension:
> - libcextension = '-gnu' + tune_abiextension
> - else:
> - libcextension = ''
> + localdata = bb.data.createCopy(d)
> + overrides = localdata.getVar("OVERRIDES", False) +
> ":virtclass-multilib-" + ml
> + localdata.setVar("OVERRIDES", overrides)
> + localdata.setVar("MLPREFIX", ml + "-")
> + bb.data.update_data(localdata)
> + ml_target_sys = localdata.getVar('TARGET_SYS', True) or ''
>
Please take advantage of:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a49ee524a933b433ea9c2e2be1bbf24909fcde77
Cheers,
Richard
More information about the Openembedded-core
mailing list