From: gabx <arnaud.gaboury@gmail.com>
To: crossgcc@sourceware.org
Subject: Re: gcc CXX_FLAGS
Date: Sat, 25 May 2013 22:59:00 -0000 [thread overview]
Message-ID: <CAK1hC9tnN-kieibV8htQObLrLYYJHKL=ecCw1ANha92+aDy5qA@mail.gmail.com> (raw)
In-Reply-To: <CAOhNY-8y7b=b=ZM1QbPRyoZ7JqiP-tV7MT1d8t3n1ngYUEFnWA@mail.gmail.com>
> 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<http://sourceware-org.1504.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=151058&code=YXJuYXVkLmdhYm91cnlAZ21haWwuY29tfDE1MTA1OHwtMTM0MTY5MTAz>
> .
> NAML<http://sourceware-org.1504.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.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
next prev parent reply other threads:[~2013-05-25 22:59 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 [this message]
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
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='CAK1hC9tnN-kieibV8htQObLrLYYJHKL=ecCw1ANha92+aDy5qA@mail.gmail.com' \
--to=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).