config/libc.in
author "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
Wed Dec 14 16:55:22 2011 +0100 (2011-12-14)
branch1.13
changeset 2848 1ff89596dab0
parent 2215 bd86485d966a
permissions -rw-r--r--
libc/eglibc: fix localedef 2.14 build

The localedef of eglibc 2.14 requires NOT_IN_libc to be defined in order to
compile intl/l10nflist.c.

This is because localedef is built separately from eglibc and uses some parts of
eglibc that don't compile in standalone without this preprocessor definition.

This fixes the following error:

[ALL ] gcc -g -O2 -DNO_SYSCONF -DNO_UNCOMPRESS
-DLOCALE_PATH='"/usr/lib/locale:/usr/share/i18n"'
-DLOCALEDIR='"/usr/lib/locale"' -DLOCALE_ALIAS_PATH='"/usr/share/locale"'
-DCHARMAP_PATH='"/usr/share/i18n/charmaps"'
-DREPERTOIREMAP_PATH='"/usr/share/i18n/repertoiremaps"'
-DLOCSRCDIR='"/usr/share/i18n/locales"' -Iglibc/locale/programs -Iglibc/locale
-I/<snip>/.build/src/eglibc-localedef-2_14/include
-I/<snip>/.build/src/eglibc-localedef-2_14 -I.
-include /<snip>/.build/src/eglibc-localedef-2_14/include/always.h -Wall
-Wno-format -c -o locarchive.o glibc/locale/programs/locarchive.c
[ALL ] glibc/locale/programs/locarchive.c: In function 'enlarge_archive':
[ALL ] glibc/locale/programs/locarchive.c:303:21: warning: variable
'oldlocrectab' set but not used [-Wunused-but-set-variable]
[ALL ] In file included from glibc/locale/programs/locarchive.c:651:0:
[ALL ] glibc/locale/programs/../../intl/l10nflist.c: In function
'_nl_normalize_codeset':
[ERROR] glibc/locale/programs/../../intl/l10nflist.c:342:9: error:
'_nl_C_locobj_ptr' undeclared (first use in this function)
[ALL ] glibc/locale/programs/../../intl/l10nflist.c:342:9: note: each
undeclared identifier is reported only once for each function it appears in
[ALL ] glibc/locale/programs/locarchive.c: In function
'add_locales_to_archive':
[ALL ] glibc/locale/programs/locarchive.c:1450:7: warning: passing argument
1 of '__xpg_basename' discards 'const' qualifier from pointer target type
[enabled by default]
[ALL ] /usr/include/libgen.h:35:14: note: expected 'char *' but argument is
of type 'const char *'
[ERROR] make[1]: *** [locarchive.o] Error 1

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
(transplanted from 4cd9134739b594451794cf61a6e1b137422cdafd)
yann@1
     1
# C library options
yann@1
     2
yann@1585
     3
menu "C-library"
yann@1585
     4
yann@850
     5
config LIBC
yann@850
     6
    string
yann@850
     7
yann@852
     8
config LIBC_VERSION
yann@852
     9
    string
yann@852
    10
    help
yann@852
    11
      Enter the date of the snapshot you want to use in the form: YYYYMMDD
yann@852
    12
      where YYYY is the 4-digit year, MM the 2-digit month and DD the 2-digit
yann@852
    13
      day in the month.
yann@852
    14
      
yann@852
    15
      Please note:
yann@852
    16
      - glibc has snapshots done every monday, and only the last ten are kept.
yann@852
    17
      - uClibc has daily snapshots, and only the last 30-or-so are kept.
yann@852
    18
      
yann@852
    19
      So if you want to be able to re-build your toolchain later, you will
yann@852
    20
      have to save your C library tarball by yourself.
yann@852
    21
yann@1870
    22
source "config.gen/libc.in"
yann@1
    23
yann@2016
    24
config LIBC_SUPPORT_THREADS_ANY
yann@2016
    25
    bool
yann@2016
    26
yann@95
    27
config LIBC_SUPPORT_NPTL
yann@95
    28
    bool
