config/cc/gcc.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Mar 26 18:47:34 2009 +0000 (2009-03-26)
changeset 1268 5594b05bc2d8
parent 1162 31348b787bed
child 1319 d8e8cd26eae1
permissions -rw-r--r--
Add support for building toolchains with gcc-4.4 snapshots.
Initial patch by Dmitry PLOTNIKOV: http://sourceware.org/ml/crossgcc/2009-03/msg00053.html
It [the toolchain] uses current ct-ng (nightly snapshot 20090324, latest
release 1.3.2 work also), glibc 2.9 (from CVS), binutils 2.19 and latest
snapshot of GCC 4.4.0 (as of March 20, 2009).

We have successfully built linux kernel 2.6.29 and a lot of other stuff
with this toolchain.

Here's the patch that adds GCC 4.4.0 to the ct-ng menu and enables it to
download a 4.4.0 snapshot from ftp.

Patch was adpated by me, mostly to better fit the configuration layout.

/trunk/scripts/build/cc/gcc.sh | 34 22 12 0 ++++++++++++++++++++++------------
/trunk/config/cc/gcc.in | 35 30 5 0 ++++++++++++++++++++++++++++++-----
2 files changed, 52 insertions(+), 17 deletions(-)
     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 
    20 config CC_V_3_2_3
    21     bool
    22     prompt "3.2.3 (OBSOLETE)"
    23     depends on OBSOLETE
    24 
    25 config CC_V_3_3_6
    26     bool
    27     prompt "3.3.6 (OBSOLETE)"
    28     depends on OBSOLETE
    29 
    30 config CC_V_3_4_6
    31     bool
    32     prompt "3.4.6 (OBSOLETE)"
    33     depends on OBSOLETE
    34 
    35 config CC_V_4_0_0
    36     bool
    37     prompt "4.0.0 (OBSOLETE)"
    38     depends on OBSOLETE
    39 
    40 config CC_V_4_0_1
    41     bool
    42     prompt "4.0.1 (OBSOLETE)"
    43     depends on OBSOLETE
    44 
    45 config CC_V_4_0_2
    46     bool
    47     prompt "4.0.2 (OBSOLETE)"
    48     depends on OBSOLETE
    49 
    50 config CC_V_4_0_3
    51     bool
    52     prompt "4.0.3 (OBSOLETE)"
    53     depends on OBSOLETE
    54 
    55 config CC_V_4_0_4
    56     bool
    57     prompt "4.0.4"
    58 
    59 config CC_V_4_1_0
    60     bool
    61     prompt "4.1.0 (OBSOLETE)"
    62     depends on OBSOLETE
    63 
    64 config CC_V_4_1_1
    65     bool
    66     prompt "4.1.1 (OBSOLETE)"
    67     depends on OBSOLETE
    68 
    69 config CC_V_4_1_2
    70     bool
    71     prompt "4.1.2"
    72 
    73 config CC_V_4_2_0
    74     bool
    75     prompt "4.2.0"
    76 
    77 config CC_V_4_2_1
    78     bool
    79     prompt "4.2.1"
    80 
    81 config CC_V_4_2_2
    82     bool
    83     prompt "4.2.2"
    84 
    85 config CC_V_4_2_3
    86     bool
    87     prompt "4.2.3"
    88 
    89 config CC_V_4_2_4
    90     bool
    91     prompt "4.2.4"
    92 
    93 config CC_V_4_3_0
    94     bool
    95     prompt "4.3.0 (EXPERIMENTAL)"
    96     depends on EXPERIMENTAL
    97     select CC_GCC_4_3_or_later
    98 
    99 config CC_V_4_3_1
   100     bool
   101     prompt "4.3.1"
   102     select CC_GCC_4_3_or_later
   103 
   104 config CC_V_4_3_2
   105     bool
   106     prompt "4.3.2"
   107     select CC_GCC_4_3_or_later
   108 
   109 config CC_V_4_3_3
   110     bool
   111     prompt "4.3.3 (EXPERIMENTAL)"
   112     depends on EXPERIMENTAL
   113     select CC_GCC_4_3_or_later
   114 
   115 config CC_V_4_4_0
   116     bool
   117     prompt "4.4.0 snapshot"
   118     depends on EXPERIMENTAL
   119     select CC_GCC_4_3_or_later
   120     select CC_GCC_4_4_snapshot
   121 
   122 # CT_INSERT_VERSION_ABOVE
   123 # Don't remove above line!
   124 endchoice
   125 
   126 config CC_GCC_4_3_or_later
   127     bool
   128     default n
   129     select GMP_MPFR
   130 
   131 config CC_GCC_4_4_snapshot
   132     bool
   133     default n
   134 
   135 config CC_GCC_4_4_snapshot_date
   136     string
   137     prompt "Snapshot date"
   138     depends on CC_GCC_4_4_snapshot
   139     help
   140       Enter the snapshot date in the form YYYYMMDD.
   141       Snapshots are made every friday, at around 22:30 GMT+1,
   142       so look at your calendar to find a suitable date.
   143       
   144       Also, know that crosstool-NG does *not* carry any patch
   145       for the gcc-4.4 snapshots. So, you may have to answer
   146       'y' to CUSTOM_PATCH, and set CUSTOM_PATCH_DIR adequately.
   147 
   148 config CC_VERSION
   149     string
   150     default "3.2.3" if CC_V_3_2_3
   151     default "3.3.6" if CC_V_3_3_6
   152     default "3.4.6" if CC_V_3_4_6
   153     default "4.0.0" if CC_V_4_0_0
   154     default "4.0.1" if CC_V_4_0_1
   155     default "4.0.2" if CC_V_4_0_2
   156     default "4.0.3" if CC_V_4_0_3
   157     default "4.0.4" if CC_V_4_0_4
   158     default "4.1.0" if CC_V_4_1_0
   159     default "4.1.1" if CC_V_4_1_1
   160     default "4.1.2" if CC_V_4_1_2
   161     default "4.2.0" if CC_V_4_2_0
   162     default "4.2.1" if CC_V_4_2_1
   163     default "4.2.2" if CC_V_4_2_2
   164     default "4.2.3" if CC_V_4_2_3
   165     default "4.2.4" if CC_V_4_2_4
   166     default "4.3.0" if CC_V_4_3_0
   167     default "4.3.1" if CC_V_4_3_1
   168     default "4.3.2" if CC_V_4_3_2
   169     default "4.3.3" if CC_V_4_3_3
   170     default "4.4-" if CC_V_4_4_0
   171 # CT_INSERT_VERSION_STRING_ABOVE
   172 # Don't remove above line!
   173 
   174 config CC_CXA_ATEXIT
   175     bool
   176     prompt "Use __cxa_atexit"
   177     default y
   178     depends on ! BARE_METAL
   179     help
   180       If you get the missing symbol "__cxa_atexit" when building C++ programs,
   181       you might want to try disabling this option.
   182 
   183 choice
   184     bool
   185     prompt "Use sjlj for exceptions"
   186     default CC_SJLJ_EXCEPTIONS_CONFIGURE
   187     depends on ! BARE_METAL
   188 
   189 # This config option is used nowhere in the code on purpose.
   190 # It only serves as a choice entry to force neither using nor not using sjlj
   191 config CC_SJLJ_EXCEPTIONS_CONFIGURE
   192     bool
   193     prompt "Let configure decide"
   194     help
   195       Let configure decide if setjmp/longjmp should be used to handle
   196       exceptions.
   197       
   198       Choose that if you trust configure to detect the correct settings.
   199       This is the default choice.
   200 
   201 config CC_SJLJ_EXCEPTIONS_USE
   202     bool
   203     prompt "Force using sjlj"
   204     help
   205       Do use setjmp/longjmp for exceptions.
   206       This is gcc's --enable-sjlj-exceptions configure switch.
   207       
   208       Choose that if you want to use setjmp/longjmp to handle exceptions.
   209 
   210 config CC_SJLJ_EXCEPTIONS_DONT_USE
   211     bool
   212     prompt "Force not using sjlj"
   213     help
   214       Do not use setjmp/longjmp for exceptions.
   215       This is gcc's --disable-sjlj-exceptions configure switch.
   216       
   217       Choose that if you want to not use setjmp/longjmp to handle exceptions.
   218 
   219 endchoice
   220 
   221 config CC_CORE_EXTRA_CONFIG
   222     string
   223     prompt "Core gcc extra config"
   224     default ""
   225     help
   226       Extra flags to pass onto ./configure when configuring the core gcc.
   227       
   228       The core gcc is a stripped down, C-only compiler needed to build
   229       the C library. Kinda bootstrap gcc, if you wish.
   230 
   231 config CC_EXTRA_CONFIG
   232     string
   233     prompt "gcc extra config"
   234     default ""
   235     depends on ! BARE_METAL
   236     help
   237       Extra flags to pass onto ./configure when configuring gcc.
   238 
   239 config CC_PKGVERSION
   240     string
   241     prompt "gcc ID string"
   242     depends on CC_GCC_4_3_or_later
   243     default "crosstool-NG-${CT_VERSION}"
   244     help
   245       Specify a string that identifies your package. You may wish to include
   246       a build number or build date. This version string will be included in
   247       the output of gcc --version.
   248 
   249       This is passed to the configure flag --with-pkgversion.
   250 
   251 config CC_BUGURL
   252     string
   253     prompt "gcc bug URL"
   254     depends on CC_GCC_4_3_or_later
   255     default ""
   256     help
   257       Specify the URL that users should visit if they wish to report a bug.
   258 
   259 config CC_LANG_JAVA_USE_ECJ
   260     bool
   261     default y
   262     depends on CC_LANG_JAVA
   263     depends on CC_GCC_4_3_or_later