build: add integration for managing opkg package feed keys
[openwrt/openwrt.git] / config / Config-build.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 menu "Global build settings"
8
9 config ALL_KMODS
10 bool "Select all kernel module packages by default"
11 default ALL
12
13 config ALL
14 bool "Select all userspace packages by default"
15 default n
16
17 config SIGNED_PACKAGES
18 bool "Cryptographically signed package lists"
19
20 comment "General build options"
21
22 config DISPLAY_SUPPORT
23 bool "Show packages that require graphics support (local or remote)"
24 default n
25
26 config BUILD_PATENTED
27 default y
28 bool "Compile with support for patented functionality"
29 help
30 When this option is disabled, software which provides patented functionality
31 will not be built. In case software provides optional support for patented
32 functionality, this optional support will get disabled for this package.
33
34 config BUILD_NLS
35 default n
36 bool "Compile with full language support"
37 help
38 When this option is enabled, packages are built with the full versions of
39 iconv and GNU gettext instead of the default OpenWrt stubs. If uClibc is
40 used, it is also built with locale support.
41
42 config SHADOW_PASSWORDS
43 bool
44 prompt "Enable shadow password support"
45 default y
46 help
47 Enable shadow password support.
48
49 config CLEAN_IPKG
50 bool
51 prompt "Remove ipkg/opkg status data files in final images"
52 default n
53 help
54 This removes all ipkg/opkg status data files from the target directory
55 before building the root filesystem.
56
57 config COLLECT_KERNEL_DEBUG
58 bool
59 prompt "Collect kernel debug information"
60 select KERNEL_DEBUG_INFO
61 default n
62 help
63 This collects debugging symbols from the kernel and all compiled modules.
64 Useful for release builds, so that kernel issues can be debugged offline
65 later.
66
67 comment "Kernel build options"
68
69 source "config/Config-kernel.in"
70
71 comment "Package build options"
72
73 config DEBUG
74 bool
75 prompt "Compile packages with debugging info"
76 default n
77 help
78 Adds -g3 to the CFLAGS.
79
80 config IPV6
81 bool
82 prompt "Enable IPv6 support in packages"
83 default y
84 help
85 Enable IPv6 support in packages (passes --enable-ipv6 to configure scripts).
86
87 config PKG_BUILD_PARALLEL
88 bool
89 prompt "Compile certain packages parallelized"
90 default y
91 help
92 This adds a -jX option to certain packages that are known to behave well
93 for parallel build. By default, the package make processes use the main
94 jobserver, in which case this option only takes effect when you add -jX
95 to the make command.
96
97 If you are unsure, select N.
98
99 config PKG_BUILD_USE_JOBSERVER
100 bool
101 prompt "Use top-level make jobserver for packages"
102 depends on PKG_BUILD_PARALLEL
103 default y
104 help
105 This passes the main make process jobserver fds to package builds,
106 enabling full parallelization across different packages.
107
108 Note that disabling this may overcommit CPU resources depending on the
109 -j level of the main make process, the number of package submake jobs
110 selected below and the number of actual CPUs present.
111 Example: If the main make is passed a -j4 and the submake -j
112 is also set to 4, we may end up with 16 parallel make processes
113 in the worst case.
114
115 config PKG_BUILD_JOBS
116 int
117 prompt "Number of package submake jobs (2-512)"
118 range 2 512
119 default 2
120 depends on PKG_BUILD_PARALLEL && !PKG_BUILD_USE_JOBSERVER
121 help
122 The number of jobs (-jX) to pass to packages submake.
123
124 config PKG_DEFAULT_PARALLEL
125 bool
126 prompt "Parallelize the default package build rule (May break build)"
127 depends on PKG_BUILD_PARALLEL
128 depends on BROKEN
129 default n
130 help
131 Always set the default package build rules to parallel build.
132
133 WARNING: This may break build or kill your cat, as it builds packages
134 with multiple jobs that are probably not tested in a parallel build
135 environment.
136
137 Only say Y if you don't mind fixing broken packages. Before reporting
138 build bugs, set this to N and re-run the build.
139
140 comment "Stripping options"
141
142 choice
143 prompt "Binary stripping method"
144 default USE_STRIP if EXTERNAL_TOOLCHAIN
145 default USE_STRIP if USE_GLIBC || USE_MUSL
146 default USE_SSTRIP
147 help
148 Select the binary stripping method you wish to use.
149
150 config NO_STRIP
151 bool "none"
152 help
153 This will install unstripped binaries (useful for native
154 compiling/debugging).
155
156 config USE_STRIP
157 bool "strip"
158 help
159 This will install binaries stripped using strip from binutils.
160
161
162 config USE_SSTRIP
163 bool "sstrip"
164 depends on !DEBUG
165 depends on !USE_GLIBC
166 help
167 This will install binaries stripped using sstrip.
168 endchoice
169
170 config STRIP_ARGS
171 string
172 prompt "Strip arguments"
173 depends on USE_STRIP
174 default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
175 default "--strip-all"
176 help
177 Specifies arguments passed to the strip command when stripping binaries.
178
179 config STRIP_KERNEL_EXPORTS
180 bool "Strip unnecessary exports from the kernel image"
181 help
182 Reduces kernel size by stripping unused kernel exports from the kernel
183 image. Note that this might make the kernel incompatible with any kernel
184 modules that were not selected at the time the kernel image was created.
185
186 config USE_MKLIBS
187 bool "Strip unnecessary functions from libraries"
188 help
189 Reduces libraries to only those functions that are necessary for using all
190 selected packages (including those selected as <M>). Note that this will
191 make the system libraries incompatible with most of the packages that are
192 not selected during the build process.
193
194 choice
195 prompt "Preferred standard C++ library"
196 default USE_LIBSTDCXX if USE_GLIBC
197 default USE_UCLIBCXX
198 help
199 Select the preferred standard C++ library for all packages that support this.
200
201 config USE_UCLIBCXX
202 bool "uClibc++"
203
204 config USE_LIBSTDCXX
205 bool "libstdc++"
206 endchoice
207
208 comment "Hardening build options"
209
210 config PKG_CHECK_FORMAT_SECURITY
211 bool
212 prompt "Enable gcc format-security"
213 default n
214 help
215 Add -Wformat -Werror=format-security to the CFLAGS. You can disable
216 this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
217 Makefile.
218
219 choice
220 prompt "User space Stack-Smashing Protection"
221 default PKG_CC_STACKPROTECTOR_NONE
222 help
223 Enable GCC Stack Smashing Protection (SSP) for userspace applications
224 config PKG_CC_STACKPROTECTOR_NONE
225 bool "None"
226 config PKG_CC_STACKPROTECTOR_REGULAR
227 bool "Regular"
228 select SSP_SUPPORT
229 depends on KERNEL_CC_STACKPROTECTOR_REGULAR
230 config PKG_CC_STACKPROTECTOR_STRONG
231 bool "Strong"
232 select SSP_SUPPORT
233 depends on GCC_VERSION_4_9_LINARO
234 depends on KERNEL_CC_STACKPROTECTOR_STRONG
235 endchoice
236
237 choice
238 prompt "Kernel space Stack-Smashing Protection"
239 default KERNEL_CC_STACKPROTECTOR_NONE
240 help
241 Enable GCC Stack-Smashing Protection (SSP) for the kernel
242 config KERNEL_CC_STACKPROTECTOR_NONE
243 bool "None"
244 config KERNEL_CC_STACKPROTECTOR_REGULAR
245 bool "Regular"
246 config KERNEL_CC_STACKPROTECTOR_STRONG
247 depends on GCC_VERSION_4_9_LINARO
248 bool "Strong"
249 endchoice
250
251 choice
252 prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
253 help
254 Enable the _FORTIFY_SOURCE macro which introduces additional
255 checks to detect buffer-overflows in the following standard library
256 functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
257 strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
258 gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
259 checks that shouldn't change the behavior of conforming programs,
260 while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
261 added, but some conforming programs might fail.
262 config PKG_FORTIFY_SOURCE_NONE
263 bool "None"
264 config PKG_FORTIFY_SOURCE_1
265 bool "Conservative"
266 config PKG_FORTIFY_SOURCE_2
267 bool "Aggressive"
268 endchoice
269
270 choice
271 prompt "Enable RELRO protection"
272 help
273 Enable a link-time protection known as RELRO (Relocation Read Only)
274 which helps to protect from certain type of exploitation techniques
275 altering the content of some ELF sections. "Partial" RELRO makes the
276 .dynamic section not writeable after initialization, introducing
277 almost no performance penalty, while "full" RELRO also marks the GOT
278 as read-only at the cost of initializing all of it at startup.
279 config PKG_RELRO_NONE
280 bool "None"
281 config PKG_RELRO_PARTIAL
282 bool "Partial"
283 config PKG_RELRO_FULL
284 bool "Full"
285 endchoice
286
287 endmenu