glibc: make it more obvious that eglibc is a version of glibc
[openwrt/staging/yousong.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 depends on !GCC_VERSION_4_6
32 default y
33 help
34 If your target CPU does support the MIPS16 instruction set
35 and you want to use it for packages, enable this option.
36 MIPS16 produces smaller binaries thus reducing pressure on
37 caches and TLB.
38
39 Most people will answer N.
40
41
42 menuconfig EXTERNAL_TOOLCHAIN
43 bool
44 prompt "Use external toolchain" if DEVEL
45 help
46 If enabled, OpenWrt will compile using an existing toolchain instead of
47 compiling one.
48
49 config NATIVE_TOOLCHAIN
50 bool
51 prompt "Use host's toolchain" if DEVEL
52 depends on EXTERNAL_TOOLCHAIN
53 select NO_STRIP
54 help
55 If enabled, OpenWrt will compile using the native toolchain for your
56 host instead of compiling one.
57
58 config TARGET_NAME
59 string
60 prompt "Target name" if DEVEL
61 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
62 default "aarch64-unknown-linux-gnu" if aarch64
63 default "aarch64_be-unknown-linux-gnu" if aarch64_be
64 default "arm-unknown-linux-gnu" if arm
65 default "armeb-unknown-linux-gnu" if armeb
66 default "i486-unknown-linux-gnu" if i386
67 default "mips-unknown-linux-gnu" if mips
68 default "mipsel-unknown-linux-gnu" if mipsel
69 default "powerpc-unknown-linux-gnu" if powerpc
70 default "x86_64-unknown-linux-gnu" if x86_64
71
72 config TOOLCHAIN_PREFIX
73 string
74 prompt "Toolchain prefix" if DEVEL
75 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
76 default "aarch64-unknown-linux-gnu" if aarch64
77 default "aarch64_be-unknown-linux-gnu" if aarch64_be
78 default "arm-unknown-linux-gnu-" if arm
79 default "armeb-unknown-linux-gnu-" if armeb
80 default "i486-unknown-linux-gnu-" if i386
81 default "mips-unknown-linux-gnu-" if mips
82 default "mipsel-unknown-linux-gnu-" if mipsel
83 default "powerpc-unknown-linux-gnu-" if powerpc
84 default "x86_64-unknown-linux-gnu-" if x86_64
85
86 config TOOLCHAIN_ROOT
87 string
88 prompt "Toolchain root" if DEVEL
89 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
90 default "/opt/cross/aarch64-unknown-linux-gnu" if aarch64
91 default "/opt/cross/aarch64_be-unknown-linux-gnu" if aarch64_be
92 default "/opt/cross/arm-unknown-linux-gnu" if arm
93 default "/opt/cross/armeb-unknown-linux-gnu" if armeb
94 default "/opt/cross/i486-unknown-linux-gnu" if i386
95 default "/opt/cross/mips-unknown-linux-gnu" if mips
96 default "/opt/cross/mipsel-unknown-linux-gnu" if mipsel
97 default "/opt/cross/powerpc-unknown-linux-gnu" if powerpc
98 default "/opt/cross/x86_64-unknown-linux-gnu" if x86_64
99
100 config TOOLCHAIN_LIBC
101 string
102 prompt "Toolchain libc" if DEVEL
103 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
104 default "uclibc"
105 help
106 Specify the libc type used by the external toolchain. The given value
107 is passed as -m flag to all gcc and g++ invocations. This is mainly
108 intended for multilib toolchains which support glibc and uclibc at
109 the same time. If no value is specified, no -m flag is passed.
110
111 config TOOLCHAIN_BIN_PATH
112 string
113 prompt "Toolchain program path" if DEVEL
114 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
115 default "./usr/bin ./bin"
116 help
117 Specify additional directories searched for toolchain binaries
118 (override PATH). Use ./DIR for directories relative to the root above.
119
120 config TOOLCHAIN_INC_PATH
121 string
122 prompt "Toolchain include path" if DEVEL
123 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
124 default "./usr/include ./include"
125 help
126 Specify additional directories searched for header files (override
127 CPPFLAGS). Use ./DIR for directories relative to the root above.
128
129 config TOOLCHAIN_LIB_PATH
130 string
131 prompt "Toolchain library path" if DEVEL
132 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
133 default "./usr/lib ./lib"
134 help
135 Specify additional directories searched for libraries (override LDFLAGS).
136 Use ./DIR for directories relative to the root above.
137
138 config NEED_TOOLCHAIN
139 bool
140 depends on DEVEL
141 default y if !EXTERNAL_TOOLCHAIN
142
143 menuconfig TOOLCHAINOPTS
144 bool "Toolchain Options" if DEVEL
145 depends on NEED_TOOLCHAIN
146
147 menuconfig EXTRA_TARGET_ARCH
148 bool
149 prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
150 depends on !sparc
151 default y if powerpc64
152 default n
153 help
154 Some builds may require a 'biarch' toolchain. This option
155 allows you to specify an additional target arch.
156
157 Most people will answer N here.
158
159 config EXTRA_TARGET_ARCH_NAME
160 string
161 default "powerpc64" if powerpc64
162 prompt "Extra architecture name" if EXTRA_TARGET_ARCH
163 help
164 Specify the cpu name (eg powerpc64 or x86_64) of the
165 additional target architecture.
166
167 config EXTRA_TARGET_ARCH_OPTS
168 string
169 default "-m64" if powerpc64
170 prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
171 help
172 If you're specifying an addition target architecture,
173 you'll probably need to also provide options to make
174 the compiler use this alternate arch.
175
176 For example, if you're building a compiler that can build
177 both powerpc and powerpc64 binaries, you'll need to
178 specify -m64 here.
179
180
181 choice
182 prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
183 default MIPS64_ABI_N64
184 help
185 MIPS64 supports 3 different user-land ABIs: o32 (legacy),
186 n32 and n64.
187
188 config MIPS64_ABI_N64
189 bool "n64"
190
191 config MIPS64_ABI_N32
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 comment "C Library"
210 depends on TOOLCHAINOPTS
211
212 choice
213 prompt "C Library implementation" if TOOLCHAINOPTS
214 default LIBC_USE_GLIBC if (aarch64 || aarch64_be)
215 help
216 Select the C library implementation.
217
218 config LIBC_USE_GLIBC
219 bool "Use (e)glibc"
220 select USE_GLIBC
221 depends on !avr32
222
223 config LIBC_USE_UCLIBC
224 select USE_UCLIBC
225 bool "Use uClibc"
226 depends on !(aarch64 || aarch64_be)
227
228 config LIBC_USE_MUSL
229 select USE_MUSL
230 bool "Use musl"
231 depends on !(mips64 || mips64el || aarch64 || aarch64_be)
232
233 endchoice
234
235 source "toolchain/glibc/Config.in"
236 source "toolchain/uClibc/Config.in"
237 source "toolchain/musl/Config.in"
238
239 comment "Debuggers"
240 depends on TOOLCHAINOPTS
241
242 config GDB
243 bool
244 depends on !(avr32 || aarch64 || aarch64_be)
245 prompt "Build gdb" if TOOLCHAINOPTS
246 default y if !EXTERNAL_TOOLCHAIN
247 help
248 Enable if you want to build the gdb.
249
250 config INSIGHT
251 bool
252 prompt "Build insight-gdb" if TOOLCHAINOPTS
253 select GDB
254 default n
255 help
256 Enable if you want to build insight-gdb.
257
258 config USE_GLIBC
259 bool
260 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (aarch64 || aarch64_be || octeon)
261
262 config USE_UCLIBC
263 bool
264 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(aarch64 || aarch64_be || octeon)
265
266 config USE_MUSL
267 bool
268
269 config USE_EXTERNAL_LIBC
270 bool
271 default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
272
273 source "toolchain/gcc/Config.version"
274
275 source "toolchain/glibc/Config.version"
276 source "toolchain/uClibc/Config.version"
277 source "toolchain/musl/Config.version"
278
279 config LIBC
280 string
281 default "glibc" if USE_GLIBC
282 default "uClibc" if USE_UCLIBC
283 default "musl" if USE_MUSL
284
285 config LIBC_VERSION
286 string
287 default GLIBC_VERSION if USE_GLIBC
288 default UCLIBC_VERSION if USE_UCLIBC
289 default MUSL_VERSION if USE_MUSL
290
291 config TARGET_SUFFIX
292 string
293 default "gnueabi" if USE_GLIBC && (arm || armeb)
294 default "gnu" if USE_GLIBC && !(arm || armeb)
295 default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb)
296 default "uclibc" if USE_UCLIBC && !(arm || armeb)
297 default "muslgnueabi" if USE_MUSL && (arm || armeb)
298 default "musl" if USE_MUSL && !(arm || armeb)
299
300 config MIPS64_ABI
301 depends on mips64 || mips64el
302 string
303 default "64" if MIPS64_ABI_N64
304 default "n32" if MIPS64_ABI_N32
305 default "32" if MIPS64_ABI_O32
306 default "64"