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