summaryrefslogtreecommitdiff
path: root/config/libc.in
blob: 27228d1343a2392f7aa6382795f67c3cb6efa6d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# C library options

config LIBC
    string
    default "none"   if BARE_METAL
    default "glibc"  if LIBC_GLIBC
    default "eglibc" if LIBC_EGLIBC
    default "uClibc" if LIBC_UCLIBC

if ! BARE_METAL

menu "C-library"

config LIBC_VERSION
    string
    help
      Enter the date of the snapshot you want to use in the form: YYYYMMDD
      where YYYY is the 4-digit year, MM the 2-digit month and DD the 2-digit
      day in the month.
      
      Please note:
      - glibc has snapshots done every monday, and only the last ten are kept.
      - uClibc has daily snapshots, and only the last 30-or-so are kept.
      
      So if you want to be able to re-build your toolchain later, you will
      have to save your C library tarball by yourself.

choice
    bool
    prompt "C-library to use:"
    default LIBC_GLIBC

config LIBC_GLIBC
    bool
    prompt "glibc"
    select LIBC_SUPPORT_NPTL
    select LIBC_SUPPORT_LINUXTHREADS

config LIBC_EGLIBC
    bool
    prompt "eglibc (EXPERIMENTAL)"
    select LIBC_SUPPORT_NPTL
    select LIBC_SUPPORT_LINUXTHREADS
    depends on EXPERIMENTAL
    help
      EGLIBC (Embedded GLIBC) is a variant of the standard GNU GLIBC
      that is designed to work well on embedded systems.  EGLIBC strives
      to be source and binary compatible with GLIBC.  Its goals include
      a reduced footprint, configurable components, and improved
      cross-compilation support.  EGLIBC also includes some embedded ports
      (such as e500/spe) that are normally separate add-ons of GLIBC.

config LIBC_UCLIBC
    bool
    prompt "uClibc"
    select LIBC_SUPPORT_LINUXTHREADS

endchoice

comment "Common C library options"

config LIBC_SUPPORT_NPTL
    bool
    default n

config LIBC_SUPPORT_LINUXTHREADS
    bool
    default n

config THREADS
    string
    default "nptl"          if THREADS_NPTL
    default "linuxthreads"  if THREADS_LINUXTHREADS
    default "none"          if THREADS_NONE

choice
    bool
    prompt "Threading implementation to use:"
    default THREADS_NPTL           if LIBC_SUPPORT_NPTL
    default THREADS_LINUXTHREADS   if LIBC_SUPPORT_LINUXTHREADS && ! LIBC_SUPPORT_NPTL
    default THREADS_NONE           if ! LIBC_SUPPORT_LINUXTHREADS && ! LIBC_SUPPORT_NPTL

config THREADS_NPTL
    bool
    prompt "nptl"
    depends on LIBC_SUPPORT_NPTL

config THREADS_LINUXTHREADS
    bool
    prompt "linuxthreads"
    depends on LIBC_SUPPORT_LINUXTHREADS

config THREADS_NONE
    bool
    prompt "none"

endchoice

if LIBC_GLIBC
source config/libc/glibc.in
endif

if LIBC_EGLIBC
source config/libc/eglibc.in
endif

# Hack: mconf does not allow to include a file multiple times,
# so include glibc and eglibc common options from here, rather
# than from each config files.
if LIBC_GLIBC || LIBC_EGLIBC
source config/libc/glibc-eglibc-common.in
endif

if LIBC_UCLIBC
source config/libc/uClibc.in
endif

endmenu

endif # ! BARE_METAL