build: do not deselect CONFIG_USE_SSTRIP if CONFIG_DEBUG is enabled
[openwrt/staging/wigyori.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 default y
20
21 comment "General build options"
22
23 config DISPLAY_SUPPORT
24 bool "Show packages that require graphics support (local or remote)"
25 default n
26
27 config BUILD_PATENTED
28 default y
29 bool "Compile with support for patented functionality"
30 help
31 When this option is disabled, software which provides patented functionality
32 will not be built. In case software provides optional support for patented
33 functionality, this optional support will get disabled for this package.
34
35 config BUILD_NLS
36 default n
37 bool "Compile with full language support"
38 help
39 When this option is enabled, packages are built with the full versions of
40 iconv and GNU gettext instead of the default OpenWrt stubs. If uClibc is
41 used, it is also built with locale support.
42
43 config SHADOW_PASSWORDS
44 bool
45 prompt "Enable shadow password support"
46 default y
47 help
48 Enable shadow password support.
49
50 config CLEAN_IPKG
51 bool
52 prompt "Remove ipkg/opkg status data files in final images"
53 default n
54 help
55 This removes all ipkg/opkg status data files from the target directory
56 before building the root filesystem.
57
58 config COLLECT_KERNEL_DEBUG
59 bool
60 prompt "Collect kernel debug information"
61 select KERNEL_DEBUG_INFO
62 default n
63 help
64 This collects debugging symbols from the kernel and all compiled modules.
65 Useful for release builds, so that kernel issues can be debugged offline
66 later.
67
68 comment "Kernel build options"
69
70 source "config/Config-kernel.in"
71
72 comment "Package build options"
73
74 config DEBUG
75 bool
76 prompt "Compile packages with debugging info"
77 default n
78 help
79 Adds -g3 to the CFLAGS.
80
81 config IPV6
82 bool
83 prompt "Enable IPv6 support in packages"
84 default y
85 help
86 Enables IPv6 support in kernel (builtin) and packages.
87
88 config PKG_BUILD_PARALLEL
89 bool
90 prompt "Compile certain packages parallelized"
91 default y
92 help
93 This adds a -jX option to certain packages that are known to behave well
94 for parallel build. By default, the package make processes use the main
95 jobserver, in which case this option only takes effect when you add -jX
96 to the make command.
97
98 If you are unsure, select N.
99
100 config PKG_BUILD_USE_JOBSERVER
101 bool
102 prompt "Use top-level make jobserver for packages"
103 depends on PKG_BUILD_PARALLEL
104 default y
105 help
106 This passes the main make process jobserver fds to package builds,
107 enabling full parallelization across different packages.
108
109 Note that disabling this may overcommit CPU resources depending on the
110 -j level of the main make process, the number of package submake jobs
111 selected below and the number of actual CPUs present.
112 Example: If the main make is passed a -j4 and the submake -j
113 is also set to 4, we may end up with 16 parallel make processes
114 in the worst case.
115
116 config PKG_BUILD_JOBS
117 int
118 prompt "Number of package submake jobs (2-512)"
119 range 2 512
120 default 2
121 depends on PKG_BUILD_PARALLEL && !PKG_BUILD_USE_JOBSERVER
122 help
123 The number of jobs (-jX) to pass to packages submake.
124
125 config PKG_DEFAULT_PARALLEL
126 bool
127 prompt "Parallelize the default package build rule (May break build)"
128 depends on PKG_BUILD_PARALLEL
129 depends on BROKEN
130 default n
131 help
132 Always set the default package build rules to parallel build.
133
134 WARNING: This may break build or kill your cat, as it builds packages
135 with multiple jobs that are probably not tested in a parallel build
136 environment.
137
138 Only say Y if you don't mind fixing broken packages. Before reporting
139 build bugs, set this to N and re-run the build.
140
141 comment "Stripping options"
142
143 choice
144 prompt "Binary stripping method"
145 default USE_STRIP if EXTERNAL_TOOLCHAIN
146 default USE_STRIP if USE_GLIBC
147 default USE_SSTRIP
148 help
149 Select the binary stripping method you wish to use.
150
151 config NO_STRIP
152 bool "none"
153 help
154 This will install unstripped binaries (useful for native
155 compiling/debugging).
156
157 config USE_STRIP
158 bool "strip"
159 help
160 This will install binaries stripped using strip from binutils.
161
162
163 config USE_SSTRIP
164 bool "sstrip"
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 y
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 depends on USE_MUSL
222 default PKG_CC_STACKPROTECTOR_REGULAR
223 help
224 Enable GCC Stack Smashing Protection (SSP) for userspace applications
225 config PKG_CC_STACKPROTECTOR_NONE
226 bool "None"
227 config PKG_CC_STACKPROTECTOR_REGULAR
228 bool "Regular"
229 select SSP_SUPPORT if !USE_MUSL
230 depends on KERNEL_CC_STACKPROTECTOR_REGULAR
231 config PKG_CC_STACKPROTECTOR_STRONG
232 bool "Strong"
233 select SSP_SUPPORT if !USE_MUSL
234 depends on GCC_VERSION_5
235 depends on KERNEL_CC_STACKPROTECTOR_STRONG
236 endchoice
237
238 choice
239 prompt "Kernel space Stack-Smashing Protection"
240 default KERNEL_CC_STACKPROTECTOR_REGULAR
241 depends on USE_MUSL || !(x86_64 || i386)
242 help
243 Enable GCC Stack-Smashing Protection (SSP) for the kernel
244 config KERNEL_CC_STACKPROTECTOR_NONE
245 bool "None"
246 config KERNEL_CC_STACKPROTECTOR_REGULAR
247 bool "Regular"
248 config KERNEL_CC_STACKPROTECTOR_STRONG
249 depends on GCC_VERSION_5
250 bool "Strong"
251 endchoice
252
253 choice
254 prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
255 default PKG_FORTIFY_SOURCE_1
256 help
257 Enable the _FORTIFY_SOURCE macro which introduces additional
258 checks to detect buffer-overflows in the following standard library
259 functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
260 strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
261 gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
262 checks that shouldn't change the behavior of conforming programs,
263 while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
264 added, but some conforming programs might fail.
265 config PKG_FORTIFY_SOURCE_NONE
266 bool "None"
267 config PKG_FORTIFY_SOURCE_1
268 bool "Conservative"
269 config PKG_FORTIFY_SOURCE_2
270 bool "Aggressive"
271 endchoice
272
273 choice
274 prompt "Enable RELRO protection"
275 default PKG_RELRO_FULL
276 help
277 Enable a link-time protection known as RELRO (Relocation Read Only)
278 which helps to protect from certain type of exploitation techniques
279 altering the content of some ELF sections. "Partial" RELRO makes the
280 .dynamic section not writeable after initialization, introducing
281 almost no performance penalty, while "full" RELRO also marks the GOT
282 as read-only at the cost of initializing all of it at startup.
283 config PKG_RELRO_NONE
284 bool "None"
285 config PKG_RELRO_PARTIAL
286 bool "Partial"
287 config PKG_RELRO_FULL
288 bool "Full"
289 endchoice
290
291 endmenu