config/cc/gcc.in.2
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon May 30 23:05:28 2011 +0200 (2011-05-30)
changeset 2496 cc9b84a83b34
parent 2486 328816f6e606
child 2500 ba1e71fa72a9
permissions -rw-r--r--
glibc: properly handle internal addons

Some addons are bundled with glibc/eglibc, so we should not try to
download and extract them.

This is done as thus:
- at download time:
- if the add-on download fails, keep going;
- at extract time:
- if the addon is present in the source tree, ignore it;
- if the addon is missing in the source tree:
- if the archive is present, extract it;
- if the archive is missing, bail out.

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