yann@2016
    29
    select LIBC_SUPPORT_THREADS_ANY
yann@95
    30
yann@95
    31
config LIBC_SUPPORT_LINUXTHREADS
yann@95
    32
    bool
yann@2016
    33
    select LIBC_SUPPORT_THREADS_ANY
yann@95
    34
bartvdrmeulen@2017
    35
config LIBC_SUPPORT_WIN32THREADS
bartvdrmeulen@2017
    36
    bool
bartvdrmeulen@2017
    37
    select LIBC_SUPPORT_THREADS_ANY
bartvdrmeulen@2017
    38
yann@2215
    39
config LIBC_SUPPORT_THREADS_NONE
yann@2215
    40
    bool
yann@2215
    41
yann@852
    42
config THREADS
yann@852
    43
    string
yann@852
    44
    default "nptl"          if THREADS_NPTL
yann@852
    45
    default "linuxthreads"  if THREADS_LINUXTHREADS
bartvdrmeulen@2017
    46
    default "win32"         if THREADS_WIN32THREADS
yann@1591
    47
    default "none"          if THREADS_NONE || LIBC_none
yann@1591
    48
#                              No C library, no threads!
yann@1591
    49
yann@1591
    50
if ! LIBC_none
yann@1591
    51
yann@1591
    52
comment "Common C library options"
yann@852
    53
yann@802
    54
choice
yann@802
    55
    bool
yann@802
    56
    prompt "Threading implementation to use:"
yann@802
    57
    default THREADS_NPTL           if LIBC_SUPPORT_NPTL
yann@802
    58
    default THREADS_LINUXTHREADS   if LIBC_SUPPORT_LINUXTHREADS && ! LIBC_SUPPORT_NPTL
bartvdrmeulen@2017
    59
    default THREADS_WIN32          if LIBC_SUPPORT_WIN32THREADS
yann@2016
    60
    default THREADS_NONE           if ! LIBC_SUPPORT_THREADS_ANY
yann@1
    61
yann@802
    62
config THREADS_NPTL
yann@802
    63
    bool
yann@802
    64
    prompt "nptl"
yann@802
    65
    depends on LIBC_SUPPORT_NPTL
yann@787
    66
yann@802
    67
config THREADS_LINUXTHREADS
yann@802
    68
    bool
yann@802
    69
    prompt "linuxthreads"
yann@802
    70
    depends on LIBC_SUPPORT_LINUXTHREADS
yann@802
    71
bartvdrmeulen@2017
    72
config THREADS_WIN32THREADS
bartvdrmeulen@2017
    73
    bool
bartvdrmeulen@2017
    74
    prompt "win32"
bartvdrmeulen@2017
    75
    depends on LIBC_SUPPORT_WIN32THREADS
bartvdrmeulen@2017
    76
yann@802
    77
config THREADS_NONE
yann@802
    78
    bool
yann@802
    79
    prompt "none"
yann@2215
    80
    depends on LIBC_SUPPORT_THREADS_NONE
yann@802
    81
yann@802
    82
endchoice
yann@802
    83
yann@2034
    84
config LIBC_XLDD
yann@2034
    85
    bool
yann@2034
    86
    prompt "Install a cross ldd-like helper"
yann@2182
    87
    depends on SHARED_LIBS
yann@2052
    88
    depends on ! BARE_METAL
yann@2034
    89
    default y
yann@2034
    90
    help
yann@2034
    91
      Say 'Y' here if you want to have a ldd-like helper that
yann@2034
    92
      you can run on your build system, and that will (try to)
yann@2034
    93
      resolve shared libraries dependencies as if run on the
yann@2034
    94
      target.
yann@2034
    95
      
yann@2034
    96
      Note that the cross-ldd helper is not a full replacement
yann@2034
    97
      for the native ldd. Please see the help, by running it
yann@2034
    98
      with '--help' for more explanations.
yann@2034
    99
yann@1976
   100
source "config.gen/libc.in.2"
yann@1976
   101
yann@1591
   102
endif # ! LIBC_none
yann@1591
   103
yann@1
   104
endmenu