From patchwork Wed Nov 14 01:06:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Hope X-Patchwork-Id: 198808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 7BF8F2C0089 for ; Wed, 14 Nov 2012 12:06:50 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sourceware.org; s=default; x=1353460010; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:In-Reply-To:References:From:Date: Message-ID:Subject:To:Cc:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Subscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=tRy6888h+KGbYCebIahAzRg0WdQ=; b=Q1mcsuGo/0elzTXlOg0moAOYHmRpti54PNxaLn6WnXiibVjuJenN8gIOQTcjWF CqP06hq5Flm3Ei7LXRZV8Zx1dtXL1qNzSHvO26dqRpfnS6XFqpbli7gZoUbwDBmz mi1QwDlO3f/W5dJnpLVe65ng9x7i3LUecU992nGpiNJPs= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=sourceware.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:MIME-Version:Received:In-Reply-To:References:From:Date:Message-ID:Subject:To:Cc:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=L3XUfZ/f38AAWTxhFOKxhEtdp+sFqBMSUmgsyUGzETZ+KZcKXZmgL7U5fq2iDp 96lGnRv/cvCZpy6PskTX5CbG6iltlogMbVxd5KwbG+vfutFy9SWzdIuHTflqFt7C tggbnt6/yVXuqlELyEGUmchncQZSqlMLnLXKHJwaLAiQY=; Received: (qmail 9508 invoked by alias); 14 Nov 2012 01:06:46 -0000 Received: (qmail 9499 invoked by uid 22791); 14 Nov 2012 01:06:45 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, URIBL_DBL_SPAM X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Nov 2012 01:06:39 +0000 Received: by mail-vb0-f41.google.com with SMTP id v13so1732749vbk.0 for ; Tue, 13 Nov 2012 17:06:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=pJ5QYCcVViqTb/Wm5VsTTO9biejyGboEDN4pSg9ZttQ=; b=XwMBCSHdiPbyKcxgf8zQvWfvmcRxVNQJzLGBUX/n7gybLAwsWfqgVPqOpyQZ2PlcND AfymsSmYOwhN7V9QQyHK5yBDRNwHCkjjDyZ4eephGCgCcciY3Z7XlOc3blv0ns/3C/mk 51xX7yrx70qxxGfWaiNjvj21nJCX3yHw3YOSpGuUT/QQqVarcfOvHcLLctHECd4kG2YM fgLzLGIN6SI0061nDzcA/SBOvZYGQt4+/DOgRihkkLZT/szjHAnZ7VyQNr5KBNfsKEjK 5ILV3ISq5jAoHWdF5jwV0y5P9yOrDcPDKOfKTb95oH8joUGVWN1Dag42BWm4Y3WJKfrQ kyyw== Received: by 10.52.175.200 with SMTP id cc8mr248993vdc.21.1352855198366; Tue, 13 Nov 2012 17:06:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.58.64.106 with HTTP; Tue, 13 Nov 2012 17:06:18 -0800 (PST) In-Reply-To: <201211140130.30017.yann.morin.1998@free.fr> References: <201211140130.30017.yann.morin.1998@free.fr> From: Michael Hope Date: Wed, 14 Nov 2012 14:06:18 +1300 Message-ID: Subject: Re: GCC being built without optimisation To: "Yann E. MORIN" Cc: crossgcc@sourceware.org X-Gm-Message-State: ALoCoQmdBYI335eoWhYxxicpzPRagYUSLoAJMK++49IhFHxqXpoH2aXuQCDiBo42kKfNOfcOys5l X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org On 14 November 2012 13:30, Yann E. MORIN wrote: > Michael, All, > > On Wednesday 14 November 2012 Michael Hope wrote: >> Hi Yann, all. Someone recently spotted that the crosstool-NG based >> Linaro builds took twice as long to compile code than the Ubuntu cross >> compiler. > [--SNIP--] >> It turns out that GCC and the libraries are being built without >> optimisation. > [--SNIP--] >> scripts: set default CFLAGS to optimise. >> >> Our extra CFLAGS override the product defaults, meaning that we build >> without optimisation or debug. Be explicit and add these in. > > Can I have your SoB-line for that patch? scripts: set default CFLAGS to optimise. The extra CFLAGS override the product defaults, causing the product to be built without optimisation or debug. Be explicit and add these in. Signed-off-by: Michael Hope >> diff: >> === modified file 'scripts/crosstool-NG.sh.in' >> --- scripts/crosstool-NG.sh.in 2012-03-23 05:22:58 +0000 >> +++ scripts/crosstool-NG.sh.in 2012-11-13 23:50:41 +0000 >> @@ -488,7 +488,7 @@ >> fi >> >> # Help gcc >> - CT_CFLAGS_FOR_HOST= >> + CT_CFLAGS_FOR_HOST="-O2 -g" >> [ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST+=" -pipe" >> CT_CFLAGS_FOR_HOST+=" ${CT_EXTRA_FLAGS_FOR_HOST}" > > Whoohoo! A one-liner that makes it twice faster! Love it :-) > I'll look at it tomorrow. > > Also, I'd like to review your crosstool-NG fork, to see what we can bring > back upstream, so you get less to maintain in your tree, so it makes it > easier for you to follow upstream. That item's been basically sitting quite > high on my TODO-list, but time being sparse, I always post-poned it. I'll > try to get to it during this cycle. It's our fault for forking. Most of the stuff is Linaro specific (samples, outer build scripts) and the remainder is hacks. We're going to rebase as part of upstreaming the aarch64 support to you. I was reluctant to post it as we needed to pick random binutils and other versions, but the recent Microblaze work has added all we need. FYI, we track things through blueprints and the aarch64 upstreaming is logged at: https://launchpad.net/linaro-toolchain-binaries/+spec/upstream-crosstool-ng-aarch64-support -- Michael > Do you think you could come up with a list of features / changesets you have > in your tree that would be suitable for upstreaming? > > Also, I'm not used to bazaar. Can you point me to a quick cheat-sheet? > > Regards, > Yann E. MORIN, sleepy at 01:27 AM... Zzzz.... > > -- > .-----------------.--------------------.------------------.--------------------. > | 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 diff -r cfb1783d4cb8 -r d7c10d1bc152 scripts/crosstool-NG.sh.in --- a/scripts/crosstool-NG.sh.in Fri Nov 09 18:22:31 2012 +0100 +++ b/scripts/crosstool-NG.sh.in Wed Nov 14 13:48:18 2012 +1300 @@ -494,7 +494,9 @@ fi # Help gcc - CT_CFLAGS_FOR_HOST= + # Explicitly optimise, else the lines below will overide the + # package's default optimisation flags + CT_CFLAGS_FOR_HOST="-O2 -g" [ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST+=" -pipe" CT_CFLAGS_FOR_HOST+=" ${CT_EXTRA_FLAGS_FOR_HOST}"