From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16008 invoked by alias); 29 May 2013 07:23: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 15996 invoked by uid 89); 29 May 2013 07:23:33 -0000 X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-bk0-f50.google.com (HELO mail-bk0-f50.google.com) (209.85.214.50) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 29 May 2013 07:23:31 +0000 Received: by mail-bk0-f50.google.com with SMTP id ik8so3736063bkc.37 for ; Wed, 29 May 2013 00:23:29 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.204.197.199 with SMTP id el7mr383335bkb.121.1369812209088; Wed, 29 May 2013 00:23:29 -0700 (PDT) Received: by 10.204.34.1 with HTTP; Wed, 29 May 2013 00:23:29 -0700 (PDT) In-Reply-To: References: <1369490491980-233249.post@n7.nabble.com> Date: Wed, 29 May 2013 07:23:00 -0000 Message-ID: Subject: Re: gcc CXX_FLAGS From: Martin Guy To: gabx Cc: crossgcc@sourceware.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2013-05/txt/msg00055.txt.bz2 On 28 May 2013 19:31, gabx wrote: > Thank you all for these details. It is my first deep journey in the > toolchain world, and as described on the ct-ng website, it can quickly > become a nightmare. Not a nightmare. It's just that compilers are complex. cross-compiler even more so. > I guess my CCX_FLAGS is then a non-sense : Not nonsense. You just have a super-fast cross-compiler that generates the same code as a regular one! > Which flags would you keep ? > My toolchain is aimed at building android kernel and rom for the Google LG > nexus 4. It depends what you are trying to achieve. If it's just a few % extra speed, try -Os or -O2/-O3. I think the manual says they optimise for minimum code size or maximum speed without/with large increases in compile time and code size, respectively. Beyond telling the compiler the instruction set it can use, which should correspond to the silicon in your target device, there is only a few % speed to be had by juggling with magic options, and which help and which make it worse or produce non-working code depend on the specific program you are compiling. M -- For unsubscribe information see http://sourceware.org/lists.html#faq