config/cc.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Sep 12 23:51:25 2010 +0200 (2010-09-12)
changeset 2123 ff2181adbd28
parent 1870 a4c4e51aa541
child 2484 d1a8c2ae7946
permissions -rw-r--r--
cc/gcc: disable complibs if not selected

Force gcc to not link with some companion libraries when
there are not needed (because selected-out).

There is no option to tell gcc *not* to build the Graphite and/or
LTO stuff. They *will* be built if gcc finds the suitable companion
libraries. If we do not provide them, but the host has them, then
gcc *will* find them, and link with them.

Consider the following:
- host has suitable PPL and CLooG (eg. Debian Squeeze)
- user wants to build gcc>=4.4
- user de-selects GRAPHITE
- gcc will find the hosts PPL and CLooG, and will use them
- the user moves the toolchain to an older host that does
not have them (eg. Debian Lenny)
- the toolchain fails, when it was properly setup not to

So, explicitly tell gcc *not* to use unneeded companion libs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 # Compiler options
     2 
     3 menu "C compiler"
     4 
     5 config CC
     6     string
     7 
     8 config CC_VERSION
     9     string
    10 
    11 source "config.gen/cc.in"
    12 
    13 config CC_SUPPORT_CXX
    14     bool
    15 
    16 config CC_SUPPORT_FORTRAN
    17     bool
    18 
    19 config CC_SUPPORT_JAVA
    20     bool
    21 
    22 config CC_SUPPORT_ADA
    23     bool
    24 
    25 config CC_SUPPORT_OBJC
    26     bool
    27 
    28 config CC_SUPPORT_OBJCXX
    29     bool
    30 
    31 comment "Additional supported languages:"
    32 
    33 config CC_LANG_CXX
    34     bool
    35     prompt "C++"
    36     default n
    37     depends on CC_SUPPORT_CXX
    38     help
    39       Enable building a C++ compiler.
    40 
    41       Only select this if you know that your specific version of the
    42       compiler supports this language.
    43 
    44 if ! BARE_METAL
    45 
    46 config CC_LANG_FORTRAN
    47     bool
    48     prompt "Fortran"
    49     default n
    50     depends on CC_SUPPORT_FORTRAN
    51     help
    52       Enable building a FORTRAN compiler.
    53 
    54       Only select this if you know that your specific version of the
    55       compiler supports this language.
    56 
    57 config CC_LANG_JAVA
    58     bool
    59     prompt "Java"
    60     default n
    61     depends on CC_SUPPORT_JAVA
    62     help
    63       Enable building a Java compiler.
    64 
    65       Only select this if you know that your specific version of the
    66       compiler supports this language.
    67 
    68 config CC_LANG_ADA
    69     bool
    70     prompt "ADA (EXPERIMENTAL)"
    71     default n
    72     depends on CC_SUPPORT_ADA
    73     depends on EXPERIMENTAL
    74     help
    75       Enable building an Ada compiler.
    76 
    77       Only select this if you know that your specific version of the
    78       compiler supports this language.
    79 
    80 config CC_LANG_OBJC
    81     bool
    82     prompt "Objective-C (EXPERIMENTAL)"
    83     default n
    84     depends on CC_SUPPORT_OBJC
    85     depends on EXPERIMENTAL
    86     help
    87       Enable building an Objective C compiler.
    88 
    89       Only select this if you know that your specific version of the
    90       compiler supports this language.
    91 
    92 config CC_LANG_OBJCXX
    93     bool
    94     prompt "Objective-C++ (EXPERIMENTAL)"
    95     depends on EXPERIMENTAL
    96     default n
    97     depends on CC_SUPPORT_OBJCXX
    98     help
    99       Enable building an Objective C++ compiler.
   100 
   101       Only select this if you know that your specific version of the
   102       compiler supports this language.
   103 
   104 config CC_LANG_OTHERS
   105     string
   106     prompt "Other languages (EXPERIMENTAL)"
   107     default ""
   108     depends on EXPERIMENTAL
   109     help
   110       Enter here a comma-separated list of languages that you know your compiler
   111       supports, besides those listed above.
   112 
   113       Eg. gcc-4.1+ has a toy programming language, treelang. As it is not usefull
   114       in real life, it is not available in the selection above.
   115 
   116 endif # ! BARE_METAL
   117 
   118 source "config.gen/cc.in.2"
   119 
   120 endmenu