config/kernel.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 1976 2d90ec981ba3
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 # Kernel options
     2 
     3 menu "Operating System"
     4 
     5 # Config option used throughout the config and code to determine wether
     6 # we have a kernel or not (there might be different bare metal stuff)...
     7 config BARE_METAL
     8     bool
     9     default n
    10 
    11 config MINGW32
    12     bool
    13     default n
    14 
    15 # Each target OS (aka kernel) that support shared libraries can select
    16 # this, so the user can decide whether or not to build a shared library
    17 # enabled toolchain
    18 config KERNEL_SUPPORTS_SHARED_LIBS
    19     bool
    20     default n
    21 
    22 config KERNEL
    23     string
    24 
    25 config KERNEL_VERSION
    26     string
    27 
    28 source "config.gen/kernel.in"
    29 
    30 comment "Common kernel options"
    31 
    32 config SHARED_LIBS
    33     bool
    34     prompt "Build shared libraries"
    35     depends on KERNEL_SUPPORTS_SHARED_LIBS
    36     default y
    37     help
    38       Say 'y' here, unless you don't want shared libraries.
    39       
    40       You might not want shared libraries if you're building for a target that
    41       don't support it (maybe some nommu targets, for example, or bare metal).
    42 
    43 source "config.gen/kernel.in.2"
    44 
    45 endmenu