From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8894 invoked by alias); 2 Oct 2009 18:30:26 -0000 Received: (qmail 8882 invoked by uid 22791); 2 Oct 2009 18:30:25 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from static-213.50.114.146.addr.tdcsong.se (HELO mail.icomera.com) (213.50.114.146) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Oct 2009 18:30:19 +0000 Received: from [192.168.0.9] (80.229.223.150) by mail.icomera.com (192.168.64.17) with Microsoft SMTP Server (TLS) id 8.1.240.5; Fri, 2 Oct 2009 20:30:15 +0200 Message-ID: <4AC646B0.7010300@icomera.com> Date: Fri, 02 Oct 2009 18:30:00 -0000 From: Richard Strand User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: "Yann E. MORIN" CC: "crossgcc@sourceware.org" Subject: Re: Success building seemingly native toolchain References: <4AAFC7B0.20605@icomera.com> <200909282209.56222.yann.morin.1998@anciens.enib.fr> In-Reply-To: <200909282209.56222.yann.morin.1998@anciens.enib.fr> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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: 2009-10/txt/msg00001.txt.bz2 Yann E. MORIN wrote: >> I have now managed to successfully get this to build by setting >> CT_TARGET_CFLAGS="-O2". >> > > Ah! So far, CT_TARGET_CFLAGS is used only to build the C library (except > uClibc) and gcc. > > glibc (and eglibc) are known to mis-compile (or refuse to compile at > all) if -O is not specified in the CFLAGS. That's why it is currently > hard-coded in the scripts. It is not said in the gcc manual if -O > options are cumulative or if any -O option overrides any preceding > option; in the build scripts, -O is specified after CT_TARGET_CFLAGS. > > I don't know about gcc, but building the final compiler is the only > place that uses CT_TARGET_CFLAGS. I can't say how this is used by the > gcc makefiles. > > >> Is this a known workaround for the problem (I couldn't find anything on >> it), and does this work for everyone else? >> > > This is not a known workaround. But it might be as good as any thing > else. Was your toolchain fully working? If so, then we might consider > changing the -O into a -O2. > Setting -O2 fixes the build for eglibc as well which also seems to fail with -O (tested version 2.8). Regards, Richard Strand -- For unsubscribe information see http://sourceware.org/lists.html#faq