toolchain/gcc: use 4.8-linaro by default
[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_UCLIBC
207 help
208 Select the C library implementation.
209
210 config LIBC_USE_EGLIBC
211 bool "Use eglibc"
212 select USE_EGLIBC
213 depends on !avr32
214
215 config LIBC_USE_UCLIBC
216 select USE_UCLIBC
217 bool "Use uClibc"
218
219 config LIBC_USE_MUSL
220 bool "Use musl"
221 select USE_MUSL
222 depends on BROKEN
223 depends on !(mips64 || mips64el)
224
225 endchoice
226
227 source "toolchain/eglibc/Config.in"
228 source "toolchain/uClibc/Config.in"
229 source "toolchain/musl/Config.in"
230
231 comment "Debuggers"
232 depends on TOOLCHAINOPTS
233
234 config GDB
235 bool
236 depends on !avr32
237 prompt "Build gdb" if TOOLCHAINOPTS
238 default y if !EXTERNAL_TOOLCHAIN
239 help
240 Enable if you want to build the gdb
241
242 config INSIGHT
243 bool
244 prompt "Build insight-gdb" if TOOLCHAINOPTS
245 select GDB
246 default n
247 help
248 Enable if you want to build insight-gdb
249
250 config USE_EGLIBC
251 bool
252
253 config USE_UCLIBC
254 bool
255 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
256
257 config USE_MUSL
258 bool
259
260 config USE_EXTERNAL_LIBC
261 bool
262 default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
263
264 source "toolchain/gcc/Config.version"
265
266 source "toolchain/eglibc/Config.version"
267 source "toolchain/uClibc/Config.version"
268 source "toolchain/musl/Config.version"
269
270 config LIBC
271 string
272 default "eglibc" if USE_EGLIBC
273 default "uClibc" if USE_UCLIBC
274 default "musl" if USE_MUSL
275
276 config LIBC_VERSION
277 string
278 default EGLIBC_VERSION if USE_EGLIBC
279 default UCLIBC_VERSION if USE_UCLIBC
280 default MUSL_VERSION if USE_MUSL
281
282 config TARGET_SUFFIX
283 string
284 default "gnueabi" if USE_EGLIBC && (arm || armeb)
285 default "gnu" if USE_EGLIBC && !(arm || armeb)
286 default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb)
287 default "uclibc" if USE_UCLIBC && !(arm || armeb)
288 default "muslgnueabi" if USE_MUSL && (arm || armeb)
289 default "musl" if USE_MUSL && !(arm || armeb)
290
291 config MIPS64_ABI
292 depends on mips64 || mips64el
293 string
294 default "64" if MIPS64_ABI_N64
295 default "n32" if MIPS64_ABI_N32
296 default "32" if MIPS64_ABI_O32
297 default "64"