[PATCH] scripts/glibc-eglibc.sh-common: broken symlinks created for nested multilib

Yann E. MORIN yann.morin.1998@free.fr
Tue Sep 25 21:55:00 GMT 2012


David, All,

On Friday 21 September 2012 06:42:38 David Holsgrove wrote:
> # HG changeset patch
> # User David Holsgrove <david.holsgrove@xilinx.com>
> # Date 1348202094 -36000
> # Node ID 886f1bbadce3c2a5ea07a4a46ce140a5a04dc555
> # Parent  d9ae5974b0bd4f111c00b38a4edd6656bd1f0226
> scripts/glibc-eglibc.sh-common: broken symlinks created for nested multilib
> dirs

libc/glibc-eglibc: fix symlinks for nested multilib dirs

> glibc-eglibc.sh-common prepares a number of symlinks for use in building C
> Library, which is iterated through for each multilib combo, however there is a
> hardcoded number of backsteps in the symlink command which assumes the multi_dir
> is only 1 directory deep.
> 
> This means we are creating broken symlinks for nested multilib dirs, eg;
> 
>   gcc configured with these multilibs (besides the default):
>   -mxl-barrel-shift  -->  bs/
>   -mxl-barrel-shift -mno-xl-soft-mul  -->  bs/m/
>   -mxl-barrel-shift -mno-xl-soft-mul -mxl-multiply-high  -->  bs/m/mh/
> 
>   multi_dir=bs;      ln -sf "../lib/bs" "bs/lib"           <- Ok
>   multi_dir=bs/m;    ln -sf "../lib/bs/m" "bs/m/lib"       <- Broken
>   multi_dir=bs/m/mh; ln -sf "../lib/bs/m/mh" "bs/m/mh/lib" <- Broken
> 
> In the Final C Library step, we perform a "Fixing up multilib location" stage,
> which in each loop removes its temporary multi_dir - a problem with nested
> multilib dirs, as the first loop may be for 'bs' say, which will remove the
> 'bs' directory, and the nested dirs for bs/m, bs/m/mh along with it, before
> they have gone through their own do_libc_backend_once iteration.
> 
> The solution I propose is similar to how the build-libc-${libc_mode}
> directories are created - replacing '/' with '_' and having a flat structure
> for these temp multi_dirs

In theory, I have nothing serious against your patch. Except I don't know
how to test it. Care to share a defconfig (ct-ng defconfig), please?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list