gcc: remove version 4.8.0
[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                 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 "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
69
70         config TOOLCHAIN_PREFIX
71                 string
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
81
82         config TOOLCHAIN_ROOT
83                 string
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
93
94         config TOOLCHAIN_LIBC
95                 string
96                 prompt "Toolchain libc"  if DEVEL
97                 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
98                 default "uclibc"
99                 help
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.
104
105         config TOOLCHAIN_BIN_PATH
106                 string
107                 prompt "Toolchain program path"  if DEVEL
108                 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
109                 default "./usr/bin ./bin"
110                 help
111                   Specify additional directories searched for toolchain binaries
112                   (override PATH). Use ./DIR for directories relative to the root above.
113
114         config TOOLCHAIN_INC_PATH
115                 string
116                 prompt "Toolchain include path"  if DEVEL
117                 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
118                 default "./usr/include ./include"
119                 help
120                   Specify additional directories searched for header files (override
121                   CPPFLAGS). Use ./DIR for directories relative to the root above.
122
123         config TOOLCHAIN_LIB_PATH
124                 string
125                 prompt "Toolchain library path"  if DEVEL
126                 depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
127                 default "./usr/lib ./lib"
128                 help
129                   Specify additional directories searched for libraries (override LDFLAGS).
130                   Use ./DIR for directories relative to the root above.
131
132 config NEED_TOOLCHAIN
133         bool
134         depends on DEVEL
135         default y if !EXTERNAL_TOOLCHAIN
136
137 menuconfig TOOLCHAINOPTS
138         bool "Toolchain Options"  if DEVEL
139         depends on NEED_TOOLCHAIN
140
141 menuconfig EXTRA_TARGET_ARCH
142         bool
143         prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS
144         depends on !sparc
145         default y       if powerpc64
146         default n
147         help
148           Some builds may require a 'biarch' toolchain. This option
149           allows you to specify an additional target arch.
150
151           Most people will answer N here.
152
153         config EXTRA_TARGET_ARCH_NAME
154                 string
155                 default "powerpc64"     if powerpc64
156                 prompt "Extra architecture name" if EXTRA_TARGET_ARCH
157                 help
158                   Specify the cpu name (eg powerpc64 or x86_64) of the
159                   additional target architecture.
160
161         config EXTRA_TARGET_ARCH_OPTS
162                 string
163                 default "-m64"          if powerpc64
164                 prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH
165                 help
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.
169
170                   For example, if you're building a compiler that can build
171                   both powerpc and powerpc64 binaries, you'll need to
172                   specify -m64 here.
173
174
175         choice
176                 prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el)
177                 default MIPS64_ABI_N64
178                 help
179                    MIPS64 supports 3 different user-land ABIs: o32 (legacy),
180                    n32 and n64.
181
182                 config MIPS64_ABI_N64
183                         bool "n64"
184
185                 config MIPS64_ABI_N32
186                         bool "n32"
187
188                 config MIPS64_ABI_O32
189                         bool "o32"
190
191         endchoice
192
193 comment "Binary tools"
194         depends on TOOLCHAINOPTS
195
196 source "toolchain/binutils/Config.in"
197
198 comment "Compiler"
199         depends on TOOLCHAINOPTS
200
201 source "toolchain/gcc/Config.in"
202
203 comment "C Library"
204         depends on TOOLCHAINOPTS
205
206 choice
207         prompt "C Library implementation" if TOOLCHAINOPTS
208         default LIBC_USE_UCLIBC
209         help
210           Select the C library implementation.
211
212         config LIBC_USE_EGLIBC
213                 bool "Use eglibc"
214                 select USE_EGLIBC
215                 depends on !avr32
216
217         config LIBC_USE_UCLIBC
218                 select USE_UCLIBC
219                 bool "Use uClibc"
220
221         config LIBC_USE_MUSL
222                 bool "Use musl"
223                 select USE_MUSL
224                 depends on BROKEN
225                 depends on !(mips64 || mips64el)
226
227 endchoice
228
229 source "toolchain/eglibc/Config.in"
230 source "toolchain/uClibc/Config.in"
231 source "toolchain/musl/Config.in"
232
233 comment "Debuggers"
234         depends on TOOLCHAINOPTS
235
236 config GDB
237         bool
238         depends on !avr32
239         prompt "Build gdb" if TOOLCHAINOPTS
240         default y if !EXTERNAL_TOOLCHAIN
241         help
242           Enable if you want to build the gdb.
243
244 config INSIGHT
245         bool
246         prompt "Build insight-gdb" if TOOLCHAINOPTS
247         select GDB
248         default n
249         help
250           Enable if you want to build insight-gdb.
251
252 config USE_EGLIBC
253         bool
254         default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && octeon
255
256 config USE_UCLIBC
257         bool
258         default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !octeon
259
260 config USE_MUSL
261         bool
262
263 config USE_EXTERNAL_LIBC
264         bool
265         default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN
266
267 source "toolchain/gcc/Config.version"
268
269 source "toolchain/eglibc/Config.version"
270 source "toolchain/uClibc/Config.version"
271 source "toolchain/musl/Config.version"
272
273 config LIBC
274         string
275         default "eglibc"  if USE_EGLIBC
276         default "uClibc"  if USE_UCLIBC
277         default "musl"    if USE_MUSL
278
279 config LIBC_VERSION
280         string
281         default EGLIBC_VERSION  if USE_EGLIBC
282         default UCLIBC_VERSION  if USE_UCLIBC
283         default MUSL_VERSION    if USE_MUSL
284
285 config TARGET_SUFFIX
286         string
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)
293
294 config MIPS64_ABI
295         depends on mips64 || mips64el
296         string
297         default "64" if MIPS64_ABI_N64
298         default "n32" if MIPS64_ABI_N32
299         default "32" if MIPS64_ABI_O32
300         default "64"