ramips: fixed sms led polarity into dwr-512 DT
[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 y if powerpc64
172 default n
173 help
174 Some builds may require a 'biarch' toolchain. This option
175 allows you to specify an additional target arch.
176
177 Most people will answer N here.
178
179 config EXTRA_TARGET_ARCH_NAME
180 string
181 default "powerpc64" if powerpc64
182 prompt "Extra architecture name" if EXTRA_TARGET_ARCH
183 help
184 Specify the cpu name (eg powerpc64 or x86_64) of the
185 additional target architecture.
186
187 config EXTRA_TARGET_ARCH_OPTS
188 string
189 default "-m64" if powerpc64
190 prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
191 help
192 If you're specifying an addition target architecture,
193 you'll probably need to also provide options to make
194 the compiler use this alternate arch.
195
196 For example, if you're building a compiler that can build
197 both powerpc and powerpc64 binaries, you'll need to
198 specify -m64 here.
199
200
201 choice
202 prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
203 default MIPS64_ABI_N64
204 help
205 MIPS64 supports 3 different user-land ABIs: o32 (legacy),
206 n32 and n64.
207
208 config MIPS64_ABI_N64
209 bool "n64"
210
211 config MIPS64_ABI_N32
212 depends on !LIBC_USE_MUSL
213 bool "n32"
214
215 config MIPS64_ABI_O32
216 bool "o32"
217
218 endchoice
219
220 comment "Binary tools"
221 depends on TOOLCHAINOPTS
222
223 source "toolchain/binutils/Config.in"
224
225 comment "Compiler"
226 depends on TOOLCHAINOPTS
227
228 source "toolchain/gcc/Config.in"
229
230 config YASM
231 bool
232 depends on ( i386 || x86_64 )
233 prompt "Build yasm" if TOOLCHAINOPTS
234 default y
235 help
236 Enable if you want to build yasm
237
238 comment "C Library"
239 depends on TOOLCHAINOPTS
240
241 choice
242 prompt "C Library implementation" if TOOLCHAINOPTS
243 default LIBC_USE_UCLIBC if arc
244 default LIBC_USE_MUSL
245 help
246 Select the C library implementation.
247
248 config LIBC_USE_GLIBC
249 bool "Use glibc"
250 select USE_GLIBC
251 depends on !arc
252
253 config LIBC_USE_UCLIBC
254 select USE_UCLIBC
255 bool "Use uClibc"
256 depends on !(aarch64 || aarch64_be)
257 depends on BROKEN || !(arm || armeb || i386 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc)
258
259 config LIBC_USE_MUSL
260 select USE_MUSL
261 bool "Use musl"
262 depends on !(arc)
263
264 endchoice
265
266 source "toolchain/glibc/Config.in"
267 source "toolchain/uClibc/Config.in"
268
269 comment "Debuggers"
270 depends on TOOLCHAINOPTS
271
272 config GDB
273 bool
274 depends on !(aarch64 || aarch64_be)
275 prompt "Build gdb" if TOOLCHAINOPTS
276 default y if !EXTERNAL_TOOLCHAIN
277 help
278 Enable if you want to build the gdb.
279
280 config INSIGHT
281 bool
282 prompt "Build insight-gdb" if TOOLCHAINOPTS
283 select GDB
284 default n
285 help
286 Enable if you want to build insight-gdb.
287
288 config USE_GLIBC
289 bool
290
291 config USE_UCLIBC
292 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
293 bool
294
295 config USE_MUSL
296 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc)
297 bool
298
299 config USE_EXTERNAL_LIBC
300 bool
301 default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
302
303 source "toolchain/binutils/Config.version"
304 source "toolchain/gcc/Config.version"
305
306 source "toolchain/glibc/Config.version"
307 source "toolchain/uClibc/Config.version"
308 source "toolchain/musl/Config.version"
309
310 config LIBC
311 string
312 default "glibc" if USE_GLIBC
313 default "uClibc" if USE_UCLIBC
314 default "musl" if USE_MUSL
315
316 config LIBC_VERSION
317 string
318 default GLIBC_VERSION if USE_GLIBC
319 default UCLIBC_VERSION if USE_UCLIBC
320 default MUSL_VERSION if USE_MUSL
321
322 config TARGET_SUFFIX
323 string
324 default "gnueabi" if USE_GLIBC && (arm || armeb)
325 default "gnu" if USE_GLIBC && !(arm || armeb)
326 default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb)
327 default "uclibc" if USE_UCLIBC && !(arm || armeb)
328 default "muslgnueabi" if USE_MUSL && (arm || armeb)
329 default "musl" if USE_MUSL && !(arm || armeb)
330
331 config MIPS64_ABI
332 depends on mips64 || mips64el
333 string
334 default "64" if MIPS64_ABI_N64
335 default "n32" if MIPS64_ABI_N32
336 default "32" if MIPS64_ABI_O32
337 default "64"