public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* gcc CXX_FLAGS
@ 2013-05-25 14:01 gabx
  2013-05-25 18:43 ` Anthony Foiani
  0 siblings, 1 reply; 9+ messages in thread
From: gabx @ 2013-05-25 14:01 UTC (permalink / raw)
  To: crossgcc

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




--
View this message in context: http://sourceware-org.1504.n7.nabble.com/gcc-CXX-FLAGS-tp233249.html
Sent from the Sourceware - crossgcc list mailing list archive at Nabble.com.

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc CXX_FLAGS
  2013-05-25 14:01 gcc CXX_FLAGS gabx
@ 2013-05-25 18:43 ` Anthony Foiani
  2013-05-25 22:59   ` gabx
  0 siblings, 1 reply; 9+ messages in thread
From: Anthony Foiani @ 2013-05-25 18:43 UTC (permalink / raw)
  To: gabx; +Cc: crossgcc maillist

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


On Sat, May 25, 2013 at 8:01 AM, gabx <arnaud.gaboury@gmail.com> wrote:
> 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
>
>
>
>
> --
> View this message in context: http://sourceware-org.1504.n7.nabble.com/gcc-CXX-FLAGS-tp233249.html
> Sent from the Sourceware - crossgcc list mailing list archive at Nabble.com.
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc CXX_FLAGS
  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
  0 siblings, 2 replies; 9+ messages in thread
From: gabx @ 2013-05-25 22:59 UTC (permalink / raw)
  To: crossgcc

> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc CXX_FLAGS
  2013-05-25 22:59   ` gabx
@ 2013-05-25 23:07     ` Yann E. MORIN
  2013-05-26  1:42     ` Anthony Foiani
  1 sibling, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2013-05-25 23:07 UTC (permalink / raw)
  To: gabx; +Cc: crossgcc

Arnaud, All,

On 2013-05-25 15:59 -0700, gabx spake thusly:
[--SNIP--]
>  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 ?

If you set an optimisation level in the crosstool-NG configuration, it
will only be used internally, for example to build libstdc++ or libgcc_s.

There is no way to tell gcc what optimisation level to default to. So,
you have to specify the required optimisation level everytime you call
to gcc.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc CXX_FLAGS
  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
  1 sibling, 1 reply; 9+ messages in thread
From: Anthony Foiani @ 2013-05-26  1:42 UTC (permalink / raw)
  To: gabx; +Cc: crossgcc maillist

Arnaud --

On Sat, May 25, 2013 at 4:59 PM, gabx <arnaud.gaboury@gmail.com> wrote:

> Now I am still wondering if I need to pass again the flags when I build the
> android ROM or Kernel.

Generally, yes.

As Yann explained, the CT_CC_... variables are only used to build gcc
itself; they are not set when you use the built gcc to build other
projects.

