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