public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Martin Guy <martinwguy@gmail.com>
To: gabx <arnaud.gaboury@gmail.com>
Cc: crossgcc@sourceware.org
Subject: Re: gcc CXX_FLAGS
Date: Wed, 29 May 2013 07:23:00 -0000	[thread overview]
Message-ID: <CAL4-wQpjBs1DD7SjtFYGzGtTRvWa4Ar-cc-J5k9msDmNq1mW7Q@mail.gmail.com> (raw)
In-Reply-To: <CAK1hC9tbFRteR9ze8GPf5RMFrAohagy9iuhHZimcVrRr-hk3TQ@mail.gmail.com>

On 28 May 2013 19:31, gabx <arnaud.gaboury@gmail.com> 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

  reply	other threads:[~2013-05-29  7:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-25 14:01 gabx
2013-05-25 18:43 ` Anthony Foiani
2013-05-25 22:59   ` gabx
2013-05-25 23:07     ` Yann E. MORIN
2013-05-26  1:42     ` Anthony Foiani
2013-05-26 12:51       ` Martin Guy
2013-05-28 17:31         ` gabx
2013-05-29  7:23           ` Martin Guy [this message]
2013-05-29  9:02             ` gabx

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL4-wQpjBs1DD7SjtFYGzGtTRvWa4Ar-cc-J5k9msDmNq1mW7Q@mail.gmail.com \
    --to=martinwguy@gmail.com \
    --cc=arnaud.gaboury@gmail.com \
    --cc=crossgcc@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).