config/cc/gcc.in
author Arnaud Lacombe <lacombar@gmail.com>
Wed Apr 07 18:35:22 2010 +0200 (2010-04-07)
changeset 1881 5284cdc29a63
parent 1848 3f54c8d7f3f9
child 1920 6df2d4f78948
permissions -rw-r--r--
cc/gcc: fix thread-less final gcc build

If threads are disabled in libc, we don't want to enable them in the
final compiler. Doing so pass the configure stage, but fails latter on
a missing <pthread.h>.

Moreover, we don't want to build libgomp if threads are disabled; its
configure script would fails anyway.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
     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_4_3
    23     bool
    24     prompt "4.4.3"
    25     select CC_GCC_4_4_or_later
    26 
    27 config CC_V_4_4_2
    28     bool
    29     prompt "4.4.2"
    30     select CC_GCC_4_4_or_later
    31 
    32 config CC_V_4_4_1
    33     bool
    34     prompt "4.4.1"
    35     select CC_GCC_4_4_or_later
    36 
    37 config CC_V_4_4_0
    38     bool
    39     prompt "4.4.0"
    40     select CC_GCC_4_4_or_later
    41 
    42 config CC_V_4_3_4
    43     bool
    44     prompt "4.3.4"
    45     select CC_GCC_4_3_or_later
    46 
    47 config CC_V_4_3_3
    48     bool
    49     prompt "4.3.3"
    50     select CC_GCC_4_3_or_later
    51 
    52 config CC_V_4_3_2
    53     bool
    54     prompt "4.3.2"
    55     select CC_GCC_4_3_or_later
    56 
    57 config CC_V_4_3_1
    58     bool
    59     prompt "4.3.1"
    60     select CC_GCC_4_3_or_later
    61 
    62 config CC_V_4_2_4
    63     bool
    64     prompt "4.2.4"
    65     select CC_GCC_4_2_or_later
    66 
    67 config CC_V_4_2_3
    68     bool
    69     prompt "4.2.3 (OBSOLETE)"
    70     select CC_GCC_4_2_or_later
    71     depends on OBSOLETE
    72 
    73 config CC_V_4_2_2
    74     bool
    75     prompt "4.2.2"
    76     select CC_GCC_4_2_or_later
    77 
    78 config CC_V_4_2_1
    79     bool
    80     prompt "4.2.1 (OBSOLETE)"
    81     select CC_GCC_4_2_or_later
    82     depends on OBSOLETE
    83 
    84 config CC_V_4_2_0
    85     bool
    86     prompt "4.2.0 (OBSOLETE)"
    87     select CC_GCC_4_2_or_later
    88     depends on OBSOLETE
    89 
    90 config CC_V_4_1_2
    91     bool
    92     prompt "4.1.2 (OBSOLETE)"
    93     depends on OBSOLETE
    94 
    95 config CC_V_4_0_4
    96     bool
    97     prompt "4.0.4 (OBSOLETE)"
    98     depends on OBSOLETE
    99 
   100 config CC_V_3_4_6
   101     bool
   102     prompt "3.4.6 (OBSOLETE)"
   103     depends on OBSOLETE
   104 
   105 endchoice
   106 
   107 config CC_GCC_4_2_or_later
   108     bool
   109     default n
   110 
   111 config CC_GCC_4_3_or_later
   112     bool
   113     default n
   114     select CC_GCC_4_2_or_later
   115     select CC_GCC_USE_GMP_MPFR
   116 
   117 config CC_GCC_4_4_or_later
   118     bool
   119     default n
   120     select CC_GCC_4_3_or_later
   121     select CC_GCC_4_2_or_later
   122     select CC_GCC_USE_PPL_CLOOG_MPC
   123 
   124 config CC_GCC_USE_GMP_MPFR
   125     bool
   126     default n
   127     select GMP
   128     select MPFR
   129 
   130 config CC_GCC_USE_PPL_CLOOG_MPC
   131     bool
   132     default n
   133     select PPL
   134     select CLOOG
   135     select MPC
   136 
   137 config CC_VERSION
   138     string
   139 # Don't remove next line
   140 # CT_INSERT_VERSION_STRING_BELOW
   141     default "4.4.3" if CC_V_4_4_3
   142     default "4.4.2" if CC_V_4_4_2
   143     default "4.4.1" if CC_V_4_4_1
   144     default "4.4.0" if CC_V_4_4_0
   145     default "4.3.4" if CC_V_4_3_4
   146     default "4.3.3" if CC_V_4_3_3
   147     default "4.3.2" if CC_V_4_3_2
   148     default "4.3.1" if CC_V_4_3_1
   149     default "4.3.0" if CC_V_4_3_0
   150     default "4.2.4" if CC_V_4_2_4
   151     default "4.2.3" if CC_V_4_2_3
   152     default "4.2.2" if CC_V_4_2_2
   153     default "4.2.1" if CC_V_4_2_1
   154     default "4.2.0" if CC_V_4_2_0
   155     default "4.1.2" if CC_V_4_1_2
   156     default "4.0.4" if CC_V_4_0_4
   157     default "3.4.6" if CC_V_3_4_6
   158 
   159 config CC_CXA_ATEXIT
   160     bool
   161     prompt "Use __cxa_atexit"
   162     default y
   163     depends on ! BARE_METAL
   164     help
   165       If you get the missing symbol "__cxa_atexit" when building C++ programs,
   166       you might want to try disabling this option.
   167 
   168 choice
   169     bool
   170     prompt "Use sjlj for exceptions"
   171     default CC_SJLJ_EXCEPTIONS_CONFIGURE
   172     depends on ! BARE_METAL
   173 
   174 # This config option is used nowhere in the code on purpose.
   175 # It only serves as a choice entry to force neither using nor not using sjlj
   176 config CC_SJLJ_EXCEPTIONS_CONFIGURE
   177     bool
   178     prompt "Let configure decide"
   179     help
   180       Let configure decide if setjmp/longjmp should be used to handle
   181       exceptions.
   182       
   183       Choose that if you trust configure to detect the correct settings.
   184       This is the default choice.
   185 
   186 config CC_SJLJ_EXCEPTIONS_USE
   187     bool
   188     prompt "Force using sjlj"
   189     help
   190       Do use setjmp/longjmp for exceptions.
   191       This is gcc's --enable-sjlj-exceptions configure switch.
   192       
   193       Choose that if you want to use setjmp/longjmp to handle exceptions.
   194 
   195 config CC_SJLJ_EXCEPTIONS_DONT_USE
   196     bool
   197     prompt "Force not using sjlj"
   198     help
   199       Do not use setjmp/longjmp for exceptions.
   200       This is gcc's --disable-sjlj-exceptions configure switch.
   201       
   202       Choose that if you want to not use setjmp/longjmp to handle exceptions.
   203 
   204 endchoice
   205 
   206 config CC_ENABLE_CXX_FLAGS
   207     string
   208     prompt "Flags to pass to --enable-cxx-flags"
   209     default ""
   210     help
   211       Enter here the value of the gcc's ./configure option --enable-cxx-flags.
   212       Leave empty if you don't know better.
   213       
   214       Note: just pass in the option _value_, that is only the part that goes
   215       after the '=' sign.
   216 
   217 config CC_CORE_EXTRA_CONFIG
   218     string
   219     prompt "Core gcc extra config"
   220     default ""
   221     help
   222       Extra flags to pass onto ./configure when configuring the core gcc.
   223       
   224       The core gcc is a stripped down, C-only compiler needed to build
   225       the C library. Kinda bootstrap gcc, if you wish.
   226 
   227 config CC_EXTRA_CONFIG
   228     string
   229     prompt "gcc extra config"
   230     default ""
   231     depends on ! BARE_METAL
   232     help
   233       Extra flags to pass onto ./configure when configuring gcc.
   234 
   235 config CC_PKGVERSION
   236     string
   237     prompt "gcc ID string"
   238     depends on CC_GCC_4_3_or_later
   239     default "crosstool-NG-${CT_VERSION}"
   240     help
   241       Specify a string that identifies your package. You may wish to include
   242       a build number or build date. This version string will be included in
   243       the output of gcc --version.
   244 
   245       This is passed to the configure flag --with-pkgversion.
   246 
   247 config CC_BUGURL
   248     string
   249     prompt "gcc bug URL"
   250     depends on CC_GCC_4_3_or_later
   251     default ""
   252     help
   253       Specify the URL that users should visit if they wish to report a bug.
   254 
   255 config CC_LANG_JAVA_USE_ECJ
   256     bool
   257     default y
   258     depends on CC_LANG_JAVA
   259     depends on CC_GCC_4_3_or_later