config/companion_libs.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Feb 17 23:41:17 2010 +0100 (2010-02-17)
changeset 1811 35cf5e2f110a
parent 1810 e44f67656c5f
child 1847 c311bf33c64d
permissions -rw-r--r--
comp-libs: make libelf a companion library

When gcc-4.5 is out, it will require libelf. So better make it a
companion library now rather than postponing the ineluctable.
     1 # Companion libraries config options
     2 # Those libraries are required for different versions of gcc,
     3 # and can be used by binutils and gdb (maybe others as well).
     4 
     5 menu "Companion libraries"
     6 
     7 comment "FIXME: check real dependencies!!!"
     8 
     9 config COMPLIBS
    10     bool
    11     default n
    12 
    13 config WRAPPER_NEEDED
    14     bool
    15     default n
    16 
    17 config GMP
    18     bool
    19     prompt "GMP"
    20     select COMPLIBS
    21     select WRAPPER_NEEDED
    22     help
    23       gcc 4.3.0 and above requires GMP to build some frontends, and some
    24       other components can use them as well.
    25       
    26       This will be automatically selected if you choose gcc>=4.3.0, but you
    27       can say 'Y' here if you want to build this library for the other
    28       components (that don't select them by default).
    29       
    30       The packages that can use GMP and MPFR are:
    31         - binutils
    32         - gcc
    33         - gdb
    34 
    35 config MPFR
    36     bool
    37     prompt "MPFR"
    38     select GMP
    39     select COMPLIBS
    40     select WRAPPER_NEEDED
    41     help
    42       gcc 4.3.0 and above requires MPFR to build some frontends, and some
    43       other components can use them as well.
    44       
    45       This will be automatically selected if you choose gcc>=4.3.0, but you
    46       can say 'Y' here if you want to build this library for the other
    47       components (that don't select them by default).
    48       
    49       The packages that can use GMP and MPFR are:
    50         - binutils
    51         - gcc
    52         - gdb
    53 
    54 config PPL
    55     bool
    56     prompt "PPL"
    57     select GMP
    58     select MPFR
    59     select COMPLIBS
    60     select WRAPPER_NEEDED
    61     help
    62       gcc-4.4.0 and above requires PPL to build some parts of the optimiser
    63       (the GRAPHITE loop optimisation, to be precise).
    64       
    65       This will be automatically selected if you choose gcc>=4.4.0, but you
    66       can say 'Y' here, although it is unknown yet if any other component
    67       can use it.
    68 
    69 config CLOOG
    70     bool
    71     prompt "GLooG/PPL"
    72     select GMP
    73     select MPFR
    74     select PPL
    75     select COMPLIBS
    76     select WRAPPER_NEEDED
    77     help
    78       gcc-4.4.0 and above requires CLooG/PPL to build some parts of the
    79       optimiser (the GRAPHITE loop optimisation, to be precise).
    80       
    81       This will be automatically selected if you choose gcc>=4.4.0, but you
    82       can say 'Y' here, although it is unknown yet if any other component
    83       can use it.
    84 
    85 config MPC
    86     bool
    87     prompt "MPC"
    88     select GMP
    89     select MPFR
    90     select PPL
    91     select CLOOG
    92     select COMPLIBS
    93     select WRAPPER_NEEDED
    94     help
    95       gcc-4.4.0 and above can also optionally use MPC to enable additional
    96       optimisations on complex numbers. Although MPC is optional,
    97       crosstool-NG requires it and uses it to build gcc >= 4.4.0.
    98       
    99       This will be automatically selected if you choose gcc>=4.4.0, but you
   100       can say 'Y' here, although it is unknown yet if any other component
   101       can use it.
   102 
   103 config LIBELF
   104     bool
   105 #    prompt "libelf"
   106     select COMPLIBS
   107     select WRAPPER_NEEDED
   108     help
   109       gcc-4.5.0 and above can also use libelf to enable some optimisation
   110       (LTO, Link-Time Optimisation, to be precise).  Although libelf is
   111       optional, crosstool-NG requires it and uses it to build gcc >= 4.5.0.
   112       
   113       This will be automatically selected if you choose gcc>=4.5.0, but you
   114       can say 'Y' here, although it is unknown yet if any other component
   115       can use it.
   116 
   117 config GMP_TARGET
   118     bool
   119 
   120 config MPFR_TARGET
   121     bool
   122     select GMP_TARGET
   123 
   124 config PPL_TARGET
   125     bool
   126     select GMP_TARGET
   127     select MPFR_TARGET
   128 
   129 config CLOOG_TARGET
   130     bool
   131     select GMP_TARGET
   132     select MPFR_TARGET
   133     select PPL_TARGET
   134 
   135 config MPC_TARGET
   136     bool
   137     select GMP_TARGET
   138     select MPFR_TARGET
   139     select PPL_TARGET
   140     select CLOOG_TARGET
   141 
   142 config LIBELF_TARGET
   143     bool
   144 
   145 if GMP || GMP_TARGET
   146 comment "GMP version needed to build for target"
   147     depends on !GMP
   148 source config/companion_libs/gmp.in
   149 endif
   150 if MPFR || MPFR_TARGET
   151 comment "MPFR version needed to build for target"
   152     depends on !MPFR
   153 source config/companion_libs/mpfr.in
   154 endif
   155 if PPL || PPL_TARGET
   156 comment "PPL version needed to build for target"
   157     depends on !PPL
   158 source config/companion_libs/ppl.in
   159 endif
   160 if CLOOG || CLOOG_TARGET
   161 comment "CLOOG version needed to build for target"
   162     depends on !CLOOG
   163 source config/companion_libs/cloog.in
   164 endif
   165 if MPC || MPC_TARGET
   166 comment "MPC version needed to build for target"
   167     depends on !MPC
   168 source config/companion_libs/mpc.in
   169 endif
   170 if LIBELF || LIBELF_TARGET
   171 comment "libelf version needed to build for target"
   172     depends on !LIBELF
   173 source config/companion_libs/libelf.in
   174 endif
   175 
   176 config FOO
   177     bool
   178 
   179 comment "Companion libraries common options"
   180     depends on COMPLIBS || WRAPPER_NEEDED
   181 
   182 config COMP_LIBS_CHECK
   183     bool
   184     prompt "|  Check the companion libraries builds (!!! READ HELP!!!)"
   185     default n
   186     depends on COMPLIBS
   187     help
   188       It is highly recommended to check the newly built companion libraries.
   189       Unfortunately, this is a very intensive task, and takes a loooong time.
   190       
   191       Checking the newly built companion libraries is thus disabled by default,
   192       but it is suggested that you check them at least once on your machine,
   193       and if they work, disable the check on subsequent builds.
   194       
   195       If you suspect that one (or more) of your companion libraries is the
   196       cause for incorrectly generated code, you should answer 'Y' here.
   197       Note however that this will take a really long time. For example,
   198       building PPL on my machine takes roughly 1'40", while checking it takes
   199       about 1h40'...
   200 
   201 choice
   202     bool
   203     prompt "|  Install tools wrapper as:"
   204     depends on WRAPPER_NEEDED
   205     default TOOLS_WRAPPER_SHELL
   206 
   207 config TOOLS_WRAPPER_SCRIPT
   208     bool
   209     prompt "shell script"
   210     help
   211       If your host has a shell, then you should say 'Y' here, to use
   212       a (very very simple) shell script as wrapper.
   213       
   214       See docs/overview.txt, section "Tools wrapper".
   215 
   216 config TOOLS_WRAPPER_EXEC
   217     bool
   218     prompt "executable"
   219     help
   220       If your host lacks a shell, then you should say 'Y' here, to use
   221       an executable.
   222       
   223       See docs/overview.txt, section "Tools wrapper".
   224 
   225 endchoice
   226 
   227 config TOOLS_WRAPPER
   228     string
   229     default "script" if TOOLS_WRAPPER_SCRIPT
   230     default "exec"   if TOOLS_WRAPPER_EXEC
   231 
   232 endmenu