config/cc/gcc.in.2
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Sun May 06 15:32:56 2012 +0200 (2012-05-06)
changeset 2980 150402ee5468
parent 2948 3396ce2c25ef
child 3150 1d6fd9bde73c
permissions -rw-r--r--
cc/gcc: add option to enable/disable libquadmath

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
     1 # gcc configuration options
     2 
     3 config CC_ENABLE_CXX_FLAGS
     4     string
     5     prompt "Flags to pass to --enable-cxx-flags"
     6     default ""
     7     help
     8       Enter here the value of the gcc's ./configure option --enable-cxx-flags.
     9       Leave empty if you don't know better.
    10       
    11       Note: just pass in the option _value_, that is only the part that goes
    12       after the '=' sign.
    13 
    14 config CC_CORE_EXTRA_CONFIG_ARRAY
    15     string
    16     prompt "Core gcc extra config"
    17     default ""
    18     help
    19       Extra flags to pass onto ./configure when configuring the core gcc.
    20       
    21       The core gcc is a stripped down, C-only compiler needed to build
    22       the C library. Kinda bootstrap gcc, if you wish.
    23       
    24       You can enter multiple arguments here, and arguments can contain spaces
    25       if they are properly quoted (or escaped, but prefer quotes). Eg.:
    26           --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
    27 
    28 config CC_EXTRA_CONFIG_ARRAY
    29     string
    30     prompt "gcc extra config"
    31     default ""
    32     depends on ! BARE_METAL
    33     help
    34       Extra flags to pass onto ./configure when configuring gcc.
    35       
    36       You can enter multiple arguments here, and arguments can contain spaces
    37       if they are properly quoted (or escaped, but prefer quotes). Eg.:
    38           --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
    39 
    40 config STATIC_TOOLCHAIN
    41     select CC_STATIC_LIBSTDCXX if CC_GCC_4_4_or_later
    42 
    43 config CC_STATIC_LIBSTDCXX
    44     bool
    45     prompt "Link libstdc++ statically into the gcc binary"
    46     default y
    47     depends on CC_GCC_4_4_or_later
    48     select WANTS_STATIC_LINK
    49     help
    50       Newer gcc versions use the PPL library which is C++ code.  Statically
    51       linking libstdc++ increases the likeliness that the gcc binary will
    52       run on machines other than the one which it was built on, without
    53       having to worry about distributing the matching version of libstdc++
    54       along with it.
    55 
    56 config CC_GCC_SYSTEM_ZLIB
    57     bool
    58     prompt "Use system zlib"
    59     depends on EXPERIMENTAL
    60     help
    61       Do not use bundled zlib, and use the zlib already available for
    62       the host (eg. the system library).
    63       
    64       If you want to build a static toolchain, you will need to also
    65       install the static version of zlib for your host.
    66       
    67       If unsure, say 'n'.
    68 
    69 #-----------------------------------------------------------------------------
    70 # Optimisation features
    71 
    72 comment "Optimisation features"
    73 
    74 config CC_GCC_USE_GRAPHITE
    75     bool
    76     prompt "Enable GRAPHITE loop optimisations"
    77     default y
    78     depends on CC_GCC_HAS_GRAPHITE
    79     select CC_GCC_USE_PPL_CLOOG
    80     help
    81       Enable the GRAPHITE loop optimsations.
    82       
    83       This requires the PPL and CLooG companion libraries, and
    84       those will be automatically build for you.
    85       
    86       On some systems (eg. Cygwin), PPL and/or CLooG may not
    87       build properly (yet), so you'll have to say 'N' here.
    88 
    89 # The way LTO works is a bit twisted.
    90 # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
    91 # Basically:
    92 #   - if binutils has plugins: LTO is handled by ld/gold by loading
    93 #     the plugin when linking
    94 #   - if binutils does not have plugins: LTO is handled by collect2
    95 # In any case, LTO support does not depend on plugins, but takes
    96 # advantage of it
    97 # Also, only the 4.5 series needs libelf for LTO; 4.6 has dropped
    98 # the dependency.
    99 config CC_GCC_USE_LTO
   100     bool
   101     prompt "Enable LTO"
   102     default y
   103     depends on CC_GCC_HAS_LTO
   104     select CC_GCC_USE_LIBELF if CC_GCC_4_5
   105     help
   106       Enable the Link Time Optimisations.
   107       
   108       This will require the libelf companion library, and it
   109       wil be build automatically for you.
   110 
   111 #-----------------------------------------------------------------------------
   112 comment "Settings for libraries running on target"
   113 
   114 config CC_GCC_ENABLE_TARGET_OPTSPACE
   115     bool
   116     prompt "Optimize gcc libs for size"
   117     default y
   118     help
   119       Pass --enable-target-optspace to crossgcc's configure.
   120       
   121       This will compile crossgcc's libs with -Os.
   122 
   123 config CC_GCC_LIBMUDFLAP
   124     bool
   125     prompt "Compile libmudflap"
   126     help
   127       libmudflap is a pointer-use checking tool, which can detect
   128       various mis-usages of pointers in C and (to some extents) C++.
   129       
   130       You should say 'N' here, as libmduflap generates instrumented
   131       code (thus it is a bit bigger and a bit slower) and requires
   132       re-compilation and re-link, while it exists better run-time
   133       alternatives (eg. DUMA, dmalloc...) that need neither re-
   134       compilation nor re-link.
   135 
   136 config CC_GCC_LIBGOMP
   137     bool
   138     prompt "Compile libgomp"
   139     help
   140       libgomp is "the GNU implementation of the OpenMP Application Programming
   141       Interface (API) for multi-platform shared-memory parallel programming in
   142       C/C++ and Fortran". See:
   143         http://gcc.gnu.org/onlinedocs/libgomp/
   144       
   145       The default is 'N'. Say 'Y' if you need it, and report success/failure.
   146 
   147 config CC_GCC_LIBSSP
   148     bool
   149     prompt "Compile libssp"
   150     help
   151       libssp is the run-time Stack-Smashing Protection library.
   152       
   153       The default is 'N'. Say 'Y' if you need it, and report success/failure.
   154 
   155 config CC_GCC_LIBQUADMATH
   156     bool
   157     prompt "Compile libquadmath"
   158     depends on CC_GCC_HAS_LIBQUADMATH
   159     help
   160       libquadmath is a library which provides quad-precision mathematical
   161       functions on targets supporting the __float128 datatype. See:
   162         http://gcc.gnu.org/onlinedocs/libquadmath/
   163       
   164       The default is 'N'. Say 'Y' if you need it, and report success/failure.
   165 
   166 #-----------------------------------------------------------------------------
   167 
   168 comment "Misc. obscure options."
   169 
   170 config CC_CXA_ATEXIT
   171     bool
   172     prompt "Use __cxa_atexit"
   173     default y
   174     depends on ! BARE_METAL
   175     help
   176       If you get the missing symbol "__cxa_atexit" when building C++ programs,
   177       you might want to try disabling this option.
   178 
   179 config CC_GCC_DISABLE_PCH
   180     bool
   181     prompt "Do not build PCH"
   182     help
   183       Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain.
   184       at the expense of speed when compiling C++ code.
   185       
   186       For some configurations (most notably canadian?), PCH are broken, and
   187       need to be disabled. Please see:
   188         http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
   189 
   190 config CC_GCC_SJLJ_EXCEPTIONS
   191     tristate
   192     prompt "Use sjlj for exceptions"
   193     depends on ! BARE_METAL
   194     default m
   195     help
   196       'sjlj' is short for setjmp/longjmp.
   197       
   198       On some architectures, stack unwinding during exception handling
   199       works perfectly well without using sjlj, while on some others,
   200       use of sjlj is required for proper stack unwinding.
   201       
   202        Option  | sjlj use           | Associated ./configure switch
   203       ---------+--------------------+--------------------------------
   204          Y     | forcibly used      | --enable-sjlj-exceptions
   205          M     | auto               | (none, ./configure decides)
   206          N     | forcibly not used  | --disable-sjlj-exceptions
   207       
   208       It should be safe to say 'M' or 'N'.
   209       
   210       It can happen that ./configure is wrong in some cases. Known
   211       case is for ARM big endian, where you should say 'N'.
   212 
   213 config CC_GCC_LDBL_128
   214     tristate
   215     prompt "Enable 128-bit long doubles"
   216     default m
   217     depends on CC_GCC_4_2_or_later
   218     help
   219       Saying 'Y' will force gcc to use 128-bit wide long doubles
   220       Saying 'N' will force gcc to use 64-bit wide long doubles
   221       Saying 'M' will let gcc choose (default is 128-bit for
   222                  glibc >= 2.4, 64-bit otherwise)
   223       
   224       If in doubt, keep the default, ie. 'M'.
   225 
   226 config CC_GCC_BUILD_ID
   227     bool
   228     prompt "Enable build-id"
   229     depends on CC_GCC_HAS_BUILD_ID
   230     help
   231       Tells GCC to pass --build-id option to the linker for all final
   232       links (links performed without the -r or --relocatable option),
   233       if the linker supports it. If you say 'y' here, but your linker
   234       does not support --build-id option, a warning is issued and this
   235       option is ignored.
   236       
   237       The default is off.
   238 
   239 choice CC_GCC_LNK_HASH_STYLE_CHOICE
   240     bool
   241     prompt "linker hash style"
   242     depends on CC_GCC_HAS_LNK_HASH_STYLE
   243     depends on BINUTILS_HAS_HASH_STYLE
   244 
   245 config CC_GCC_LNK_HASH_STYLE_DEFAULT
   246     bool
   247     prompt "Default"
   248     help
   249       Do not specify any value, and use the default value (sysv).
   250 
   251 config CC_GCC_LNK_HASH_STYLE_SYSV
   252     bool
   253     prompt "sysv"
   254     help
   255       Force use of the SYSV hash style.
   256 
   257 config CC_GCC_LNK_HASH_STYLE_GNU
   258     bool
   259     prompt "gnu"
   260     help
   261       Force use of the GNU hash style.
   262 
   263 config CC_GCC_LNK_HASH_STYLE_BOTH
   264     bool
   265     prompt "both"
   266     help
   267       Force use of both hash styles.
   268 
   269 endchoice # CC_GCC_LNK_HASH_STYLE_CHOICE
   270 
   271 config CC_GCC_LNK_HASH_STYLE
   272     string
   273     default ""      if CC_GCC_LNK_HASH_STYLE_DEFAULT
   274     default "sysv"  if CC_GCC_LNK_HASH_STYLE_SYSV
   275     default "gnu"   if CC_GCC_LNK_HASH_STYLE_GNU
   276     default "both"  if CC_GCC_LNK_HASH_STYLE_BOTH
   277 
   278 #-----------------------------------------------------------------------------
   279 
   280 config CC_GCC_HAS_ARCH_OPTIONS
   281     bool
   282 
   283 comment "archictecture-specific options"
   284     depends on CC_GCC_HAS_ARCH_OPTIONS
   285 
   286 if ARCH_mips
   287 source "config/cc/gcc.in.mips"
   288 endif # ARCH_mips