ar71xx: Remove ath10k packages from archer-c7-v1 (fixes FS#1743)
[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 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 choice TOOLCHAIN_LIBC_TYPE
100 prompt "Toolchain libc" if DEVEL
101 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
102 default EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
103 help
104 Specify the libc type used by the external toolchain. The given value
105 is passed as -m flag to all gcc and g++ invocations. This is mainly
106 intended for multilib toolchains which support glibc and uclibc at
107 the same time. If no value is specified, no -m flag is passed.
108
109 config EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
110 bool "glibc"
111 select USE_GLIBC
112
113 config EXTERNAL_TOOLCHAIN_LIBC_USE_UCLIBC
114 bool "uClibc"
115 select USE_UCLIBC
116 depends on !(aarch64 || aarch64_be)
117
118 config EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
119 bool "musl"
120 select USE_MUSL
121
122 endchoice
123
124 config TOOLCHAIN_LIBC
125 string
126 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
127 default "glibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC
128 default "uclibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_UCLIBC
129 default "musl" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL
130
131 config TOOLCHAIN_BIN_PATH
132 string
133 prompt "Toolchain program path" if DEVEL
134 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
135 default "./usr/bin ./bin"
136 help
137 Specify additional directories searched for toolchain binaries
138 (override PATH). Use ./DIR for directories relative to the root above.
139
140 config TOOLCHAIN_INC_PATH
141 string
142 prompt "Toolchain include path" if DEVEL
143 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
144 default "./usr/include ./include"
145 help
146 Specify additional directories searched for header files (override
147 CPPFLAGS). Use ./DIR for directories relative to the root above.
148
149 config TOOLCHAIN_LIB_PATH
150 string
151 prompt "Toolchain library path" if DEVEL
152 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
153 default "./usr/lib ./lib"
154 help
155 Specify additional directories searched for libraries (override LDFLAGS).
156 Use ./DIR for directories relative to the root above.
157
158 config NEED_TOOLCHAIN
159 bool
160 depends on DEVEL
161 default y if !EXTERNAL_TOOLCHAIN
162
163 menuconfig TOOLCHAINOPTS
164 bool "Toolchain Options" if DEVEL
165 depends on NEED_TOOLCHAIN
166
167 menuconfig EXTRA_TARGET_ARCH
168 bool
169 prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
170 depends on !sparc
171 default n
172 help
173 Some builds may require a 'biarch' toolchain. This option
174 allows you to specify an additional target arch.
175
176 Most people will answer N here.
177
178 config EXTRA_TARGET_ARCH_NAME
179 string
180 prompt "Extra architecture name" if EXTRA_TARGET_ARCH
181 help
182 Specify the cpu name (eg powerpc64 or x86_64) of the
183 additional target architecture.
184
185 config EXTRA_TARGET_ARCH_OPTS
186 string
187 prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
188 help
189 If you're specifying an addition target architecture,
190 you'll probably need to also provide options to make
191 the compiler use this alternate arch.
192
193 For example, if you're building a compiler that can build
194 both powerpc and powerpc64 binaries, you'll need to
195 specify -m64 here.
196
197
198 choice
199 prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
200 default MIPS64_ABI_N64
201 help
202 MIPS64 supports 3 different user-land ABIs: o32 (legacy),
203 n32 and n64.
204
205 config MIPS64_ABI_N64
206 bool "n64"
207
208 config MIPS64_ABI_N32
209 depends on !LIBC_USE_MUSL
210 bool "n32"
211
212 config MIPS64_ABI_O32
213 bool "o32"
214
215 endchoice
216
217 comment "Binary tools"
218 depends on TOOLCHAINOPTS
219
220 source "toolchain/binutils/Config.in"
221
222 comment "Compiler"
223 depends on TOOLCHAINOPTS
224
225 source "toolchain/gcc/Config.in"
226
227 config NASM
228 bool
229 depends on ( i386 || x86_64 )
230 prompt "Build nasm" if TOOLCHAINOPTS
231 default y
232 help
233 Enable if you want to build nasm
234
235 comment "C Library"
236 depends on TOOLCHAINOPTS
237
238 choice
239 prompt "C Library implementation" if TOOLCHAINOPTS
240 default LIBC_USE_UCLIBC if arc
241 default LIBC_USE_GLIBC if powerpc64
242 default LIBC_USE_MUSL
243 help
244 Select the C library implementation.
245
246 config LIBC_USE_GLIBC
247 bool "Use glibc"
248 select USE_GLIBC
249 depends on !arc
250
251 config LIBC_USE_UCLIBC
252 select USE_UCLIBC
253 bool "Use uClibc"
254 depends on !(aarch64 || aarch64_be || powerpc64)
255 depends on BROKEN || !(arm || armeb || i386 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc)
256
257 config LIBC_USE_MUSL
258 select USE_MUSL
259 bool "Use musl"
260 depends on !(arc || powerpc64)
261
262 endchoice
263
264 source "toolchain/uClibc/Config.in"
265 source "toolchain/musl/Config.in"
266
267 comment "Debuggers"
268 depends on TOOLCHAINOPTS
269
270 config GDB
271 bool
272 prompt "Build gdb" if TOOLCHAINOPTS
273 default y if !EXTERNAL_TOOLCHAIN
274 help
275 Enable if you want to build the gdb.
276
277 config USE_GLIBC
278 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (powerpc64)
279 bool
280
281 config USE_UCLIBC
282 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
283 bool
284
285 config USE_MUSL
286 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc || powerpc64)
287 bool
288
289 config SSP_SUPPORT
290 default y if USE_MUSL || GCC_LIBSSP
291 bool
292
293 config USE_EXTERNAL_LIBC
294 bool
295 default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
296
297 source "toolchain/binutils/Config.version"
298 source "toolchain/gcc/Config.version"
299
300 config LIBC
301 string
302 default "glibc" if USE_GLIBC
303 default "uClibc" if USE_UCLIBC
304 default "musl" if USE_MUSL
305
306 config TARGET_SUFFIX
307 string
308 default "gnueabi" if USE_GLIBC && (arm || armeb)
309 default "gnu" if USE_GLIBC && !(arm || armeb)
310 default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb)
311 default "uclibc" if USE_UCLIBC && !(arm || armeb)
312 default "muslgnueabi" if USE_MUSL && (arm || armeb)
313 default "musl" if USE_MUSL && !(arm || armeb)
314
315 config MIPS64_ABI
316 depends on mips64 || mips64el
317 string
318 default "64" if MIPS64_ABI_N64
319 default "n32" if MIPS64_ABI_N32
320 default "32" if MIPS64_ABI_O32
321 default "64"