This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC support libraries and sysroot


Michael, All,

On Friday 23 March 2012 02:22:55 Michael Hope wrote:
> Hi there.  Why does crosstool-NG create a symlink from
> $tuple/$sysroot/lib to $tuple/lib?

Well... It does, yes. As for the exact reason, I'm not sure anymore...

First, the idea (in my convoluted brain) is that all target libraries
should be in the sysroot. After all, why would these libraries *not* be
in the sysroot? (I'm just questionning why gcc does not install these
libs there in the first place).

Second, there was no provision from the beginning for changing the sysroot
at all.

Third, crosstool-NG provides a script that ease populating the rootfs with
the libraries from the toolchain. For this, the script scans the rootfs for
missing libraries, and searches these libs in the sysroot. When found, it
copies the libraries to the rootfs, into the same relative path as they
were found in the sysroot.

Also, I seem to remember that in some conditions, the linker was not able
to find those "support libraries", unless they were present in the sysroot,
hence the symlink to be sure gcc would install those libs in a place the
linker would find them. It was a long time ago, so I'm not sure it still
applies now, or it was fixed as a side effect of another change...

> It causes GCC to install support
> libraries like libgcc_s.so into the sysroot instead of the default
> location which makes it tricky to replace the sysroot later.

What I don't really understand is why gcc does not install those libs
in the sysroot. Why are those libs so special that they are "support
libraries" and they do not deserve being installed in the sysroot?
Yes, that's a real question I do not have the answer to.

I do agree that this is not the "standard" layout that people would expect.
Those symlinks could eventually go away, but I'd like to understand the
reason for this layout first. After all, in the "crosstool-NG land", the
current layout works OK. ;-)

> For our binary builds we plan to supply a few different sysroots
> including a minimal libc, developer image with GTK and X, and a
> desktop image with a wide range of packages.  They'll come as tarballs
> and the intent is for people to delete the old $tuple/$sysroot and
> extract the new one in its place.  Currently this means that the
> support libraries will also get deleted.

Unless they are also present in your customised "sysroot".

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]