config/cc/gcc.in.2
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Mar 28 01:05:18 2011 +0200 (2011-03-28)
changeset 2362 0888065f8c4d
parent 2287 61608c9365ab
child 2363 bc2714299363
permissions -rw-r--r--
cc/gcc: cleanup the _or_later logic

So far, we've had a version always select appropriate _or_later option,
which in turn would select all previous _or_later options.

Because the dependencies on companion libs were cumulative, that was
working OK. But the upcoming 4.6 will no longer depend on libelf, so
we can't keep the cumulative scheme we've been using so far.

Have each release family select the corresponding dependencies, instead
of relying on selecting previous _or_later.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@2144
     1
# Misc library-related options
yann@2144
     2
yann@2041
     3
config CC_GCC_ENABLE_TARGET_OPTSPACE
yann@2041
     4
    bool
yann@2041
     5
    prompt "Optimize gcc libs for size"
yann@2041
     6
    default y
yann@2041
     7
    help
yann@2041
     8
      Pass --enable-target-optspace to crossgcc's configure.
yann@2041
     9
      
yann@2041
    10
      This will compile crossgcc's libs with -Os.
yann@2041
    11
yann@2122
    12
config CC_GCC_USE_GRAPHITE
yann@2122
    13
    bool
yann@2122
    14
    prompt "Enable GRAPHITE loop optimisations"
yann@2122
    15
    default y
yann@2122
    16
    depends on CC_GCC_HAS_GRAPHITE
yann@2122
    17
    select CC_GCC_USE_PPL_CLOOG
yann@2122
    18
    help
yann@2122
    19
      Enable the GRAPHITE loop optimsations.
yann@2122
    20
      
yann@2122
    21
      This requires the PPL and CLooG companion libraries, and
yann@2122
    22
      those will be automatically build for you.
yann@2122
    23
      
yann@2122
    24
      On some systems (eg. Cygwin), PPL and/or CLooG may not
yann@2122
    25
      build properly (yet), so you'll have to say 'N' here.
yann@2122
    26
yann@2287
    27
# The way LTO works is a bit twisted.
yann@2287
    28
# See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
yann@2287
    29
# Basically:
yann@2287
    30
#   - if binutils has plugins: LTO is handled by ld/gold by loading
yann@2287
    31
#     the plugin when linking
yann@2287
    32
#   - if binutils does not have plugins: LTO is handled by collect2
yann@2287
    33
# In any case, LTO support does not depend on plugins, but takes
yann@2287
    34
# advantage of it
yann@2362
    35
# Also, only the 4.5 series needs libelf for LTO
yann@2122
    36
config CC_GCC_USE_LTO
yann@2122
    37
    bool
yann@2122
    38
    prompt "Enable LTO"
yann@2122
    39
    default y
yann@2122
    40
    depends on CC_GCC_HAS_LTO
yann@2362
    41
    select CC_GCC_USE_LIBELF if CC_GCC_4_5
yann@2122
    42
    help
yann@2122
    43
      Enable the Link Time Optimisations.
yann@2122
    44
      
yann@2122
    45
      This will require the libelf companion library, and it
yann@2122
    46
      wil be build automatically for you.
yann@2122
    47
bryanhundven@2211
    48
config STATIC_TOOLCHAIN
bryanhundven@2211
    49
    select CC_STATIC_LIBSTDCXX if CC_GCC_4_4_or_later
bryanhundven@2211
    50
js@2045
    51
config CC_STATIC_LIBSTDCXX
js@2045
    52
    bool
js@2045
    53
    prompt "Link libstdc++ statically into the gcc binary"
js@2045
    54
    default y
js@2045
    55
    depends on CC_GCC_4_4_or_later
js@2045
    56
    help
js@2045
    57
      Newer gcc versions use the PPL library which is C++ code.  Statically
js@2045
    58
      linking libstdc++ increases the likeliness that the gcc binary will
js@2045
    59
      run on machines other than the one which it was built on, without
js@2045
    60
      having to worry about distributing the matching version of libstdc++
js@2045
    61
      along with it.
js@2045
    62
yann@2144
    63
config CC_GCC_LIBMUDFLAP
yann@2144
    64
    bool
yann@2144
    65
    prompt "Compile libmudflap"
yann@2144
    66
    default n
yann@2144
    67
    help
yann@2144
    68
      libmudflap is a pointer-use checking tool, which can detect
yann@2144
    69
      various mis-usages of pointers in C and (to some extents) C++.
yann@2144
    70
      
yann@2144
    71
      You should say 'N' here, as libmduflap generates instrumented
yann@2144
    72
      code (thus it is a bit bigger and a bit slower) and requires
