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