config/cc/gcc.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jun 17 21:26:23 2010 +0200 (2010-06-17)
changeset 1991 1974075aa641
parent 1972 7939e7e0573d
child 2014 cd9322b076d7
permissions -rw-r--r--
cc/gcc: add option do disable PCH

In some cases, using Pre-Compiled Headers breaks the build.
Ass an option to disable building the PCH, as suggested by:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
     1 # Compiler options
     2 
     3 config CC_gcc
     4     select CC_SUPPORT_CXX
     5     select CC_SUPPORT_FORTRAN
     6     select CC_SUPPORT_JAVA
     7     select CC_SUPPORT_ADA
     8     select CC_SUPPORT_OBJC
     9     select CC_SUPPORT_OBJCXX
    10     help
    11       gcc is the full-blown GNU compiler. This is what most people will choose.
    12       
    13       gcc supports many languages, a powerful code parser, optimised binary
    14       output, and lots of other features.
    15 
    16 choice
    17     bool
    18     prompt "gcc version"
    19 # Don't remove next line
    20 # CT_INSERT_VERSION_BELOW
    21 
    22 config CC_V_4_5_0
    23     bool
    24     prompt "4.5.0 (EXPERIMENTAL)"
    25     depends on EXPERIMENTAL
    26     select CC_GCC_4_5_or_later
    27 
    28 config CC_V_4_4_4
    29     bool
    30     prompt "4.4.4 (EXPERIMENTAL)"
    31     depends on EXPERIMENTAL
    32     select CC_GCC_4_4_or_later
    33 
    34 config CC_V_4_4_3
    35     bool
    36     prompt "4.4.3"
    37     select CC_GCC_4_4_or_later
    38 
    39 config CC_V_4_4_2
    40     bool
    41     prompt "4.4.2"
    42     select CC_GCC_4_4_or_later
    43 
    44 config CC_V_4_4_1
    45     bool
    46     prompt "4.4.1"
    47     select CC_GCC_4_4_or_later
    48 
    49 config CC_V_4_4_0
    50     bool
    51     prompt "4.4.0"
    52     select CC_GCC_4_4_or_later
    53 
    54 config CC_V_4_3_4
    55     bool
    56     prompt "4.3.4"
    57     select CC_GCC_4_3_or_later
    58 
    59 config CC_V_4_3_3
    60     bool
    61     prompt "4.3.3"
    62     select CC_GCC_4_3_or_later
    63 
    64 config CC_V_4_3_2
    65     bool
    66     prompt "4.3.2"
    67     select CC_GCC_4_3_or_later
    68 
    69 config CC_V_4_3_1
    70     bool
    71     prompt "4.3.1"
    72     select CC_GCC_4_3_or_later
    73 
    74 config CC_V_4_2_4
    75     bool
    76     prompt "4.2.4"
    77     select CC_GCC_4_2_or_later
    78 
    79 config CC_V_4_2_3
    80     bool
    81     prompt "4.2.3 (OBSOLETE)"
    82     select CC_GCC_4_2_or_later
    83     depends on OBSOLETE
    84 
    85 config CC_V_4_2_2
    86     bool
    87     prompt "4.2.2"
    88     select CC_GCC_4_2_or_later
    89 
    90 config CC_V_4_2_1
    91     bool
    92     prompt "4.2.1 (OBSOLETE)"
    93     select CC_GCC_4_2_or_later
    94     depends on OBSOLETE
    95 
    96 config CC_V_4_2_0
    97     bool
    98     prompt "4.2.0 (OBSOLETE)"
    99     select CC_GCC_4_2_or_later
   100     depends on OBSOLETE
   101 
   102 config CC_V_4_1_2
   103     bool
   104     prompt "4.1.2 (OBSOLETE)"
   105     depends on OBSOLETE
   106 
   107 config CC_V_4_0_4
   108     bool
   109     prompt "4.0.4 (OBSOLETE)"
   110     depends on OBSOLETE
   111 
   112 config CC_V_3_4_6
   113     bool
   114     prompt "3.4.6 (OBSOLETE)"
   115     depends on OBSOLETE
   116 
   117 endchoice
   118 
   119 config CC_GCC_4_2_or_later
   120     bool
   121     default n
   122 
   123 config CC_GCC_4_3_or_later
   124     bool
   125     default n
   126     select CC_GCC_4_2_or_later
   127     select CC_GCC_USE_GMP_MPFR
   128 
   129 config CC_GCC_4_4_or_later
   130     bool
   131     default n
   132     select CC_GCC_4_3_or_later
   133     select CC_GCC_4_2_or_later
   134     select CC_GCC_USE_PPL_CLOOG_MPC
   135 
   136 config CC_GCC_4_5_or_later
   137     bool
   138     default n
   139     select CC_GCC_4_4_or_later
   140     select CC_GCC_4_3_or_later
   141     select CC_GCC_4_2_or_later
   142     select CC_GCC_USE_LIBELF
   143 
   144 config CC_GCC_USE_GMP_MPFR
   145     bool
   146     default n
   147     select GMP
   148     select MPFR
   149 
   150 config CC_GCC_USE_PPL_CLOOG_MPC
   151     bool
   152     default n
   153     select PPL
   154     select CLOOG
   155     select MPC
   156 
   157 config CC_GCC_USE_LIBELF
   158     bool
   159     default n
   160     select LIBELF
   161 
   162 config CC_VERSION
   163     string
   164 # Don't remove next line
   165 # CT_INSERT_VERSION_STRING_BELOW
   166     default "4.5.0" if CC_V_4_5_0
   167     default "4.4.4" if CC_V_4_4_4
   168     default "4.4.3" if CC_V_4_4_3
   169     default "4.4.2" if CC_V_4_4_2
   170     default "4.4.1" if CC_V_4_4_1
   171     default "4.4.0" if CC_V_4_4_0
   172     default "4.3.4" if CC_V_4_3_4
   173     default "4.3.3" if CC_V_4_3_3
   174     default "4.3.2" if CC_V_4_3_2
   175     default "4.3.1" if CC_V_4_3_1
   176     default "4.3.0" if CC_V_4_3_0
   177     default "4.2.4" if CC_V_4_2_4
   178     default "4.2.3" if CC_V_4_2_3
   179     default "4.2.2" if CC_V_4_2_2
   180     default "4.2.1" if CC_V_4_2_1
   181     default "4.2.0" if CC_V_4_2_0
   182     default "4.1.2" if CC_V_4_1_2
   183     default "4.0.4" if CC_V_4_0_4
   184     default "3.4.6" if CC_V_3_4_6
   185 
   186 config CC_CXA_ATEXIT
   187     bool
   188     prompt "Use __cxa_atexit"
   189     default y
   190     depends on ! BARE_METAL
   191     help
   192       If you get the missing symbol "__cxa_atexit" when building C++ programs,
   193       you might want to try disabling this option.
   194 
   195 choice
   196     bool
   197     prompt "Use sjlj for exceptions"
   198     default CC_SJLJ_EXCEPTIONS_CONFIGURE
   199     depends on ! BARE_METAL
   200 
   201 # This config option is used nowhere in the code on purpose.
   202 # It only serves as a choice entry to force neither using nor not using sjlj
   203 config CC_SJLJ_EXCEPTIONS_CONFIGURE
   204     bool
   205     prompt "Let configure decide"
   206     help
   207       Let configure decide if setjmp/longjmp should be used to handle
   208       exceptions.
   209       
   210       Choose that if you trust configure to detect the correct settings.
   211       This is the default choice.
   212 
   213 config CC_SJLJ_EXCEPTIONS_USE
   214     bool
   215     prompt "Force using sjlj"
   216     help
   217       Do use setjmp/longjmp for exceptions.
   218       This is gcc's --enable-sjlj-exceptions configure switch.
   219       
   220       Choose that if you want to use setjmp/longjmp to handle exceptions.
   221 
   222 config CC_SJLJ_EXCEPTIONS_DONT_USE
   223     bool
   224     prompt "Force not using sjlj"
   225     help
   226       Do not use setjmp/longjmp for exceptions.
   227       This is gcc's --disable-sjlj-exceptions configure switch.
   228       
   229       Choose that if you want to not use setjmp/longjmp to handle exceptions.
   230 
   231 endchoice
   232 
   233 config CC_ENABLE_CXX_FLAGS
   234     string
   235     prompt "Flags to pass to --enable-cxx-flags"
   236     default ""
   237     help
   238       Enter here the value of the gcc's ./configure option --enable-cxx-flags.
   239       Leave empty if you don't know better.
   240       
   241       Note: just pass in the option _value_, that is only the part that goes
   242       after the '=' sign.
   243 
   244 config CC_CORE_EXTRA_CONFIG
   245     string
   246     prompt "Core gcc extra config"
   247     default ""
   248     help
   249       Extra flags to pass onto ./configure when configuring the core gcc.
   250       
   251       The core gcc is a stripped down, C-only compiler needed to build
   252       the C library. Kinda bootstrap gcc, if you wish.
   253 
   254 config CC_EXTRA_CONFIG
   255     string
   256     prompt "gcc extra config"
   257     default ""
   258     depends on ! BARE_METAL
   259     help
   260       Extra flags to pass onto ./configure when configuring gcc.
   261 
   262 config CC_GCC_ENABLE_TARGET_OPTSPACE
   263     bool
   264     prompt "Optimize gcc libs for size"
   265     default y
   266     help
   267       Pass --enable-target-optspace to crossgcc's configure.
   268 
   269       This will compile crossgcc's libs with -Os.
   270 
   271 config CC_GCC_DISABLE_PCH
   272     bool
   273     prompt "Do not build PCH"
   274     default n
   275     help
   276       Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain.
   277       at the expense of speed when compiling C++ code.
   278       
   279       For some configurations (most notably canadian?), PCH are broken, and
   280       need to be disabled.  Please see:
   281         http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
   282 
   283 config CC_PKGVERSION
   284     string
   285     prompt "gcc ID string"
   286     depends on CC_GCC_4_3_or_later
   287     default "crosstool-NG-${CT_VERSION}"
   288     help
   289       Specify a string that identifies your package. You may wish to include
   290       a build number or build date. This version string will be included in
   291       the output of gcc --version.
   292 
   293       This is passed to the configure flag --with-pkgversion.
   294 
   295 config CC_BUGURL
   296     string
   297     prompt "gcc bug URL"
   298     depends on CC_GCC_4_3_or_later
   299     default ""
   300     help
   301       Specify the URL that users should visit if they wish to report a bug.
   302 
   303 config CC_LANG_JAVA_USE_ECJ
   304     bool
   305     default y
   306     depends on CC_LANG_JAVA
   307     depends on CC_GCC_4_3_or_later