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