yann@2144
    73
      re-compilation and re-link, while it exists better run-time
yann@2144
    74
      alternatives (eg. DUMA, dmalloc...) that need neither re-
yann@2144
    75
      compilation nor re-link.
yann@2144
    76
yann@2145
    77
config CC_GCC_LIBGOMP
yann@2145
    78
    bool
yann@2145
    79
    prompt "Compile libgomp"
yann@2145
    80
    default n
yann@2145
    81
    help
yann@2145
    82
      libgomp is "the GNU implementation of the OpenMP Application Programming
yann@2145
    83
      Interface (API) for multi-platform shared-memory parallel programming in
yann@2145
    84
      C/C++ and Fortran". See:
yann@2145
    85
        http://gcc.gnu.org/onlinedocs/libgomp/
yann@2145
    86
      
yann@2145
    87
      The default is 'N'. Say 'Y' if you need it, and report success/failure.
yann@2145
    88
yann@2146
    89
config CC_GCC_LIBSSP
yann@2146
    90
    bool
yann@2146
    91
    prompt "Compile libssp"
yann@2146
    92
    default n
yann@2146
    93
    help
yann@2146
    94
      libssp is the run-time Stack-Smashing Protection library.
yann@2146
    95
      
yann@2146
    96
      The default is 'N'. Say 'Y' if you need it, and report success/failure.
yann@2146
    97
yann@2144
    98
#-----------------------------------------------------------------------------
yann@2144
    99
yann@2041
   100
comment "Misc. obscure options."
yann@2041
   101
yann@2041
   102
config CC_CXA_ATEXIT
yann@2041
   103
    bool
yann@2041
   104
    prompt "Use __cxa_atexit"
yann@2041
   105
    default y
yann@2041
   106
    depends on ! BARE_METAL
yann@2041
   107
    help
yann@2041
   108
      If you get the missing symbol "__cxa_atexit" when building C++ programs,
yann@2041
   109
      you might want to try disabling this option.
yann@2041
   110
yann@2041
   111
config CC_GCC_DISABLE_PCH
yann@2041
   112
    bool
yann@2041
   113
    prompt "Do not build PCH"
yann@2041
   114
    default n
yann@2041
   115
    help
yann@2041
   116
      Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain.
yann@2041
   117
      at the expense of speed when compiling C++ code.
yann@2041
   118
      
yann@2041
   119
      For some configurations (most notably canadian?), PCH are broken, and
yann@2041
   120
      need to be disabled. Please see:
yann@2041
   121
        http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
yann@2041
   122
yann@2042
   123
config CC_GCC_SJLJ_EXCEPTIONS
yann@2042
   124
    tristate
yann@2041
   125
    prompt "Use sjlj for exceptions"
yann@2054
   126
    depends on ! BARE_METAL
yann@2042
   127
    default m
yann@2041
   128
    help
yann@2042
   129
      'sjlj' is short for setjmp/longjmp.
yann@2041
   130
      
yann@2042
   131
      On some architectures, stack unwinding during exception handling
yann@2042
   132
      works perfectly well without using sjlj, while on some others,
yann@2042
   133
      use of sjlj is required for proper stack unwinding.
yann@2041
   134
      
yann@2042
   135
       Option  | sjlj use           | Associated ./configure switch
yann@2042
   136
      ---------+--------------------+--------------------------------
yann@2042
   137
         Y     | forcibly used      | --enable-sjlj-exceptions
yann@2042
   138
         M     | auto               | (none, ./configure decides)
yann@2042
   139
         N     | forcibly not used  | --disable-sjlj-exceptions
yann@2041
   140
      
yann@2042
   141
      It should be safe to say 'M' or 'N'.
yann@2042
   142
      
yann@2042
   143
      It can happen that ./configure is wrong in some cases. Known
yann@2042
   144
      case is for ARM big endian, where you should say 'N'.
yann@2043
   145
yann@2143
   146
config CC_GCC_LDBL_128
yann@2143
   147
    tristate
yann@2143
   148
    prompt "Enable 128-bit long doubles"
yann@2143
   149
    default m
yann@2143
   150
    depends on CC_GCC_4_2_or_later
yann@2143
   151
    help
yann@2143
   152
      Saying 'Y' will force gcc to use 128-bit wide long doubles
yann@2143
   153
      Saying 'N' will force gcc to use 64-bit wide long doubles
yann@2143
   154
      Saying 'M' will let gcc choose (default is 128-bit for
yann@2143
   155
                 glibc >= 2.4, 64-bit otherwise)
yann@2143
   156
      
yann@2143
   157
      If in doubt, keep the default, ie. 'M'.