From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22698 invoked by alias); 25 May 2013 22:59:33 -0000 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 Received: (qmail 22653 invoked by uid 89); 25 May 2013 22:59:26 -0000 X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,SPF_NEUTRAL,TW_SG autolearn=no version=3.3.1 Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sat, 25 May 2013 22:59:22 +0000 Received: from tom.nabble.com ([192.168.236.105]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1UgNQm-0005BQ-Ju for crossgcc@sourceware.org; Sat, 25 May 2013 15:59:20 -0700 Date: Sat, 25 May 2013 22:59:00 -0000 From: gabx To: crossgcc@sourceware.org Message-ID: In-Reply-To: References: <1369490491980-233249.post@n7.nabble.com> Subject: Re: gcc CXX_FLAGS MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00050.txt.bz2 > Dear all, > > I am working since many weeks now on a armv7-a toolchain with gcc 4.8. It > builds with no issue since a while. > I am now trying to pass some optimization CXX_FLAGS. > > When I enable the -03 flag for example, I write this in my .config: > > # gcc other options > # > CT_CC_ENABLE_CXX_FLAGS="-O3". > > It builds fine. Now I am wondering if I have to pass again this flag when I > use this toolchain to build, let's say, android ROM. > Shall I : > $ make -03 > > or as this flag has been activated when building the toolchain I do not need > to pass it again ? > > In short, $ make or $ make -03 ? > > Thank you for help On Sat, May 25, 2013 at 8:43 PM, Anthony Foiani [via Sourceware.org] < ml-node+s1504n233259h8@n7.nabble.com> wrote: > Arnaud -- > > Most makefiles are set up so you can specify flags for that > compilation on the make command line. You probably want to do > something like this: > > make CFLAGS=-O3 CXXFLAGS=-O3 > > If you are passing multiple flags, you'll need to quote those values: > > make CFLAGS="-O3 -g" ... > > (If you try just: > > make -O3 > > then 'make' will think you're trying to pass some flag "-O" to make > itself, not to the compilers invoked by make.) > > Best regards, > Anthony Foiani > > Anthony, thank you for your answer. In fact I was doing wrong. Now I am still wondering if I need to pass again the flags when I build the android ROM or Kernel. here is part of my crosstool .config : [DEBUG] CT_CC_ENABLE_CXX_FLAGS="-O3 -fstrict-aliasing -Wdouble-promotion -Wno-error -Wunsafe-loop-optimizations -funsafe-loop-optimizations -floop-nest-optimize -floop-parallelize-all -fsanitize=thread -fsanitize=address" [DEBUG] CT_CC_CORE_EXTRA_CONFIG_ARRAY="--with-float=hard --with-mfpu=neon --enable-tls" [DEBUG] CT_CC_EXTRA_CONFIG_ARRAY="--with-float=hard --with-mfpu=neon --enable-tls" Once the toolchain is built and used to build Android, shall I pass again all these flags, or are they in fact already activated in the arm-cortexa9_neon-linux-gnueabihf-gcc ? I guess I can $ export CFLAGS="..........." before building Android ? > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://sourceware-org.1504.n7.nabble.com/gcc-CXX-FLAGS-tp233249p233259.html > To start a new topic under Sourceware - crossgcc list, email > ml-node+s1504n151058h77@n7.nabble.com > To unsubscribe from Sourceware - crossgcc list, click here > . > NAML > -- View this message in context: http://sourceware-org.1504.n7.nabble.com/gcc-CXX-FLAGS-tp233249p233265.html Sent from the Sourceware - crossgcc list mailing list archive at Nabble.com. -- For unsubscribe information see http://sourceware.org/lists.html#faq