From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23858 invoked by alias); 25 Mar 2012 14:37:17 -0000 Received: (qmail 23697 invoked by uid 22791); 25 Mar 2012 14:37:15 -0000 X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_20,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtp03.smtpout.orange.fr (HELO smtp.smtpout.orange.fr) (80.12.242.125) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 25 Mar 2012 14:37:02 +0000 Received: from treguer.localnet ([90.32.16.83]) by mwinf5d50 with ME id pqd01i0051nXhcS03qd040; Sun, 25 Mar 2012 16:37:01 +0200 From: "Yann E. MORIN" To: crossgcc@sourceware.org Subject: Re: GCC support libraries and sysroot Date: Sun, 25 Mar 2012 14:37:00 -0000 User-Agent: KMail/1.13.5 (Linux/3.3.0-treguer; KDE/4.4.5; x86_64; ; ) Cc: Michael Hope References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203251636.59673.yann.morin.1998@free.fr> Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00054.txt.bz2 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