From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20423 invoked by alias); 26 Dec 2011 16:57:04 -0000 Received: (qmail 20414 invoked by uid 22791); 26 Dec 2011 16:57:03 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtp02.smtpout.orange.fr (HELO smtp.smtpout.orange.fr) (80.12.242.124) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Dec 2011 16:56:50 +0000 Received: from treguer.localnet ([90.32.2.129]) by mwinf5d56 with ME id Dswn1i0042n0NGy03swnco; Mon, 26 Dec 2011 17:56:48 +0100 From: "Yann E. MORIN" To: crossgcc@sourceware.org Subject: Re: [PATCH 1/1] Add multilib build support for libc target. Libc is build -times in seperate sysroot directories. In a last step links are created to reflect the expected multilib structure. Date: Mon, 26 Dec 2011 16:57:00 -0000 User-Agent: KMail/1.13.5 (Linux/3.1.6-treguer; KDE/4.4.5; x86_64; ; ) Cc: "konrad.gaisler" References: <1321267079-14623-1-git-send-email-konrad@gaisler.com> <201112240022.18409.yann.morin.1998@anciens.enib.fr> <4EF6400F.8060400@gaisler.com> In-Reply-To: <4EF6400F.8060400@gaisler.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201112261756.46706.yann.morin.1998@anciens.enib.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: 2011-12/txt/msg00079.txt.bz2 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/. 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... [--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. -- .-----------------.--------------------.------------------.--------------------. | 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