config/cc/gcc.in.2
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Aug 19 00:52:05 2011 +0200 (2011-08-19)
branch1.12
changeset 2633 22e779b0a4ed
parent 2523 b1bf9ca6db1a
child 2717 13df2720b374
permissions -rw-r--r--
scripts: simplify and fix the toolchain config script

The script that is installed, and which sole purpose is to dump
the .config that was used to build the toolchain, is pure insanity.

Let's make it much, much more simpler...

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