config/cc/gcc.in.2
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Jun 27 21:03:40 2011 +0200 (2011-06-27)
changeset 2526 e5fb003a354c
parent 2523 b1bf9ca6db1a
child 2717 13df2720b374
permissions -rw-r--r--
configure: disable static linking on Darwin

Static liunking is not supported on Darwin, so hide the corresponding
options when the build machine is Darwin.

Reported-by: Andrea Franceschini <therealmorpheu5@gmail.com>
Reported-by: Bryan Hundven <bryanhundven@gmail.com>
Reported-by: "Titus von Boxberg" <titus@v9g.de>
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_static_link_ok
    48     depends on CONFIGURE_has_static_libstdcxx
    49     depends on CC_GCC_4_4_or_later
    50     help
    51       Newer gcc versions use the PPL library which is C++ code.  Statically
    52       linking libstdc++ increases the likeliness that the gcc binary will
    53       run on machines other than the one which it was built on, without
    54       having to worry about distributing the matching version of libstdc++
    55       along with it.
    56 
    57 #-----------------------------------------------------------------------------
    58 # Optimisation features
    59 
    60 comment "Optimisation features"
    61 
    62 config CC_GCC_USE_GRAPHITE
    63     bool
    64     prompt "Enable GRAPHITE loop optimisations"
    65     default y
    66     depends on CC_GCC_HAS_GRAPHITE
    67     select CC_GCC_USE_PPL_CLOOG
    68     help
    69       Enable the GRAPHITE loop optimsations.
    70       
    71       This requires the PPL and CLooG companion libraries, and
    72       those will be automatically build for you.
    73       
    74       On some systems (eg. Cygwin), PPL and/or CLooG may not
    75       build properly (yet), so you'll have to say 'N' here.
    76 
    77 # The way LTO works is a bit twisted.
    78 # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
    79 # Basically:
    80 #   - if binutils has plugins: LTO is handled by ld/gold by loading
    81 #     the plugin when linking
    82 #   - if binutils does not have plugins: LTO is handled by collect2
    83 # In any case, LTO support does not depend on plugins, but takes
    84 # advantage of it
    85 # Also, only the 4.5 series needs libelf for LTO; 4.6 has dropped
    86 # the dependency.
    87 config CC_GCC_USE_LTO
    88     bool
    89     prompt "Enable LTO"
    90     default y
    91     depends on CC_GCC_HAS_LTO
    92     select CC_GCC_USE_LIBELF if CC_GCC_4_5
    93     help
    94       Enable the Link Time Optimisations.
    95       
    96       This will require the libelf companion library, and it
    97       wil be build automatically for you.
    98 
    99 #-----------------------------------------------------------------------------
   100 comment "Settings for libraries running on target"
   101 
   102 config CC_GCC_ENABLE_TARGET_OPTSPACE
   103     bool
   104     prompt "Optimize gcc libs for size"
   105     default y
   106     help
   107       Pass --enable-target-optspace to crossgcc's configure.
   108       
   109       This will compile crossgcc's libs with -Os.
   110 
   111 config CC_GCC_LIBMUDFLAP
   112     bool
   113     prompt "Compile libmudflap"
   114     help
   115       libmudflap is a pointer-use checking tool, which can detect
   116       various mis-usages of pointers in C and (to some extents) C++.
   117       
   118       You should say 'N' here, as libmduflap generates instrumented
   119       code (thus it is a bit bigger and a bit slower) and requires
   120       re-compilation and re-link, while it exists better run-time
   121       alternatives (eg. DUMA, dmalloc...) that need neither re-
   122       compilation nor re-link.
   123 
   124 config CC_GCC_LIBGOMP
   125     bool
   126     prompt "Compile libgomp"
   127     help
   128       libgomp is "the GNU implementation of the OpenMP Application Programming
   129       Interface (API) for multi-platform shared-memory parallel programming in
   130       C/C++ and Fortran". See:
   131         http://gcc.gnu.org/onlinedocs/libgomp/
   132       
   133       The default is 'N'. Say 'Y' if you need it, and report success/failure.
   134 
   135 config CC_GCC_LIBSSP
   136     bool
   137     prompt "Compile libssp"
   138     help
   139       libssp is the run-time Stack-Smashing Protection library.
   140       
   141       The default is 'N'. Say 'Y' if you need it, and report success/failure.
   142 
   143 #-----------------------------------------------------------------------------
   144 
   145 comment "Misc. obscure options."
   146 
   147 config CC_CXA_ATEXIT
   148     bool
   149     prompt "Use __cxa_atexit"
   150     default y
   151     depends on ! BARE_METAL
   152     help
   153       If you get the missing symbol "__cxa_atexit" when building C++ programs,
   154       you might want to try disabling this option.
   155 
   156 config CC_GCC_DISABLE_PCH
   157     bool
   158     prompt "Do not build PCH"
   159     help
   160       Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain.
   161       at the expense of speed when compiling C++ code.
   162       
   163       For some configurations (most notably canadian?), PCH are broken, and
   164       need to be disabled. Please see:
   165         http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
   166 
   167 config CC_GCC_SJLJ_EXCEPTIONS
   168     tristate
   169     prompt "Use sjlj for exceptions"
   170     depends on ! BARE_METAL
   171     default m
   172     help
   173       'sjlj' is short for setjmp/longjmp.
   174       
   175       On some architectures, stack unwinding during exception handling
   176       works perfectly well without using sjlj, while on some others,
   177       use of sjlj is required for proper stack unwinding.
   178       
   179        Option  | sjlj use           | Associated ./configure switch
   180       ---------+--------------------+--------------------------------
   181          Y     | forcibly used      | --enable-sjlj-exceptions
   182          M     | auto               | (none, ./configure decides)
   183          N     | forcibly not used  | --disable-sjlj-exceptions
   184       
   185       It should be safe to say 'M' or 'N'.
   186       
   187       It can happen that ./configure is wrong in some cases. Known
   188       case is for ARM big endian, where you should say 'N'.
   189 
   190 config CC_GCC_LDBL_128
   191     tristate
   192     prompt "Enable 128-bit long doubles"
   193     default m
   194     depends on CC_GCC_4_2_or_later
   195     help
   196       Saying 'Y' will force gcc to use 128-bit wide long doubles
   197       Saying 'N' will force gcc to use 64-bit wide long doubles
   198       Saying 'M' will let gcc choose (default is 128-bit for
   199                  glibc >= 2.4, 64-bit otherwise)
   200       
   201       If in doubt, keep the default, ie. 'M'.
   202 
   203 config CC_GCC_BUILD_ID
   204     bool
   205     prompt "Enable build-id"
   206     depends on CC_GCC_HAS_BUILD_ID
   207     help
   208       Tells GCC to pass --build-id option to the linker for all final
   209       links (links performed without the -r or --relocatable option),
   210       if the linker supports it. If you say 'y' here, but your linker
   211       does not support --build-id option, a warning is issued and this
   212       option is ignored.
   213       
   214       The default is off.
   215 
   216 choice CC_GCC_LNK_HASH_STYLE_CHOICE
   217     bool
   218     prompt "linker hash style"
   219     depends on CC_GCC_HAS_LNK_HASH_STYLE
   220 
   221 config CC_GCC_LNK_HASH_STYLE_DEFAULT
   222     bool
   223     prompt "Default"
   224     help
   225       Do not specify any value, and use the default value (sysv).
   226 
   227 config CC_GCC_LNK_HASH_STYLE_SYSV
   228     bool
   229     prompt "sysv"
   230     help
   231       Force use of the SYSV hash style.
   232 
   233 config CC_GCC_LNK_HASH_STYLE_GNU
   234     bool
   235     prompt "gnu"
   236     help
   237       Force use of the GNU hash style.
   238 
   239 config CC_GCC_LNK_HASH_STYLE_BOTH
   240     bool
   241     prompt "both"
   242     help
   243       Force use of both hash styles.
   244 
   245 endchoice # CC_GCC_LNK_HASH_STYLE_CHOICE
   246 
   247 config CC_GCC_LNK_HASH_STYLE
   248     string
   249     default ""      if CC_GCC_LNK_HASH_STYLE_DEFAULT
   250     default "sysv"  if CC_GCC_LNK_HASH_STYLE_SYSV
   251     default "gnu"   if CC_GCC_LNK_HASH_STYLE_GNU
   252     default "both"  if CC_GCC_LNK_HASH_STYLE_BOTH
   253 
   254 #-----------------------------------------------------------------------------
   255 
   256 config CC_GCC_HAS_ARCH_OPTIONS
   257     bool
   258 
   259 comment "archictecture-specific options"
   260     depends on CC_GCC_HAS_ARCH_OPTIONS
   261 
   262 if ARCH_mips
   263 source "config/cc/gcc.in.mips"
   264 endif # ARCH_mips