This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc CXX_FLAGS


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]