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