The "export ..." method should work, although you might want to try it
with the defaults first -- the Linux kernel, at least, should be
pretty smart about picking the right flags for the various hardware
targets.  Picking other flags could very well lead to instability.
(There was an issue with "-Os" on some platforms for quite a while,
and that's even a fairly standard Linux kernel config option.)

Also note that having a toolchain, or even a toolchain and a kernel,
is only a small part of building a fully distribution that can run on
a given platform.  It's been covered here before, e.g.;

http://sourceware.org/ml/crossgcc/2013-03/msg00008.html

If this level of indirection makes you uncomfortable, you might see if
one of the "distribution building" tools (yocto, etc) has your
platform as a target.

Either way, good luck!

Best regards,
Anthony Foiani

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc CXX_FLAGS
  2013-05-26  1:42     ` Anthony Foiani
@ 2013-05-26 12:51       ` Martin Guy
  2013-05-28 17:31         ` gabx
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Guy @ 2013-05-26 12:51 UTC (permalink / raw)
  To: Anthony Foiani; +Cc: gabx, crossgcc maillist

In my efforts to do a similar thing, the most effective way to set
default flags in GCCturned out to be to create your own fake gcc
wrapper, a tiny shell script called "gcc" (maybe also "gcc-4.8",
"g++", "g++4.8") that calls the real gcc prefixing the supplied
arguments with "-Ox" as described towards the end of
martinwguy.co.uk/crunch/#UsingIt

To override -O settings specified by makefiles and similar, (since
most of them specify a -O flag) you may be able to get away with
passing your "-O" flag last in the wrapper instead of first. If this
doesn't work, you'll need to write a wrapper that loops through all
the supplied gcc options eliminating those that begin with -O.

   M

On 26/05/2013, Anthony Foiani <anthony.foiani@gmail.com> wrote:
> Arnaud --
>
> On Sat, May 25, 2013 at 4:59 PM, gabx <arnaud.gaboury@gmail.com> wrote:
>
>> Now I am still wondering if I need to pass again the flags when I build
>> the
>> android ROM or Kernel.
>
> Generally, yes.
>
> As Yann explained, the CT_CC_... variables are only used to build gcc
> itself; they are not set when you use the built gcc to build other
> projects.
>
> The "export ..." method should work, although you might want to try it
> with the defaults first -- the Linux kernel, at least, should be
> pretty smart about picking the right flags for the various hardware
> targets.  Picking other flags could very well lead to instability.
> (There was an issue with "-Os" on some platforms for quite a while,
> and that's even a fairly standard Linux kernel config option.)
>
> Also note that having a toolchain, or even a toolchain and a kernel,
> is only a small part of building a fully distribution that can run on
> a given platform.  It's been covered here before, e.g.;
>
> http://sourceware.org/ml/crossgcc/2013-03/msg00008.html
>
> If this level of indirection makes you uncomfortable, you might see if
> one of the "distribution building" tools (yocto, etc) has your
> platform as a target.
>
> Either way, good luck!
>
> Best regards,
> Anthony Foiani
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>
>

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc CXX_FLAGS
  2013-05-26 12:51       ` Martin Guy
@ 2013-05-28 17:31         ` gabx
  2013-05-29  7:23           ` Martin Guy
  0 siblings, 1 reply; 9+ messages in thread
From: gabx @ 2013-05-28 17:31 UTC (permalink / raw)
  To: crossgcc

On Sun, May 26, 2013 at 2:52 PM, Martin Guy-2 [via Sourceware.org] <
ml-node+s1504n233281h90@n7.nabble.com> wrote:

> In my efforts to do a similar thing, the most effective way to set
> default flags in GCCturned out to be to create your own fake gcc
> wrapper, a tiny shell script called "gcc" (maybe also "gcc-4.8",
> "g++", "g++4.8") that calls the real gcc prefixing the supplied
> arguments with "-Ox" as described towards the end of
> martinwguy.co.uk/crunch/#UsingIt
>
> To override -O settings specified by makefiles and similar, (since
> most of them specify a -O flag) you may be able to get away with
> passing your "-O" flag last in the wrapper instead of first. If this
> doesn't work, you'll need to write a wrapper that loops through all
> the supplied gcc options eliminating those that begin with -O.
>
>    M
>
> On 26/05/2013, Anthony Foiani <[hidden email]<http://user/SendEmail.jtp?type=node&node=233281&i=0>>
> wrote:
>
> > Arnaud --
> >
> > On Sat, May 25, 2013 at 4:59 PM, gabx <[hidden email]<http://user/SendEmail.jtp?type=node&node=233281&i=1>>
> wrote:
> >
> >> Now I am still wondering if I need to pass again the flags when I build
> >> the
> >> android ROM or Kernel.
> >
> > Generally, yes.
> >
> > As Yann explained, the CT_CC_... variables are only used to build gcc
> > itself; they are not set when you use the built gcc to build other
> > projects.
> >
> > The "export ..." method should work, although you might want to try it
> > with the defaults first -- the Linux kernel, at least, should be
> > pretty smart about picking the right flags for the various hardware
> > targets.  Picking other flags could very well lead to instability.
> > (There was an issue with "-Os" on some platforms for quite a while,
> > and that's even a fairly standard Linux kernel config option.)
> >
> > Also note that having a toolchain, or even a toolchain and a kernel,
> > is only a small part of building a fully distribution that can run on
> > a given platform.  It's been covered here before, e.g.;
> >
> > http://sourceware.org/ml/crossgcc/2013-03/msg00008.html
> >
> > If this level of indirection makes you uncomfortable, you might see if
> > one of the "distribution building" tools (yocto, etc) has your
> > platform as a target.
> >
> > Either way, good luck!
> >
> > Best regards,
> > Anthony Foiani
> >
> > --
>

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.
I was wrong when thinking the flags I used to build the toolchain were
thereafter implicitly enabled by default by the gcc toolchain.
I guess my CCX_FLAGS is then a non-sense :
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"
The toolchain still built fine and works.. Shall I build a new one with
less (or no) flags? In case keeping my actual one, can all these flags lead
to some potential issues later? Which flags would you keep ?

My toolchain is aimed at building android kernel and rom for the Google LG
nexus 4. I am not sure of some of my settings, so I would appreciate any
advice.

mfpu=neon ===>  or vfpv3-d16, vfpv4-d16, neon-vfpv4, neon-fp16 ??
CPU="cortex-a9"  =====> or cortex-a15 ?? I saw nexus4 kernel are built with
the -a15 instruction
LIBC_ADDONS_LIST=" libidn "  ====> or not ? I don't understand fully this
lib.

Please find below my actual config. As mentioned above, it builds and
works, but I am far from being sure I used the correct setiings.

[DEBUG]    CT_CONFIGURE_has_xz=y
[DEBUG]    CT_CONFIGURE_has_cvs=y
[DEBUG]    CT_CONFIGURE_has_svn=y
[DEBUG]    CT_MODULES=y
[DEBUG]    # CT_OBSOLETE is not set
[DEBUG]    CT_EXPERIMENTAL=y
[DEBUG]    # CT_ALLOW_BUILD_AS_ROOT is not set
[DEBUG]    CT_DEBUG_CT=y
[DEBUG]    # CT_DEBUG_PAUSE_STEPS is not set
[DEBUG]    CT_DEBUG_CT_SAVE_STEPS=y
[DEBUG]    CT_DEBUG_CT_SAVE_STEPS_GZIP=y
[DEBUG]    # CT_NO_OVERIDE_LC_MESSAGES is not set
[DEBUG]    # CT_DEBUG_INTERACTIVE is not set
[DEBUG]    CT_LOCAL_TARBALLS_DIR="${HOME}/cross/src"
[DEBUG]    CT_SAVE_TARBALLS=y
[DEBUG]    CT_CUSTOM_LOCATION_ROOT_DIR=""
[DEBUG]    CT_WORK_DIR="${CT_TOP_DIR}/.build"
[DEBUG]    CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
[DEBUG]    CT_INSTALL_DIR="${CT_PREFIX_DIR}"
[DEBUG]    CT_RM_RF_PREFIX_DIR=y
[DEBUG]    CT_REMOVE_DOCS=y
[DEBUG]    # CT_INSTALL_DIR_RO is not set
[DEBUG]    CT_STRIP_ALL_TOOLCHAIN_EXECUTABLES=y
[DEBUG]    # CT_FORBID_DOWNLOAD is not set
[DEBUG]    # CT_FORCE_DOWNLOAD is not set
[DEBUG]    CT_CONNECT_TIMEOUT=10
[DEBUG]    # CT_ONLY_DOWNLOAD is not set
[DEBUG]    # CT_USE_MIRROR is not set
[DEBUG]    # CT_FORCE_EXTRACT is not set
[DEBUG]    CT_OVERIDE_CONFIG_GUESS_SUB=y
[DEBUG]    # CT_ONLY_EXTRACT is not set
[DEBUG]    # CT_PATCH_BUNDLED is not set
[DEBUG]    # CT_PATCH_LOCAL is not set
[DEBUG]    # CT_PATCH_BUNDLED_LOCAL is not set
[DEBUG]    # CT_PATCH_LOCAL_BUNDLED is not set
[DEBUG]    # CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
[DEBUG]    # CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
[DEBUG]    CT_PATCH_NONE=y
[DEBUG]    CT_PATCH_ORDER="none"
[DEBUG]    CT_PARALLEL_JOBS=16
[DEBUG]    CT_LOAD=""
[DEBUG]    CT_USE_PIPES=y
[DEBUG]    CT_EXTRA_CFLAGS_FOR_BUILD="-O3 -Wno-format -w
-faggressive-loop-optimizations -funsafe-loop-optimizations
-floop-nest-optimize"
[DEBUG]    CT_EXTRA_LDFLAGS_FOR_BUILD=""
[DEBUG]    CT_EXTRA_CFLAGS_FOR_HOST="-O3 -Wno-format -w
-faggressive-loop-optimizations -funsafe-loop-optimizations
-floop-nest-optimize"
[DEBUG]    CT_EXTRA_LDFLAGS_FOR_HOST=""
[DEBUG]    # CT_CONFIG_SHELL_SH is not set
[DEBUG]    # CT_CONFIG_SHELL_ASH is not set
[DEBUG]    CT_CONFIG_SHELL_BASH=y
[DEBUG]    # CT_CONFIG_SHELL_CUSTOM is not set
[DEBUG]    CT_CONFIG_SHELL="${bash}"
[DEBUG]    # CT_LOG_ERROR is not set
[DEBUG]    # CT_LOG_WARN is not set
[DEBUG]    # CT_LOG_INFO is not set
[DEBUG]    CT_LOG_EXTRA=y
[DEBUG]    # CT_LOG_ALL is not set
[DEBUG]    # CT_LOG_DEBUG is not set
[DEBUG]    CT_LOG_LEVEL_MAX="EXTRA"
[DEBUG]    # CT_LOG_SEE_TOOLS_WARN is not set
[DEBUG]    CT_LOG_PROGRESS_BAR=y
[DEBUG]    CT_LOG_TO_FILE=y
[DEBUG]    CT_LOG_FILE_COMPRESS=y
[DEBUG]    CT_ARCH="arm"
[DEBUG]    CT_ARCH_SUPPORTS_BOTH_MMU=y
[DEBUG]    CT_ARCH_SUPPORTS_BOTH_ENDIAN=y
[DEBUG]    CT_ARCH_SUPPORTS_32=y
[DEBUG]    CT_ARCH_SUPPORTS_WITH_ARCH=y
[DEBUG]    CT_ARCH_SUPPORTS_WITH_CPU=y
[DEBUG]    CT_ARCH_SUPPORTS_WITH_TUNE=y
[DEBUG]    CT_ARCH_SUPPORTS_WITH_FLOAT=y
[DEBUG]    CT_ARCH_SUPPORTS_WITH_FPU=y
[DEBUG]    CT_ARCH_SUPPORTS_SOFTFP=y
[DEBUG]    CT_ARCH_DEFAULT_HAS_MMU=y
[DEBUG]    CT_ARCH_DEFAULT_LE=y
[DEBUG]    CT_ARCH_DEFAULT_32=y
[DEBUG]    CT_ARCH_ARCH="armv7-a"
[DEBUG]    CT_ARCH_CPU="cortex-a9"
[DEBUG]    CT_ARCH_TUNE="cortex-a9"
[DEBUG]    CT_ARCH_FPU="neon"
[DEBUG]    # CT_ARCH_BE is not set
[DEBUG]    CT_ARCH_LE=y
[DEBUG]    CT_ARCH_32=y
[DEBUG]    CT_ARCH_BITNESS=32
[DEBUG]    CT_ARCH_FLOAT_HW=y
[DEBUG]    # CT_ARCH_FLOAT_SW is not set
[DEBUG]    CT_TARGET_CFLAGS="-mfpu=neon -mfloat-abi=hard"
[DEBUG]    CT_TARGET_LDFLAGS=""
[DEBUG]    CT_ARCH_arm=y
[DEBUG]    # CT_ARCH_x86 is not set
[DEBUG]    # CT_ARCH_sh is not set
[DEBUG]    # CT_ARCH_avr32 is not set
[DEBUG]    # CT_ARCH_mips is not set
[DEBUG]    # CT_ARCH_sparc is not set
[DEBUG]    # CT_ARCH_powerpc is not set
[DEBUG]    # CT_ARCH_s390 is not set
[DEBUG]    # CT_ARCH_m68k is not set
[DEBUG]    # CT_ARCH_alpha is not set
[DEBUG]    # CT_ARCH_microblaze is not set
[DEBUG]    # CT_ARCH_blackfin is not set
[DEBUG]    CT_ARCH_arm_AVAILABLE=y
[DEBUG]    CT_ARCH_SUFFIX=""
[DEBUG]    CT_MULTILIB=y
[DEBUG]    CT_ARCH_USE_MMU=y
[DEBUG]    CT_ARCH_ENDIAN="little"
[DEBUG]    # CT_ARCH_FLOAT_SOFTFP is not set
[DEBUG]    CT_ARCH_FLOAT="hard"
[DEBUG]    CT_ARCH_ARM_MODE="thumb"
[DEBUG]    # CT_ARCH_ARM_MODE_ARM is not set
[DEBUG]    CT_ARCH_ARM_MODE_THUMB=y
[DEBUG]    CT_ARCH_ARM_INTERWORKING=y
[DEBUG]    CT_ARCH_ARM_EABI_FORCE=y
[DEBUG]    CT_ARCH_ARM_EABI=y
[DEBUG]    CT_ARCH_ARM_TUPLE_USE_EABIHF=y
[DEBUG]    CT_FORCE_SYSROOT=y
[DEBUG]    CT_USE_SYSROOT=y
[DEBUG]    CT_SYSROOT_NAME="sysroot"
[DEBUG]    CT_SYSROOT_DIR_PREFIX=""
[DEBUG]    CT_WANTS_STATIC_LINK=y
[DEBUG]    # CT_STATIC_TOOLCHAIN is not set
[DEBUG]    CT_TOOLCHAIN_PKGVERSION=""
[DEBUG]    CT_TOOLCHAIN_BUGURL=""
[DEBUG]    CT_TARGET_VENDOR="cortexa9_neon"
[DEBUG]    CT_TARGET_ALIAS_SED_EXPR=""
[DEBUG]    CT_TARGET_ALIAS=""
[DEBUG]    # CT_NATIVE is not set
[DEBUG]    CT_CROSS=y
[DEBUG]    # CT_CROSS_NATIVE is not set
[DEBUG]    # CT_CANADIAN is not set
[DEBUG]    CT_TOOLCHAIN_TYPE="cross"
[DEBUG]    CT_BUILD=""
[DEBUG]    CT_BUILD_PREFIX=""
[DEBUG]    CT_BUILD_SUFFIX=""
[DEBUG]    CT_TOOLCHAIN_ENABLE_NLS=y
[DEBUG]    CT_KERNEL_SUPPORTS_SHARED_LIBS=y
[DEBUG]    CT_KERNEL="linux"
[DEBUG]    CT_KERNEL_VERSION="3.9.0"
[DEBUG]    # CT_KERNEL_bare_metal is not set
[DEBUG]    CT_KERNEL_linux=y
[DEBUG]    CT_KERNEL_linux_AVAILABLE=y
[DEBUG]    CT_KERNEL_V_3_9_0=y
[DEBUG]    # CT_KERNEL_V_3_7_2 is not set
[DEBUG]    # CT_KERNEL_V_3_7_1 is not set
[DEBUG]    # CT_KERNEL_V_3_7 is not set
[DEBUG]    # CT_KERNEL_V_3_6 is not set
[DEBUG]    # CT_KERNEL_V_3_5 is not set
[DEBUG]    # CT_KERNEL_V_3_4 is not set
[DEBUG]    # CT_KERNEL_V_3_3 is not set
[DEBUG]    # CT_KERNEL_V_3_2 is not set
[DEBUG]    # CT_KERNEL_V_3_1 is not set
[DEBUG]    # CT_KERNEL_V_3_0 is not set
[DEBUG]    # CT_KERNEL_V_2_6_39 is not set
[DEBUG]    # CT_KERNEL_V_2_6_38 is not set
[DEBUG]    # CT_KERNEL_V_2_6_37 is not set
[DEBUG]    # CT_KERNEL_V_2_6_36 is not set
[DEBUG]    # CT_KERNEL_V_2_6_33 is not set
[DEBUG]    # CT_KERNEL_V_2_6_32 is not set
[DEBUG]    # CT_KERNEL_V_2_6_31 is not set
[DEBUG]    # CT_KERNEL_V_2_6_27 is not set
[DEBUG]    # CT_KERNEL_LINUX_CUSTOM is not set
[DEBUG]    CT_SHARED_LIBS=y
[DEBUG]    CT_KERNEL_LINUX_VERBOSITY_0=y
[DEBUG]    # CT_KERNEL_LINUX_VERBOSITY_1 is not set
[DEBUG]    # CT_KERNEL_LINUX_VERBOSITY_2 is not set
[DEBUG]    CT_KERNEL_LINUX_VERBOSE_LEVEL=0
[DEBUG]    CT_KERNEL_LINUX_INSTALL_CHECK=y
[DEBUG]    CT_ARCH_BINFMT_ELF=y
[DEBUG]    CT_BINUTILS="binutils"
[DEBUG]    CT_BINUTILS_binutils=y
[DEBUG]    CT_BINUTILS_V_2_23_2=y
[DEBUG]    # CT_BINUTILS_V_2_22 is not set
[DEBUG]    # CT_BINUTILS_V_2_21_53 is not set
[DEBUG]    # CT_BINUTILS_V_2_21_1a is not set
[DEBUG]    # CT_BINUTILS_V_2_20_1a is not set
[DEBUG]    # CT_BINUTILS_V_2_19_1a is not set
[DEBUG]    # CT_BINUTILS_V_2_18a is not set
[DEBUG]    # CT_BINUTILS_CUSTOM is not set
[DEBUG]    CT_BINUTILS_VERSION="2.23.2"
[DEBUG]    CT_BINUTILS_2_23_or_later=y
[DEBUG]    CT_BINUTILS_2_22_or_later=y
[DEBUG]    CT_BINUTILS_2_21_or_later=y
[DEBUG]    CT_BINUTILS_2_20_or_later=y
[DEBUG]    CT_BINUTILS_2_19_or_later=y
[DEBUG]    CT_BINUTILS_2_18_or_later=y
[DEBUG]    CT_BINUTILS_HAS_HASH_STYLE=y
[DEBUG]    CT_BINUTILS_HAS_GOLD=y
[DEBUG]    CT_BINUTILS_GOLD_SUPPORTS_ARCH=y
[DEBUG]    CT_BINUTILS_HAS_PLUGINS=y
[DEBUG]    CT_BINUTILS_HAS_PKGVERSION_BUGURL=y
[DEBUG]    CT_BINUTILS_FORCE_LD_BFD=y
[DEBUG]    # CT_BINUTILS_LINKER_LD is not set
[DEBUG]    CT_BINUTILS_LINKER_LD_GOLD=y
[DEBUG]    CT_BINUTILS_GOLD_THREADS=y
[DEBUG]    CT_BINUTILS_LINKER_BOTH=y
[DEBUG]    CT_BINUTILS_LD_WRAPPER=y
[DEBUG]    CT_BINUTILS_LINKERS_LIST="gold,ld"
[DEBUG]    CT_BINUTILS_LINKER_DEFAULT="bfd"
[DEBUG]    CT_BINUTILS_PLUGINS=y
[DEBUG]    CT_BINUTILS_EXTRA_CONFIG_ARRAY=(  )
[DEBUG]    CT_BINUTILS_FOR_TARGET=y
[DEBUG]    CT_BINUTILS_FOR_TARGET_IBERTY=y
[DEBUG]    CT_BINUTILS_FOR_TARGET_BFD=y
[DEBUG]    CT_CC="gcc"
[DEBUG]    CT_CC_VERSION="4.8"
[DEBUG]    CT_CC_CORE_PASSES_NEEDED=y
[DEBUG]    # CT_CC_GCC_SHOW_LINARO is not set
[DEBUG]    # CT_CC_V_4_7_2 is not set
[DEBUG]    # CT_CC_V_4_7_1 is not set
[DEBUG]    # CT_CC_V_4_7_0 is not set
[DEBUG]    # CT_CC_V_linaro_4_6 is not set
[DEBUG]    # CT_CC_V_4_6_3 is not set
[DEBUG]    # CT_CC_V_4_6_2 is not set
[DEBUG]    # CT_CC_V_4_6_1 is not set
[DEBUG]    # CT_CC_V_4_6_0 is not set
[DEBUG]    # CT_CC_V_linaro_4_5 is not set
[DEBUG]    # CT_CC_V_4_5_3 is not set
[DEBUG]    # CT_CC_V_4_5_2 is not set
[DEBUG]    # CT_CC_V_4_5_1 is not set
[DEBUG]    # CT_CC_V_4_5_0 is not set
[DEBUG]    # CT_CC_V_linaro_4_4 is not set
[DEBUG]    # CT_CC_V_4_4_7 is not set
[DEBUG]    # CT_CC_V_4_4_6 is not set
[DEBUG]    # CT_CC_V_4_4_5 is not set
[DEBUG]    # CT_CC_V_4_4_4 is not set
[DEBUG]    # CT_CC_V_4_4_3 is not set
[DEBUG]    # CT_CC_V_4_4_2 is not set
[DEBUG]    # CT_CC_V_4_4_1 is not set
[DEBUG]    # CT_CC_V_4_4_0 is not set
[DEBUG]    # CT_CC_V_4_3_6 is not set
[DEBUG]    # CT_CC_V_4_3_5 is not set
[DEBUG]    # CT_CC_V_4_3_4 is not set
[DEBUG]    # CT_CC_V_4_3_3 is not set
[DEBUG]    # CT_CC_V_4_3_2 is not set
[DEBUG]    # CT_CC_V_4_3_1 is not set
[DEBUG]    # CT_CC_V_4_2_4 is not set
[DEBUG]    # CT_CC_V_4_2_2 is not set
[DEBUG]    # CT_CC_CUSTOM is not set
[DEBUG]    CT_CC_V_4_8=y
[DEBUG]    CT_CC_GCC_4_8_or_later=y
[DEBUG]    CT_CC_GCC_4_7_or_later=y
[DEBUG]    CT_CC_GCC_4_6_or_later=y
[DEBUG]    CT_CC_GCC_4_5_or_later=y
[DEBUG]    CT_CC_GCC_4_4_or_later=y
[DEBUG]    CT_CC_GCC_4_3_or_later=y
[DEBUG]    CT_CC_GCC_4_2_or_later=y
[DEBUG]    CT_CC_GCC_HAS_GRAPHITE=y
[DEBUG]    CT_CC_GCC_HAS_LTO=y
[DEBUG]    CT_CC_GCC_HAS_PKGVERSION_BUGURL=y
[DEBUG]    CT_CC_GCC_HAS_BUILD_ID=y
[DEBUG]    CT_CC_GCC_GOLD=y
[DEBUG]    CT_CC_GCC_USE_GMP_MPFR=y
[DEBUG]    CT_CC_GCC_USE_PPL_CLOOG=y
[DEBUG]    CT_CC_GCC_USE_MPC=y
[DEBUG]    CT_CC_GCC_HAS_LIBQUADMATH=y
[DEBUG]    # CT_CC_LANG_FORTRAN is not set
[DEBUG]    CT_CC_SUPPORT_CXX=y
[DEBUG]    CT_CC_SUPPORT_FORTRAN=y
[DEBUG]    CT_CC_SUPPORT_JAVA=y
[DEBUG]    CT_CC_SUPPORT_ADA=y
[DEBUG]    CT_CC_SUPPORT_OBJC=y
[DEBUG]    CT_CC_SUPPORT_OBJCXX=y
[DEBUG]    CT_CC_LANG_CXX=y
[DEBUG]    # CT_CC_LANG_JAVA is not set
[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"
[DEBUG]    CT_CC_STATIC_LIBSTDCXX=y
[DEBUG]    # CT_CC_GCC_SYSTEM_ZLIB is not set
[DEBUG]    CT_CC_GCC_USE_GRAPHITE=y
[DEBUG]    CT_CC_GCC_USE_LTO=y
[DEBUG]    CT_CC_GCC_ENABLE_TARGET_OPTSPACE=y
[DEBUG]    # CT_CC_GCC_LIBMUDFLAP is not set
[DEBUG]    # CT_CC_GCC_LIBGOMP is not set
[DEBUG]    # CT_CC_GCC_LIBSSP is not set
[DEBUG]    # CT_CC_GCC_LIBQUADMATH is not set
[DEBUG]    CT_CC_CXA_ATEXIT=y
[DEBUG]    # CT_CC_GCC_DISABLE_PCH is not set
[DEBUG]    CT_CC_GCC_SJLJ_EXCEPTIONS=m
[DEBUG]    CT_CC_GCC_LDBL_128=m
[DEBUG]    # CT_CC_GCC_BUILD_ID is not set
[DEBUG]    # CT_CC_GCC_LNK_HASH_STYLE_DEFAULT is not set
[DEBUG]    # CT_CC_GCC_LNK_HASH_STYLE_SYSV is not set
[DEBUG]    CT_CC_GCC_LNK_HASH_STYLE_GNU=y
[DEBUG]    # CT_CC_GCC_LNK_HASH_STYLE_BOTH is not set
[DEBUG]    CT_CC_GCC_LNK_HASH_STYLE="gnu"
[DEBUG]    CT_LIBC="eglibc"
[DEBUG]    CT_LIBC_VERSION="2.17"
[DEBUG]    CT_LIBC_eglibc=y
[DEBUG]    CT_LIBC_eglibc_AVAILABLE=y
[DEBUG]    # CT_LIBC_GLIBC_V_2_16_0 is not set
[DEBUG]    # CT_LIBC_GLIBC_V_2_15 is not set
[DEBUG]    # CT_LIBC_GLIBC_V_2_14_1 is not set
[DEBUG]    # CT_LIBC_GLIBC_V_2_14 is not set
[DEBUG]    # CT_LIBC_GLIBC_V_2_13 is not set
[DEBUG]    # CT_LIBC_GLIBC_V_2_12_2 is not set
[DEBUG]    # CT_LIBC_GLIBC_V_2_12_1 is not set
[DEBUG]    # CT_LIBC_GLIBC_V_2_11_1 is not set
[DEBUG]    # CT_LIBC_GLIBC_V_2_11 is not set
[DEBUG]    # CT_LIBC_GLIBC_V_2_10_1 is not set
[DEBUG]    # CT_LIBC_GLIBC_V_2_9 is not set
[DEBUG]    # CT_LIBC_GLIBC_V_2_8 is not set
[DEBUG]    CT_LIBC_EGLIBC_2_17=y
[DEBUG]    CT_LIBC_EGLIBC_2_17_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_16_0_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_15_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_14_1_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_14_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_13_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_12_2_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_12_1_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_11_1or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_11_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_10_1_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_9_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_2_8_or_later=y
[DEBUG]    CT_LIBC_EGLIBC_HAS_PKGVERSION_BUGURL=y
[DEBUG]    CT_EGLIBC_REVISION="HEAD"
[DEBUG]    # CT_EGLIBC_HTTP is not set
[DEBUG]    # CT_EGLIBC_CHECKOUT is not set
[DEBUG]    CT_EGLIBC_OPT_SIZE=y
[DEBUG]    # CT_EGLIBC_CUSTOM_CONFIG is not set
[DEBUG]    CT_LIBC_SUPPORT_THREADS_ANY=y
[DEBUG]    CT_LIBC_SUPPORT_NPTL=y
[DEBUG]    CT_LIBC_SUPPORT_LINUXTHREADS=y
[DEBUG]    CT_THREADS="nptl"
[DEBUG]    CT_THREADS_NPTL=y
[DEBUG]    # CT_THREADS_LINUXTHREADS is not set
[DEBUG]    CT_LIBC_XLDD=y
[DEBUG]    CT_LIBC_GLIBC_MAY_FORCE_PORTS=y
[DEBUG]    CT_LIBC_glibc_familly=y
[DEBUG]    CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY=
[DEBUG]    CT_LIBC_GLIBC_CONFIGPARMS=""
[DEBUG]    CT_LIBC_GLIBC_EXTRA_CFLAGS=""
[DEBUG]    CT_LIBC_EXTRA_CC_ARGS="-U_FORTIFY_SOURCE"
[DEBUG]    # CT_LIBC_ENABLE_FORTIFIED_BUILD is not set
[DEBUG]    # CT_LIBC_DISABLE_VERSIONING is not set
[DEBUG]    CT_LIBC_OLDEST_ABI=""
[DEBUG]    CT_LIBC_GLIBC_FORCE_UNWIND=y
[DEBUG]    CT_LIBC_GLIBC_USE_PORTS=y
[DEBUG]    CT_LIBC_ADDONS_LIST=""
[DEBUG]    CT_LIBC_LOCALES=y


Thank you again for helping me in this obscure journey in the toolchain
making.

Regards,




--
View this message in context: http://sourceware-org.1504.n7.nabble.com/gcc-CXX-FLAGS-tp233249p233398.html
Sent from the Sourceware - crossgcc list mailing list archive at Nabble.com.

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc CXX_FLAGS
  2013-05-28 17:31         ` gabx
@ 2013-05-29  7:23           ` Martin Guy
  2013-05-29  9:02             ` gabx
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Guy @ 2013-05-29  7:23 UTC (permalink / raw)
  To: gabx; +Cc: crossgcc

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc CXX_FLAGS
  2013-05-29  7:23           ` Martin Guy
@ 2013-05-29  9:02             ` gabx
  0 siblings, 0 replies; 9+ messages in thread
From: gabx @ 2013-05-29  9:02 UTC (permalink / raw)
  To: crossgcc

On Wed, May 29, 2013 at 9:24 AM, Martin Guy-2 [via Sourceware.org] <
ml-node+s1504n233506h65@n7.nabble.com> wrote:

> On 28 May 2013 19:31, gabx <[hidden email]<http://user/SendEmail.jtp?type=node&node=233506&i=0>>
> 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
>
>
>
Thank you Martin.

The unique goal of this toolchain is to build android kernel and rom with
gcc 4.8 and some optimization flags for the Google LG nexus 4 (armv7-a
rev2)




--
View this message in context: http://sourceware-org.1504.n7.nabble.com/gcc-CXX-FLAGS-tp233249p233515.html
Sent from the Sourceware - crossgcc list mailing list archive at Nabble.com.

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-05-29  9:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-25 14:01 gcc CXX_FLAGS 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
2013-05-29  9:02             ` gabx

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).