public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: "konrad.gaisler" <konrad@gaisler.com>
To: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: crossgcc@sourceware.org
Subject: Re: [PATCH 1/1] Add multilib build support for libc target. Libc is build <multilib>-times in seperate sysroot directories. In a last step links are created to reflect the expected multilib structure.
Date: Mon, 26 Dec 2011 19:03:00 -0000	[thread overview]
Message-ID: <4EF8C533.9010104@gaisler.com> (raw)
In-Reply-To: <201112261756.46706.yann.morin.1998@anciens.enib.fr>

On 12/26/2011 05:56 PM, Yann E. MORIN wrote:
> Konrad, All,
>
> On Saturday 24 December 2011 22:11:43 konrad.gaisler wrote:
> [--SNIP--]
>> Is it possible that I missed something here? I think the
>> first patch I sent included this lines:
>>
>> do_libc_start_files() {
> [--SNIP--]
>> }
> Indeed, this was missing in your first and second patches:
>      http://sourceware.org/ml/crossgcc/2011-11/msg00029.html
>      http://sourceware.org/ml/crossgcc/2011-11/msg00040.html
>
> I now have a better understanding of what is required, and where it is.
> Thanks!
>
>> The point here is that glibc's install process adds the /lib at the
>> end, however the multilib structure must have /lib before:
>> /lib/<multilib>. Adding these symlinks before makes the
>> libraries end up in the right place. The "rearrange" stage
>> then fixes up the wrong paths.
>> Hope that makes it more clear.
> That I understood, the part that was misleading was the missing hunk
> in do_libc_start_files.
>
> [--SNIP--]
>>>> +                               cat ${CT_SYSROOT_DIR}/${d}/${l}.so_ori_i | ${sed} -r -e "s/\/lib\/$l/\/lib\/$bdir\/$l/g">   ${CT_SYSROOT_DIR}/${d}/${l}.so
>>> With this sed expression, you are not rewriting the dynamic linker path,
>>> which means a multilib variant still uses the default "ld.so".
>> You might be right. My particular toolchain doesnt care as for the
>> ld.so probably doesnt differ. It is also so that in the final running
>> embedded-system, there is only one libc set, that is copied back
>> to /usr/lib.
> That is something we'll have to check later: is it possible to have more
> than one multilib running on the target? I believe that would need some
> non-trivial hackery to work properly...
No, not multiple multilibs, but one of the multilibs subdirs. For example
for the leon-sparc toolchain, the toolchain would have 4 subdirs: ./ 
msoft-float/
mv8 and mv8/msoft-float.
on hardware without fpu but mv8 you would  only copy and use the
mv8/msoft-float multilib-subdir  at /usr/lib, the others will not be used.
-- Konrad

>
> [--SNIP--]
>>> In the end, it leaves everything in "sysroot/${dir}".
>>> It would make much more sense to carefully move the libs in their correct
>>> place, that is:
>>>    - move everything from "sysroot/${dir}/lib"     ->   "sysroot/lib/${dir}"
>>>                       and "sysroot/${dir}/usr/lib" ->   "sysroot/usr/lib/${dir}"
>>>    - get rid of "sysroot/${dir}" alltogether
>>>
>>> That's because gcc will search for things in "sysroot/{usr/,}lib/${dir}/",
>>> not in "sysroot/${dir}/{usr/,}lib/"
>> I'm not an insider to glibc, but maybe there is a option to
>> glibc's configure that create the right multilib structure.
>> Then all the hustle with moving and or creating symbolic
>> links  would be unneeded.
> Anyway, with the missing part you added above, it is more clear what you
> were trying to achieve.
>
> [--SNIP--]
>>> Floats are not the only thing we have to account for. For example, some
>>> archs can define big/little multilib. And most probably other stuff
>>> as well...
>> Sorry, I dont really know the requirements for other archs, I
>> come up with this because I require for sparc glibc the --with-fp=no.
> Yep, I was just saying ;-)
>
> Regards,
> Yann E. MORIN.
>


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

  reply	other threads:[~2011-12-26 19:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 10:45 Konrad Eisele
2011-12-12 23:07 ` [PATCH 1/1] Add multilib build support for libc target Yann E. MORIN
2011-12-13  8:38   ` Konrad Eisele
2011-12-13 17:15     ` Yann E. MORIN
2011-12-23 23:22 ` [PATCH 1/1] Add multilib build support for libc target. Libc is build <multilib>-times in seperate sysroot directories. In a last step links are created to reflect the expected multilib structure Yann E. MORIN
2011-12-24 21:10   ` konrad.gaisler
2011-12-26 16:57     ` Yann E. MORIN
2011-12-26 19:03       ` konrad.gaisler [this message]
2011-12-26 21:30         ` Yann E. MORIN
2011-12-26 17:29     ` Yann E. MORIN
2011-12-27 23:57   ` [PATCH 1/1] Add multilib build support [...] Yann E. MORIN
2011-12-31 18:01   ` Yann E. MORIN
2012-01-02  7:17     ` konrad.gaisler
  -- strict thread matches above, loose matches on Subject: below --
2011-11-14 10:38 simple multilib option Konrad Eisele
2011-11-14 10:55 ` [PATCH 1/1] Add multilib build support for libc target. Libc is build <multilib>-times in seperate sysroot directories. In a last step links are created to reflect the expected multilib structure Konrad Eisele

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EF8C533.9010104@gaisler.com \
    --to=konrad@gaisler.com \
    --cc=crossgcc@sourceware.org \
    --cc=yann.morin.1998@anciens.enib.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).