1 # Copyright (C) 2006-2013 OpenWrt.org
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
7 menuconfig TARGET_OPTIONS
8 bool "Target Options" if DEVEL
10 config TARGET_OPTIMIZATION
11 string "Target Optimizations" if TARGET_OPTIONS
12 default DEFAULT_TARGET_OPTIMIZATION
14 Optimizations to use when building for the target host.
17 bool "Use software floating point by default" if TARGET_OPTIONS
19 depends on arm || armeb || powerpc || mipsel || mips || mips64el || mips64
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).
26 Most people will answer N.
29 bool "Build packages with MIPS16 instructions" if TARGET_OPTIONS
31 depends on !GCC_VERSION_4_6
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
39 Most people will answer N.
42 menuconfig EXTERNAL_TOOLCHAIN
44 prompt "Use external toolchain" if DEVEL
46 If enabled, OpenWrt will compile using an existing toolchain instead of
49 config NATIVE_TOOLCHAIN
51 prompt "Use host's toolchain" if DEVEL
52 depends on EXTERNAL_TOOLCHAIN
55 If enabled, OpenWrt will compile using the native toolchain for your
56 host instead of compiling one.
60 prompt "Target name" if DEVEL
61 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
62 default "arm-unknown-linux-gnu" if arm
63 default "armeb-unknown-linux-gnu" if armeb
64 default "i486-unknown-linux-gnu" if i386
65 default "mips-unknown-linux-gnu" if mips
66 default "mipsel-unknown-linux-gnu" if mipsel
67 default "powerpc-unknown-linux-gnu" if powerpc
68 default "x86_64-unknown-linux-gnu" if x86_64
70 config TOOLCHAIN_PREFIX
72 prompt "Toolchain prefix" if DEVEL
73 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
74 default "arm-unknown-linux-gnu-" if arm
75 default "armeb-unknown-linux-gnu-" if armeb
76 default "i486-unknown-linux-gnu-" if i386
77 default "mips-unknown-linux-gnu-" if mips
78 default "mipsel-unknown-linux-gnu-" if mipsel
79 default "powerpc-unknown-linux-gnu-" if powerpc
80 default "x86_64-unknown-linux-gnu-" if x86_64
84 prompt "Toolchain root" if DEVEL
85 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
86 default "/opt/cross/arm-unknown-linux-gnu" if arm
87 default "/opt/cross/armeb-unknown-linux-gnu" if armeb
88 default "/opt/cross/i486-unknown-linux-gnu" if i386
89 default "/opt/cross/mips-unknown-linux-gnu" if mips
90 default "/opt/cross/mipsel-unknown-linux-gnu" if mipsel
91 default "/opt/cross/powerpc-unknown-linux-gnu" if powerpc
92 default "/opt/cross/x86_64-unknown-linux-gnu" if x86_64
96 prompt "Toolchain libc" if DEVEL
97 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
100 Specify the libc type used by the external toolchain. The given value
101 is passed as -m flag to all gcc and g++ invocations. This is mainly
102 intended for multilib toolchains which support glibc and uclibc at
103 the same time. If no value is specified, no -m flag is passed.
105 config TOOLCHAIN_BIN_PATH
107 prompt "Toolchain program path" if DEVEL
108 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
109 default "./usr/bin ./bin"
111 Specify additional directories searched for toolchain binaries
112 (override PATH). Use ./DIR for directories relative to the root above.
114 config TOOLCHAIN_INC_PATH
116 prompt "Toolchain include path" if DEVEL
117 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
118 default "./usr/include ./include"
120 Specify additional directories searched for header files (override
121 CPPFLAGS). Use ./DIR for directories relative to the root above.
123 config TOOLCHAIN_LIB_PATH
125 prompt "Toolchain library path" if DEVEL
126 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
127 default "./usr/lib ./lib"
129 Specify additional directories searched for libraries (override LDFLAGS).
130 Use ./DIR for directories relative to the root above.
132 config NEED_TOOLCHAIN
135 default y if !EXTERNAL_TOOLCHAIN
137 menuconfig TOOLCHAINOPTS
138 bool "Toolchain Options" if DEVEL
139 depends on NEED_TOOLCHAIN
141 menuconfig EXTRA_TARGET_ARCH
143 prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
145 default y if powerpc64
148 Some builds may require a 'biarch' toolchain. This option
149 allows you to specify an additional target arch.
151 Most people will answer N here.
153 config EXTRA_TARGET_ARCH_NAME
155 default "powerpc64" if powerpc64
156 prompt "Extra architecture name" if EXTRA_TARGET_ARCH
158 Specify the cpu name (eg powerpc64 or x86_64) of the
159 additional target architecture.
161 config EXTRA_TARGET_ARCH_OPTS
163 default "-m64" if powerpc64
164 prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
166 If you're specifying an addition target architecture,
167 you'll probably need to also provide options to make
168 the compiler use this alternate arch.
170 For example, if you're building a compiler that can build
171 both powerpc and powerpc64 binaries, you'll need to
176 prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
177 default MIPS64_ABI_N64
179 MIPS64 supports 3 different user-land ABIs: o32 (legacy),
182 config MIPS64_ABI_N64
185 config MIPS64_ABI_N32
188 config MIPS64_ABI_O32
193 comment "Binary tools"
194 depends on TOOLCHAINOPTS
196 source "toolchain/binutils/Config.in"
199 depends on TOOLCHAINOPTS
201 source "toolchain/gcc/Config.in"
204 depends on TOOLCHAINOPTS
207 prompt "C Library implementation" if TOOLCHAINOPTS
208 default LIBC_USE_UCLIBC
210 Select the C library implementation.
212 config LIBC_USE_EGLIBC
217 config LIBC_USE_UCLIBC
225 depends on !(mips64 || mips64el)
229 source "toolchain/eglibc/Config.in"
230 source "toolchain/uClibc/Config.in"
231 source "toolchain/musl/Config.in"
234 depends on TOOLCHAINOPTS
239 prompt "Build gdb" if TOOLCHAINOPTS
240 default y if !EXTERNAL_TOOLCHAIN
242 Enable if you want to build the gdb.
246 prompt "Build insight-gdb" if TOOLCHAINOPTS
250 Enable if you want to build insight-gdb.
254 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && octeon
258 default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !octeon
263 config USE_EXTERNAL_LIBC
265 default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
267 source "toolchain/gcc/Config.version"
269 source "toolchain/eglibc/Config.version"
270 source "toolchain/uClibc/Config.version"
271 source "toolchain/musl/Config.version"
275 default "eglibc" if USE_EGLIBC
276 default "uClibc" if USE_UCLIBC
277 default "musl" if USE_MUSL
281 default EGLIBC_VERSION if USE_EGLIBC
282 default UCLIBC_VERSION if USE_UCLIBC
283 default MUSL_VERSION if USE_MUSL
287 default "gnueabi" if USE_EGLIBC && (arm || armeb)
288 default "gnu" if USE_EGLIBC && !(arm || armeb)
289 default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb)
290 default "uclibc" if USE_UCLIBC && !(arm || armeb)
291 default "muslgnueabi" if USE_MUSL && (arm || armeb)
292 default "musl" if USE_MUSL && !(arm || armeb)
295 depends on mips64 || mips64el
297 default "64" if MIPS64_ABI_N64
298 default "n32" if MIPS64_ABI_N32
299 default "32" if MIPS64_ABI_O32