From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1939 invoked by alias); 10 Apr 2010 21:35:29 -0000 Received: (qmail 1928 invoked by uid 22791); 10 Apr 2010 21:35:28 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB X-Spam-Check-By: sourceware.org Received: from smtp28.orange.fr (HELO smtp28.orange.fr) (80.12.242.101) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Apr 2010 21:35:22 +0000 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2822.orange.fr (SMTP Server) with ESMTP id 6647B7000395; Sat, 10 Apr 2010 23:35:20 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2822.orange.fr (SMTP Server) with ESMTP id 59A9070003F3; Sat, 10 Apr 2010 23:35:20 +0200 (CEST) Received: from [192.168.127.10] (ARennes-256-1-137-34.w90-32.abo.wanadoo.fr [90.32.248.34]) by mwinf2822.orange.fr (SMTP Server) with ESMTP id 39AFB7000395; Sat, 10 Apr 2010 23:35:20 +0200 (CEST) From: "Yann E. MORIN" To: crossgcc@sourceware.org Subject: Re: Building a static toolchain ? Date: Sat, 10 Apr 2010 21:35:00 -0000 User-Agent: KMail/1.9.9 Cc: Arnaud Lacombe References: <201004101920.29990.yann.morin.1998@anciens.enib.fr> <201004101928.17286.yann.morin.1998@anciens.enib.fr> In-Reply-To: <201004101928.17286.yann.morin.1998@anciens.enib.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201004102335.19635.yann.morin.1998@anciens.enib.fr> X-IsSubscribed: yes 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: 2010-04/txt/msg00076.txt.bz2 Arnaud, All, On Saturday 10 April 2010 19:28:16 Yann E. MORIN wrote: > On Saturday 10 April 2010 19:20:29 Yann E. MORIN wrote: > > What I thought. But cloog is built with: > > --with-host-libstdcxx='-Wl,-Bstatic,-lstdc++,-Bdynamic -lm' > > I have tried to manually link the sucker, but to no avail. I have to > > understand why on earth libtool passes the above link flags *before* the > > other libs. It must be *after*, or the libstdc++ will not be parsed for > > required symbols. > Yes, that was the issue. Passing -Wl,-Bstatic,blabla after all the other > libraries fixes it. > Sigh. I hate libtool. Period. OK, that's because libtool reoders the arguments list, so that all libraries ( args staring with -l ) comes after all library paths ( args starting with -L ). And it does so by moving all non -l arguments to the beginning of the list, and all -l arguments at the end of the list. Unfortunately, -Wl,-Bstatic,-lstdc++,-Bdynamic does not start with -l, so it is moved before all -l args, and thus libstdc++ is scanned before any of its members is needed, so it does not get linked. Sigh. Passing LDFLAGS=-lstdc++ seems to be enough, though. > Forget about it, I now have a hammer, and a nail to... nail. Done. We might be able to get rid of the wrapper very shortly, I hope. 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