glibc: add 2.24
[librecmc/librecmc.git] / toolchain / Config.in
1 # Copyright (C) 2006-2013 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6
7 menuconfig TARGET_OPTIONS
8         bool "Target Options"  if DEVEL
9
10         config TARGET_OPTIMIZATION
11                 string "Target Optimizations" if TARGET_OPTIONS
12                 default DEFAULT_TARGET_OPTIMIZATION
13                 help
14                   Optimizations to use when building for the target host.
15
16         config SOFT_FLOAT
17                 bool "Use software floating point by default" if TARGET_OPTIONS
18                 default y if !HAS_FPU
19                 depends on arm || armeb || powerpc || mipsel || mips || mips64el || mips64
20                 help
21                   If your target CPU does not have a Floating Point Unit (FPU) or a
22                   kernel FPU emulator, but you still wish to support floating point
23                   functions, then everything will need to be compiled with soft floating
24                   point support (-msoft-float).
25
26                   Most people will answer N.
27
28         config USE_MIPS16
29                 bool "Build packages with MIPS16 instructions" if TARGET_OPTIONS
30                 depends on HAS_MIPS16
31                 default y
32                 help
33                   If your target CPU does support the MIPS16 instruction set
34                   and you want to use it for packages, enable this option.
35                   MIPS16 produces smaller binaries thus reducing pressure on
36                   caches and TLB.
37
38                   Most people will answer N.
39
40
41 menuconfig EXTERNAL_TOOLCHAIN
42         bool
43         prompt "Use external toolchain"  if DEVEL
44         help
45           If enabled, LEDE will compile using an existing toolchain instead of
46           compiling one.
47
48         config NATIVE_TOOLCHAIN
49                 bool
50                 prompt "Use host's toolchain"  if DEVEL
51                 depends on EXTERNAL_TOOLCHAIN
52                 select NO_STRIP
53                 help
54                   If enabled, LEDE will compile using the native toolchain for your
55                   host instead of compiling one.
56
57         config TARGET_NAME
58                 string
59                 prompt "Target name"  if DEVEL
60                 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
61                 default "aarch64-unknown-linux-gnu"  if aarch64
62                 default "aarch64_be-unknown-linux-gnu"  if aarch64_be
63                 default "arm-unknown-linux-gnu"      if arm
64                 default "armeb-unknown-linux-gnu"    if armeb
65                 default "i486-unknown-linux-gnu"     if i386
66                 default "mips-unknown-linux-gnu"     if mips
67                 default "mipsel-unknown-linux-gnu"   if mipsel
68                 default "powerpc-unknown-linux-gnu"  if powerpc
69                 default "x86_64-unknown-linux-gnu"   if x86_64
70
71         config TOOLCHAIN_PREFIX
72                 string
73                 prompt "Toolchain prefix"  if DEVEL
74                 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
75                 default "aarch64-unknown-linux-gnu"  if aarch64
76                 default "aarch64_be-unknown-linux-gnu"  if aarch64_be
77                 default "arm-unknown-linux-gnu-"      if arm
78                 default "armeb-unknown-linux-gnu-"    if armeb
79                 default "i486-unknown-linux-gnu-"     if i386
80                 default "mips-unknown-linux-gnu-"     if mips
81                 default "mipsel-unknown-linux-gnu-"   if mipsel
82                 default "powerpc-unknown-linux-gnu-"  if powerpc
83                 default "x86_64-unknown-linux-gnu-"   if x86_64
84
85         config TOOLCHAIN_ROOT
86                 string
87                 prompt "Toolchain root"  if DEVEL
88                 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
89                 default "/opt/cross/aarch64-unknown-linux-gnu"  if aarch64
90                 default "/opt/cross/aarch64_be-unknown-linux-gnu"  if aarch64_be
91                 default "/opt/cross/arm-unknown-linux-gnu"      if arm
92                 default "/opt/cross/armeb-unknown-linux-gnu"    if armeb
93                 default "/opt/cross/i486-unknown-linux-gnu"     if i386
94                 default "/opt/cross/mips-unknown-linux-gnu"     if mips
95                 default "/opt/cross/mipsel-unknown-linux-gnu"   if mipsel
96                 default "/opt/cross/powerpc-unknown-linux-gnu"  if powerpc
97                 default "/opt/cross/x86_64-unknown-linux-gnu"   if x86_64
98
99         config TOOLCHAIN_LIBC
100                 string
101                 prompt "Toolchain libc"  if DEVEL
102                 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
103                 default "uclibc"
104                 help
105                   Specify the libc type used by the external toolchain. The given value
106                   is passed as -m flag to all gcc and g++ invocations. This is mainly
107                   intended for multilib toolchains which support glibc and uclibc at
108                   the same time. If no value is specified, no -m flag is passed.
109
110         config TOOLCHAIN_BIN_PATH
111                 string
112                 prompt "Toolchain program path"  if DEVEL
113                 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
114                 default "./usr/bin ./bin"
115                 help
116                   Specify additional directories searched for toolchain binaries
117                   (override PATH). Use ./DIR for directories relative to the root above.
118
119         config TOOLCHAIN_INC_PATH
120                 string
121                 prompt "Toolchain include path"  if DEVEL
122                 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
123                 default "./usr/include ./include"
124                 help
125                   Specify additional directories searched for header files (override
126                   CPPFLAGS). Use ./DIR for directories relative to the root above.
127
128         config TOOLCHAIN_LIB_PATH
129                 string
130                 prompt "Toolchain library path"  if DEVEL
131                 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
132                 default "./usr/lib ./lib"
133                 help
134                   Specify additional directories searched for libraries (override LDFLAGS).
135                   Use ./DIR for directories relative to the root above.
136
137 config NEED_TOOLCHAIN
138         bool
139         depends on DEVEL
140         default y if !EXTERNAL_TOOLCHAIN
141
142 menuconfig TOOLCHAINOPTS
143         bool "Toolchain Options"  if DEVEL
144         depends on NEED_TOOLCHAIN
145
146 menuconfig EXTRA_TARGET_ARCH
147         bool
148         prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
149         depends on !sparc
150         default y       if powerpc64
151         default n
152         help
153           Some builds may require a 'biarch' toolchain. This option
154           allows you to specify an additional target arch.
155
156           Most people will answer N here.
157
158         config EXTRA_TARGET_ARCH_NAME
159                 string
160                 default "powerpc64"     if powerpc64
161                 prompt "Extra architecture name" if EXTRA_TARGET_ARCH
162                 help
163                   Specify the cpu name (eg powerpc64 or x86_64) of the
164                   additional target architecture.
165
166         config EXTRA_TARGET_ARCH_OPTS
167                 string
168                 default "-m64"          if powerpc64
169                 prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
170                 help
171                   If you're specifying an addition target architecture,
172                   you'll probably need to also provide options to make
173                   the compiler use this alternate arch.
174
175                   For example, if you're building a compiler that can build
176                   both powerpc and powerpc64 binaries, you'll need to
177                   specify -m64 here.
178
179
180         choice
181                 prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
182                 default MIPS64_ABI_N64
183                 help
184                    MIPS64 supports 3 different user-land ABIs: o32 (legacy),
185                    n32 and n64.
186
187                 config MIPS64_ABI_N64
188                         bool "n64"
189
190                 config MIPS64_ABI_N32
191                         depends on !LIBC_USE_MUSL
192                         bool "n32"
193
194                 config MIPS64_ABI_O32
195                         bool "o32"
196
197         endchoice
198
199 comment "Binary tools"
200         depends on TOOLCHAINOPTS
201
202 source "toolchain/binutils/Config.in"
203
204 comment "Compiler"
205         depends on TOOLCHAINOPTS
206
207 source "toolchain/gcc/Config.in"
208
209 config YASM
210         bool
211         depends on ( i386 || x86_64 )
212         prompt "Build yasm" if TOOLCHAINOPTS
213         default y
214         help
215           Enable if you want to build yasm
216
217 comment "C Library"
218         depends on TOOLCHAINOPTS
219
220 choice
221         prompt "C Library implementation" if TOOLCHAINOPTS
222         default LIBC_USE_UCLIBC if arc
223         default LIBC_USE_MUSL
224         help
225           Select the C library implementation.
226
227         config LIBC_USE_GLIBC
228                 bool "Use glibc"
229                 select USE_GLIBC
230                 depends on !arc
231
232         config LIBC_USE_UCLIBC
233                 select USE_UCLIBC
234                 bool "Use uClibc"
235                 depends on !(aarch64 || aarch64_be)
236                 depends on BROKEN || !(arm || armeb || i386 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc)
237
238         config LIBC_USE_MUSL
239                 select USE_MUSL
240                 bool "Use musl"
241                 depends on !(arc)
242
243 endchoice
244
245 source "toolchain/glibc/Config.in"
246 source "toolchain/uClibc/Config.in"
247
248 comment "Debuggers"
249         depends on TOOLCHAINOPTS
250
251 config GDB
252         bool
253         depends on !(aarch64 || aarch64_be)
254         prompt "Build gdb" if TOOLCHAINOPTS
255         default y if !EXTERNAL_TOOLCHAIN
256         help
257           Enable if you want to build the gdb.
258
259 config INSIGHT
260         bool
261         prompt "Build insight-gdb" if TOOLCHAINOPTS
262         select GDB
263         default n
264         help
265           Enable if you want to build insight-gdb.
266
267 config USE_GLIBC
268         bool
269
270 config USE_UCLIBC
271         default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
272         bool
273
274 config USE_MUSL
275         default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc)
276         bool
277
278 config USE_EXTERNAL_LIBC
279         bool
280         default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
281
282 source "toolchain/binutils/Config.version"
283 source "toolchain/gcc/Config.version"
284
285 source "toolchain/glibc/Config.version"
286 source "toolchain/uClibc/Config.version"
287 source "toolchain/musl/Config.version"
288
289 config LIBC
290         string
291         default "glibc"   if USE_GLIBC
292         default "uClibc"  if USE_UCLIBC
293         default "musl"    if USE_MUSL
294
295 config LIBC_VERSION
296         string
297         default GLIBC_VERSION   if USE_GLIBC
298         default UCLIBC_VERSION  if USE_UCLIBC
299         default MUSL_VERSION    if USE_MUSL
300
301 config TARGET_SUFFIX
302         string
303         default "gnueabi"         if USE_GLIBC && (arm || armeb)
304         default "gnu"             if USE_GLIBC && !(arm || armeb)
305         default "uclibcgnueabi"   if USE_UCLIBC && (arm || armeb)
306         default "uclibc"          if USE_UCLIBC && !(arm || armeb)
307         default "muslgnueabi"     if USE_MUSL && (arm || armeb)
308         default "musl"            if USE_MUSL && !(arm || armeb)
309
310 config MIPS64_ABI
311         depends on mips64 || mips64el
312         string
313         default "64" if MIPS64_ABI_N64
314         default "n32" if MIPS64_ABI_N32
315         default "32" if MIPS64_ABI_O32
316         default "64"