Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] toolchain: detect external glibc in symlinked /lib
Date: Sun, 3 Sep 2017 14:49:25 +0200	[thread overview]
Message-ID: <20170903124925.GA2786@scaer> (raw)
In-Reply-To: <20170903142517.088907a8@windsurf.lan>

Thomas, All,

On 2017-09-03 14:25 +0200, Thomas Petazzoni spake thusly:
> On Sun, 3 Sep 2017 22:22:24 +1000, Cam Hutchison wrote:
> > > > When building a toolchain with buildroot and a merged /usr, /lib is
> > > > a symlink to usr/lib. This is copied from the target to the staging
> > > > directory, and then to the sysroot, and the ultimate location of the
> > > > required files is in /usr/lib in the sysroot.  
[--SNIP--]
> In fact, I would first like to understand what you meant :)
> 
> Maybe what you meant is that: when the Buildroot toolchain is built
> with a merged /usr, lib is a symlink to usr/lib in the staging
> directory. Therefore, the resulting toolchain has such a symlink in its
> sysroot, and such a symlink is present in the staging directory when
> the toolchain is re-used as an external toolchain. The consequence is
> that the dynamic linker is not located in /lib, but in /usr/lib, even
> though it is accessible from /lib from a symlink.

This is exactly the problem that Cam is trying to solve here.

Cam created a toolchain with Buildroot and a merged /usr. He then
re-uses that as an external toolchain.

Cam, what about the fiollowing:

    toolchain: detect external glibc in merged /usr

    When using an external toolchain that was built with Buildroot and a
    merged /usr., the dynamic linker is actually in /usr/lib.

    But the check_glibc macro only limits the depth it is looking for
    the dynamic linker, anf misses it when it is in /usr/lib because it
    is too deep.

    WE could fix that in two ways: increase the depth in which we look
    for it, or follow symlinks. We choose the second solution.

    Signed-off-by: you
    Cc: Thomas P.
    Cc: Thomas DS.
    Cc: Me

What do you all think about this? ;-)

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.  |
'------------------------------^-------^------------------^--------------------'

  parent reply	other threads:[~2017-09-03 12:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-03 12:08 [Buildroot] [PATCH 1/1] toolchain: detect external glibc in symlinked /lib Cam Hutchison
2017-09-03 12:17 ` Thomas Petazzoni
2017-09-03 12:22   ` Cam Hutchison
2017-09-03 12:25     ` Thomas Petazzoni
2017-09-03 12:30       ` Cam Hutchison
2017-09-03 12:49       ` Yann E. MORIN [this message]
2017-09-03 20:30         ` Cam Hutchison

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=20170903124925.GA2786@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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