config/cc/gcc.in.2
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jun 02 19:50:12 2011 +0200 (2011-06-02)
changeset 2500 ba1e71fa72a9
parent 2487 481cd34691f0
child 2521 9cfca603f892
permissions -rw-r--r--
cc/gcc: CC_STATIC_LIBSTDCXX 'depends on' CONFIGURE_has_static_libstdcpp

Hide the staticaly linked libstdc++ option if the static libstdc++ is not
present, detected at configure time.

Add a blind option that says whether static linking is possible at all.
It defaults to 'y', but depends on the needed CONFIGURE_* options. For
now, it only depends on static libtdc++, but new dependencies can be
easily added.

Hide the global static toolchain option behind this new option.

Original patch by Bryan Hundven <bryanhundven@gmail.com>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.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 CONFIGURE_has_static_libstdcxx
    48     depends on CC_GCC_4_4_or_later
    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 #-----------------------------------------------------------------------------
    57 # Optimisation features
    58 
    59 comment "Optimisation features"
    60 
    61 config CC_GCC_USE_GRAPHITE
    62     bool
    63     prompt "Enable GRAPHITE loop optimisations"
    64     default y
    65     depends on CC_GCC_HAS_GRAPHITE
    66     select CC_GCC_USE_PPL_CLOOG
    67     help
    68       Enable the GRAPHITE loop optimsations.
    69       
    70       This requires the PPL and CLooG companion libraries, and
    71       those will be automatically build for you.
    72       
    73       On some systems (eg. Cygwin), PPL and/or CLooG may not
    74       build properly (yet), so you'll have to say 'N' here.
    75 
    76 # The way LTO works is a bit twisted.
    77 # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
    78 # Basically:
    79 #   - if binutils has plugins: LTO is handled by ld/gold by loading
    80 #     the plugin when linking
    81 #   - if binutils does not have plugins: LTO is handled by collect2
    82 # In any case, LTO support does not depend on plugins, but takes
    83 # advantage of it
    84 # Also, only the 4.5 series needs libelf for LTO; 4.6 has dropped
    85 # the dependency.
    86 config CC_GCC_USE_LTO
    87     bool
    88     prompt "Enable LTO"
    89     default y
    90     depends on CC_GCC_HAS_LTO
    91     select CC_GCC_USE_LIBELF if CC_GCC_4_5
    92     help
    93       Enable the Link Time Optimisations.
    94       
    95       This will require the libelf companion library, and it
    96       wil be build automatically for you.
    97 
    98 #-----------------------------------------------------------------------------
    99 comment "Settings for libraries running on target"
   100 
   101 config CC_GCC_ENABLE_TARGET_OPTSPACE
   102     bool
   103     prompt "Optimize gcc libs for size"
   104     default y
   105     help
   106       Pass --enable-target-optspace to crossgcc's configure.
   107       
   108       This will compile crossgcc's libs with -Os.
   109 
   110 config CC_GCC_LIBMUDFLAP
   111     bool
   112     prompt "Compile libmudflap"
   113     help
   114       libmudflap is a pointer-use checking tool, which can detect
   115       various mis-usages of pointers in C and (to some extents) C++.
   116       
   117       You should say 'N' here, as libmduflap generates instrumented
   118       code (thus it is a bit bigger and a bit slower) and requires
   119       re-compilation and re-link, while it exists better run-time
   120       alternatives (eg. DUMA, dmalloc...) that need neither re-
   121       compilation nor re-link.
   122 
   123 config CC_GCC_LIBGOMP
   124     bool
   125     prompt "Compile libgomp"
   126     help
   127       libgomp is "the GNU implementation of the OpenMP Application Programming
   128       Interface (API) for multi-platform shared-memory parallel programming in
   129       C/C++ and Fortran". See:
   130         http://gcc.gnu.org/onlinedocs/libgomp/
   131       
   132       The default is 'N'. Say 'Y' if you need it, and report success/failure.
   133 
   134 config CC_GCC_LIBSSP
   135     bool
   136     prompt "Compile libssp"
   137     help
   138       libssp is the run-time Stack-Smashing Protection library.
   139       
   140       The default is 'N'. Say 'Y' if you need it, and report success/failure.
   141 
   142 #-----------------------------------------------------------------------------
   143 
   144 comment "Misc. obscure options."
   145 
   146 config CC_CXA_ATEXIT
   147     bool
   148     prompt "Use __cxa_atexit"
   149     default y
   150     depends on ! BARE_METAL
   151     help
   152       If you get the missing symbol "__cxa_atexit" when building C++ programs,
   153       you might want to try disabling this option.
   154 
   155 config CC_GCC_DISABLE_PCH
   156     bool
   157     prompt "Do not build PCH"
   158     help
   159       Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain.
   160       at the expense of speed when compiling C++ code.
   161       
   162       For some configurations (most notably canadian?), PCH are broken, and
   163       need to be disabled. Please see:
   164         http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
   165 
   166 config CC_GCC_SJLJ_EXCEPTIONS
   167     tristate
   168     prompt "Use sjlj for exceptions"
   169     depends on ! BARE_METAL
   170     default m
   171     help
   172       'sjlj' is short for setjmp/longjmp.
   173       
   174       On some architectures, stack unwinding during exception handling
   175       works perfectly well without using sjlj, while on some others,
   176       use of sjlj is required for proper stack unwinding.
   177       
   178        Option  | sjlj use           | Associated ./configure switch
   179       ---------+--------------------+--------------------------------
   180          Y     | forcibly used      | --enable-sjlj-exceptions
   181          M     | auto               | (none, ./configure decides)
   182          N     | forcibly not used  | --disable-sjlj-exceptions
   183       
   184       It should be safe to say 'M' or 'N'.
   185       
   186       It can happen that ./configure is wrong in some cases. Known
   187       case is for ARM big endian, where you should say 'N'.
   188 
   189 config CC_GCC_LDBL_128
   190     tristate
   191     prompt "Enable 128-bit long doubles"
   192     default m
   193     depends on CC_GCC_4_2_or_later
   194     help
   195       Saying 'Y' will force gcc to use 128-bit wide long doubles
   196       Saying 'N' will force gcc to use 64-bit wide long doubles
   197       Saying 'M' will let gcc choose (default is 128-bit for
   198                  glibc >= 2.4, 64-bit otherwise)
   199       
   200       If in doubt, keep the default, ie. 'M'.