mpc85xx: fix address config for ws-ap3825i
[openwrt/openwrt.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 choice BPF_TOOLCHAIN
42 prompt "BPF toolchain" if DEVEL
43 default BPF_TOOLCHAIN_BUILD_LLVM if BUILDBOT
44 default BPF_TOOLCHAIN_PREBUILT if HAS_PREBUILT_LLVM_TOOLCHAIN
45 default BPF_TOOLCHAIN_NONE
46
47 config BPF_TOOLCHAIN_NONE
48 bool "None"
49
50 config BPF_TOOLCHAIN_PREBUILT
51 bool "Use prebuilt LLVM toolchain"
52 depends on HAS_PREBUILT_LLVM_TOOLCHAIN
53 select USE_LLVM_PREBUILT
54
55 config BPF_TOOLCHAIN_HOST
56 select USE_LLVM_HOST
57 bool "Use host LLVM toolchain"
58
59 config BPF_TOOLCHAIN_BUILD_LLVM
60 select USE_LLVM_BUILD
61 bool "Build LLVM toolchain for eBPF"
62 help
63 If enabled, a LLVM toolchain for building eBPF binaries will be built.
64 If this is not enabled, eBPF packages can only be built if the host
65 has a suitable toolchain
66 endchoice
67
68 config BPF_TOOLCHAIN_HOST_PATH
69 string
70 depends on BPF_TOOLCHAIN_HOST
71 prompt "Host LLVM toolchain path (prefix)" if DEVEL
72 default "/usr/local/opt/llvm" if HOST_OS_MACOS
73 default ""
74
75 menuconfig EXTERNAL_TOOLCHAIN
76 bool
77 prompt "Use external toolchain" if DEVEL
78 help
79 If enabled, the buildroot will compile using an existing toolchain instead of
80 compiling one.
81
82 config NATIVE_TOOLCHAIN
83 bool
84 prompt "Use host's toolchain" if DEVEL
85 depends on EXTERNAL_TOOLCHAIN
86 select NO_STRIP
87 help
88 If enabled, the buildroot will compile using the native toolchain for your
89 host instead of compiling one.
90
91 config TARGET_NAME
92 string
93 prompt "Target name" if DEVEL
94 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
95 default "aarch64-unknown-linux-gnu" if aarch64
96 default "aarch64_be-unknown-linux-gnu" if aarch64_be
97 default "arm-unknown-linux-gnu" if arm
98 default "armeb-unknown-linux-gnu" if armeb
99 default "i486-unknown-linux-gnu" if i386
100 default "mips-unknown-linux-gnu" if mips
101 default "mipsel-unknown-linux-gnu" if mipsel
102 default "powerpc-unknown-linux-gnu" if powerpc
103 default "x86_64-unknown-linux-gnu" if x86_64
104
105 config TOOLCHAIN_PREFIX
106 string
107 prompt "Toolchain prefix" if DEVEL
108 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
109 default "aarch64-unknown-linux-gnu" if aarch64
110 default "aarch64_be-unknown-linux-gnu" if aarch64_be
111 default "arm-unknown-linux-gnu-" if arm
112 default "armeb-unknown-linux-gnu-" if armeb
113 default "i486-unknown-linux-gnu-" if i386
114 default "mips-unknown-linux-gnu-" if mips
115 default "mipsel-unknown-linux-gnu-" if mipsel
116 default "powerpc-unknown-linux-gnu-" if powerpc
117 default "x86_64-unknown-linux-gnu-" if x86_64
118
119 config TOOLCHAIN_ROOT
120 string
121 prompt "Toolchain root" if DEVEL
122 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
123 default "/opt/cross/aarch64-unknown-linux-gnu" if aarch64
124 default "/opt/cross/aarch64_be-unknown-linux-gnu" if aarch64_be
125 default "/opt/cross/arm-unknown-linux-gnu" if arm
126 default "/opt/cross/armeb-unknown-linux-gnu" if armeb
127 default "/opt/cross/i486-unknown-linux-gnu" if i386
128 default "/opt/cross/mips-unknown-linux-gnu" if mips
129 default "/opt/cross/mipsel-unknown-linux-gnu" if mipsel
130 default "/opt/cross/powerpc-unknown-linux-gnu" if powerpc
131 default "/opt/cross/x86_64-unknown-linux-gnu" if x86_64
132
133 choice TOOLCHAIN_LIBC_TYPE
134 prompt "Toolchain libc" if DEVEL
135 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
136 default EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
137 help
138 Specify the libc type used by the external toolchain. The given value
139 is passed as -m flag to all gcc and g++ invocations. This is mainly
140 intended for multilib toolchains which support glibc and uclibc at
141 the same time. If no value is specified, no -m flag is passed.
142
143 config EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
144 bool "glibc"
145 select USE_GLIBC
146
147 config EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
148 bool "musl"
149 select USE_MUSL
150
151 endchoice
152
153 config EXTERNAL_GCC_VERSION
154 string
155 prompt "External Toolchain GCC Version" if DEVEL
156 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
157 help
158 Manually specify the GCC version used by the selected
159 external toolchain.
160
161 config TOOLCHAIN_LIBC
162 string
163 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
164 default "glibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
165 default "musl" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
166
167 config TOOLCHAIN_BIN_PATH
168 string
169 prompt "Toolchain program path" if DEVEL
170 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
171 default "./usr/bin ./bin"
172 help
173 Specify additional directories searched for toolchain binaries
174 (override PATH). Use ./DIR for directories relative to the root above.
175
176 config TOOLCHAIN_INC_PATH
177 string
178 prompt "Toolchain include path" if DEVEL
179 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
180 default "./usr/include ./include/fortify ./include" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
181 default "./usr/include ./include"
182 help
183 Specify additional directories searched for header files (override
184 CPPFLAGS). Use ./DIR for directories relative to the root above.
185
186 config TOOLCHAIN_LIB_PATH
187 string
188 prompt "Toolchain library path" if DEVEL
189 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
190 default "./usr/lib ./lib"
191 help
192 Specify additional directories searched for libraries (override LDFLAGS).
193 Use ./DIR for directories relative to the root above.
194
195 config NEED_TOOLCHAIN
196 bool
197 depends on DEVEL
198 default y if !EXTERNAL_TOOLCHAIN
199
200 menuconfig TOOLCHAINOPTS
201 bool "Toolchain Options" if DEVEL
202 depends on NEED_TOOLCHAIN
203
204 menuconfig EXTRA_TARGET_ARCH
205 bool
206 prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
207 depends on !sparc
208 help
209 Some builds may require a 'biarch' toolchain. This option
210 allows you to specify an additional target arch.
211
212 Most people will answer N here.
213
214 config EXTRA_TARGET_ARCH_NAME
215 string
216 prompt "Extra architecture name" if EXTRA_TARGET_ARCH
217 help
218 Specify the cpu name (eg powerpc64 or x86_64) of the
219 additional target architecture.
220
221 config EXTRA_TARGET_ARCH_OPTS
222 string
223 prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
224 help
225 If you're specifying an addition target architecture,
226 you'll probably need to also provide options to make
227 the compiler use this alternate arch.
228
229 For example, if you're building a compiler that can build
230 both powerpc and powerpc64 binaries, you'll need to
231 specify -m64 here.
232
233
234 choice
235 prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
236 default MIPS64_ABI_N64
237 help
238 MIPS64 supports 3 different user-land ABIs: o32 (legacy),
239 n32 and n64.
240
241 config MIPS64_ABI_N64
242 bool "n64"
243
244 config MIPS64_ABI_N32
245 depends on !LIBC_USE_MUSL
246 bool "n32"
247
248 config MIPS64_ABI_O32
249 bool "o32"
250
251 endchoice
252
253 comment "Binary tools"
254 depends on TOOLCHAINOPTS
255
256 source "toolchain/binutils/Config.in"
257
258 config DWARVES
259 bool
260 prompt "Build pahole" if TOOLCHAINOPTS
261 depends on !HOST_OS_MACOS
262 help
263 Enable if you want to build pahole and the dwarves tools.
264
265 comment "Compiler"
266 depends on TOOLCHAINOPTS
267
268 source "toolchain/gcc/Config.in"
269
270 config NASM
271 bool
272 depends on ( i386 || x86_64 )
273 prompt "Build nasm" if TOOLCHAINOPTS
274 default y
275 help
276 Enable if you want to build nasm
277
278 comment "C Library"
279 depends on TOOLCHAINOPTS
280
281 choice
282 prompt "C Library implementation" if TOOLCHAINOPTS
283 default LIBC_USE_GLIBC if arc
284 default LIBC_USE_MUSL
285 help
286 Select the C library implementation.
287
288 config LIBC_USE_GLIBC
289 bool "Use glibc"
290 select USE_GLIBC
291
292 config LIBC_USE_MUSL
293 select USE_MUSL
294 bool "Use musl"
295 depends on !arc
296
297 endchoice
298
299 source "toolchain/musl/Config.in"
300
301 comment "Debuggers"
302 depends on TOOLCHAINOPTS
303
304 config GDB
305 bool
306 prompt "Build gdb" if TOOLCHAINOPTS
307 default y if !EXTERNAL_TOOLCHAIN
308 help
309 Enable if you want to build the gdb.
310
311 config GDB_PYTHON
312 bool
313 depends on GDB
314 prompt "Build gdb with python binding"
315
316 help
317 Enable the python bindings for GDB to allow using python in the gdb shell.
318
319 config HAS_BPF_TOOLCHAIN
320 bool
321
322 config HAS_PREBUILT_LLVM_TOOLCHAIN
323 def_bool $(shell, [ -f llvm-bpf/.llvm-version ] && echo y || echo n)
324
325 config USE_LLVM_HOST
326 select HAS_BPF_TOOLCHAIN
327 bool
328
329 config USE_LLVM_PREBUILT
330 select HAS_BPF_TOOLCHAIN
331 default y if !DEVEL && !BUILDBOT && HAS_PREBUILT_LLVM_TOOLCHAIN
332 bool
333
334 config USE_LLVM_BUILD
335 default y if !DEVEL && BUILDBOT
336 select HAS_BPF_TOOLCHAIN
337 bool
338
339 config USE_GLIBC
340 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
341 bool
342
343 config USE_MUSL
344 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc)
345 bool
346
347 config SSP_SUPPORT
348 default y if !PKG_CC_STACKPROTECTOR_NONE
349 bool
350
351 config USE_EXTERNAL_LIBC
352 bool
353 default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
354
355 source "toolchain/binutils/Config.version"
356 source "toolchain/gcc/Config.version"
357
358 config LIBC
359 string
360 default "glibc" if USE_GLIBC
361 default "musl" if USE_MUSL
362
363 config TARGET_SUFFIX
364 string
365 default "gnueabi" if USE_GLIBC && (arm || armeb)
366 default "gnu" if USE_GLIBC && !(arm || armeb)
367 default "muslgnueabi" if USE_MUSL && (arm || armeb)
368 default "musl" if USE_MUSL && !(arm || armeb)
369
370 config MIPS64_ABI
371 depends on mips64 || mips64el
372 string
373 default "64" if MIPS64_ABI_N64
374 default "n32" if MIPS64_ABI_N32
375 default "32" if MIPS64_ABI_O32
376 default "64"