config/cc.in
author "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
Thu Jul 28 22:09:31 2011 +0200 (2011-07-28)
changeset 2573 424fa2092ace
parent 2484 d1a8c2ae7946
child 3131 bd172b161ff8
permissions -rw-r--r--
scripts/libc: do not build add-ons by default

Currently, no --enable-add-ons option is passed to libc configure when
"$(do_libc_add_ons_list ,)" is empty, which makes configure automatically search
for present add-ons. In that case, all present add-ons are built, although
no add-on was selected by the user in the config. Moreover, this can make the
configure fail if some non-standard add-ons like eglibc-localedef are present.

This behavior also leads to an inconsistency from a user point of view between
the following cases:
- LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS="none" in the config,
which makes "$(do_libc_add_ons_list ,)" return "", so all present add-ons
are built.
- LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS!="none" in the
config, which makes "$(do_libc_add_ons_list ,)" return the add-on supporting
the chosen threading implementation, e.g. "nptl", so only this add-on is
built.

This patch disables the building of all add-ons in that case.

It is still possible to build all present add-ons by adding --enable-add-ons to
LIBC_GLIBC_EXTRA_CONFIG_ARRAY.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
     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     depends on CC_SUPPORT_CXX
    37     help
    38       Enable building a C++ compiler.
    39 
    40       Only select this if you know that your specific version of the
    41       compiler supports this language.
    42 
    43 if ! BARE_METAL
    44 
    45 config CC_LANG_FORTRAN
    46     bool
    47     prompt "Fortran"
    48     depends on CC_SUPPORT_FORTRAN
    49     help
    50       Enable building a FORTRAN compiler.
    51 
    52       Only select this if you know that your specific version of the
    53       compiler supports this language.
    54 
    55 config CC_LANG_JAVA
    56     bool
    57     prompt "Java"
    58     depends on CC_SUPPORT_JAVA
    59     help
    60       Enable building a Java compiler.
    61 
    62       Only select this if you know that your specific version of the
    63       compiler supports this language.
    64 
    65 config CC_LANG_ADA
    66     bool
    67     prompt "ADA (EXPERIMENTAL)"
    68     depends on CC_SUPPORT_ADA
    69     depends on EXPERIMENTAL
    70     help
    71       Enable building an Ada compiler.
    72 
    73       Only select this if you know that your specific version of the
    74       compiler supports this language.
    75 
    76 config CC_LANG_OBJC
    77     bool
    78     prompt "Objective-C (EXPERIMENTAL)"
    79     depends on CC_SUPPORT_OBJC
    80     depends on EXPERIMENTAL
    81     help
    82       Enable building an Objective C compiler.
    83 
    84       Only select this if you know that your specific version of the
    85       compiler supports this language.
    86 
    87 config CC_LANG_OBJCXX
    88     bool
    89     prompt "Objective-C++ (EXPERIMENTAL)"
    90     depends on EXPERIMENTAL
    91     depends on CC_SUPPORT_OBJCXX
    92     help
    93       Enable building an Objective C++ compiler.
    94 
    95       Only select this if you know that your specific version of the
    96       compiler supports this language.
    97 
    98 config CC_LANG_OTHERS
    99     string
   100     prompt "Other languages (EXPERIMENTAL)"
   101     default ""
   102     depends on EXPERIMENTAL
   103     help
   104       Enter here a comma-separated list of languages that you know your compiler
   105       supports, besides those listed above.
   106 
   107       Eg. gcc-4.1+ has a toy programming language, treelang. As it is not useful
   108       in real life, it is not available in the selection above.
   109 
   110 endif # ! BARE_METAL
   111 
   112 source "config.gen/cc.in.2"
   113 
   114 endmenu