From patchwork Tue Nov 13 23:57:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Hope X-Patchwork-Id: 198801 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 694CD2C0091 for ; Wed, 14 Nov 2012 10:58:14 +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=1353455894; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:From:Date:Message-ID:Subject:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Subscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=zVEM66U8fLa5BLICfxqE+e+cap4=; b=e/L/prZTyk4+5kb JY1FXUbgB3j3J2QboqxCprvIqbgCcwp12Z016goOrXiRdnVeW58FMYtLZpHE4Dx8 /rsyKeLCnRhv5mKiD6pcrOuFr1nSKFdQcoc2JhWcRFqD0nQej3n3gN2HbiCpxmoX UIi1zvDo+RdQNUJwq7K68BOoGgfY= 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:From:Date:Message-ID:Subject:To: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=GGUamMeL4uAl4Pdj3Rr/o/S1oh/X66w1KGirMP30MDQ+ME4XaXisytrPpBYDKo aQUdVD05GbI9v9xCbALrVEmYQj6wn13ODtgDjb1VpBEILQLraVWhp2bP/kmH8m7g 3OgAA7BWtBTCvGvpTHx4aQnaiImOKYRFMlMRp/yne7hdc=; Received: (qmail 8659 invoked by alias); 13 Nov 2012 23:58:11 -0000 Received: (qmail 8649 invoked by uid 22791); 13 Nov 2012 23:58:11 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-vc0-f169.google.com (HELO mail-vc0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Nov 2012 23:58:05 +0000 Received: by mail-vc0-f169.google.com with SMTP id fl17so9503968vcb.0 for ; Tue, 13 Nov 2012 15:58:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :x-gm-message-state; bh=+hmAtAVd5Y9gXEBaAsdGfzF9anS/o/usjVnTQ6NZ3UA=; b=kw0vunxbGViundTRsd434z7/WD6+zJJnCi8xunh8tutgsmgsr09FxhKWDITPFREohl K1/mKbtQ3NwV1JNlxjMdXZvWB+sGBWrhRQ4vM8aUKAvV4NIWAZZPyXeJdEtfa21IRk8r 1CsFHXhAggUYqfPfJGp9eYr3VsyK+jkK0ajVTFUydgCruqSi2tJk16XjgcsCEehYAtQh tMZny6wCqCh3J60OIelIMhMnI4eDFUeL5afGdeuclE31EvFo2C+fdFX8zJP6Hnw42MI2 D3NG1kekiNVbrvSYMdWXbO8fugP5Y+nHPaAIo5gP26M3tapCotkGTzcIK4vfpCWOG1WQ oO0w== Received: by 10.58.15.72 with SMTP id v8mr29501823vec.55.1352851084150; Tue, 13 Nov 2012 15:58:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.58.64.106 with HTTP; Tue, 13 Nov 2012 15:57:43 -0800 (PST) From: Michael Hope Date: Wed, 14 Nov 2012 12:57:43 +1300 Message-ID: Subject: GCC being built without optimisation To: crossgcc@sourceware.org X-Gm-Message-State: ALoCoQkW3tYisDuXy/wjemV5D2L31gofNwN07qXwPT8XgfZgwykUQEsjLXJDaZFWk9sSzqbbr7+e 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 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. The thread starts here: http://lists.linaro.org/pipermail/linaro-toolchain/2012-October/002907.html and continues at: http://lists.linaro.org/pipermail/linaro-toolchain/2012-November/002922.html http://lists.linaro.org/pipermail/linaro-toolchain/2012-November/002932.html It turns out that GCC and the libraries are being built without optimisation. scripts/crosstool-NG.sh.in has: CT_CFLAGS_FOR_HOST= [ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST+=" -pipe" CT_CFLAGS_FOR_HOST+=" ${CT_EXTRA_FLAGS_FOR_HOST}" Setting USE_PIPES or EXTRA_FLAGS turns into passing CFLAGS to configure turns into overriding the package default of -O2 -g. This is my hack around: 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. diff: -- Michael --- For unsubscribe information see http://sourceware.org/lists.html#faq === 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}"