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 menu "Global build settings"
10 bool "Select all kernel module packages by default"
14 bool "Select all userspace packages by default"
17 comment "General build options"
19 config DISPLAY_SUPPORT
20 bool "Show packages that require graphics support (local or remote)"
25 bool "Compile with support for patented functionality"
27 When this option is disabled, software which provides patented functionality
28 will not be built. In case software provides optional support for patented
29 functionality, this optional support will get disabled for this package.
33 bool "Compile with full language support"
35 When this option is enabled, packages are built with the full versions of
36 iconv and GNU gettext instead of the default OpenWrt stubs. If uClibc is
37 used, it is also built with locale support.
39 config SHADOW_PASSWORDS
41 prompt "Enable shadow password support"
44 Enable shadow password support.
48 prompt "Remove ipkg/opkg status data files in final images"
51 This removes all ipkg/opkg status data files from the target directory
52 before building the root filesystem.
54 config COLLECT_KERNEL_DEBUG
56 prompt "Collect kernel debug information"
57 select KERNEL_DEBUG_INFO
60 This collects debugging symbols from the kernel and all compiled modules.
61 Useful for release builds, so that kernel issues can be debugged offline
64 comment "Kernel build options"
66 source "config/Config-kernel.in"
68 comment "Package build options"
72 prompt "Compile packages with debugging info"
75 Adds -g3 to the CFLAGS.
79 prompt "Enable IPv6 support in packages"
82 Enable IPv6 support in packages (passes --enable-ipv6 to configure scripts).
84 config PKG_BUILD_PARALLEL
86 prompt "Compile certain packages parallelized"
89 This adds a -jX option to certain packages that are known to behave well
90 for parallel build. By default, the package make processes use the main
91 jobserver, in which case this option only takes effect when you add -jX
94 If you are unsure, select N.
96 config PKG_BUILD_USE_JOBSERVER
98 prompt "Use top-level make jobserver for packages"
99 depends on PKG_BUILD_PARALLEL
102 This passes the main make process jobserver fds to package builds,
103 enabling full parallelization across different packages.
105 Note that disabling this may overcommit CPU resources depending on the
106 -j level of the main make process, the number of package submake jobs
107 selected below and the number of actual CPUs present.
108 Example: If the main make is passed a -j4 and the submake -j
109 is also set to 4, we may end up with 16 parallel make processes
112 config PKG_BUILD_JOBS
114 prompt "Number of package submake jobs (2-512)"
117 depends on PKG_BUILD_PARALLEL && !PKG_BUILD_USE_JOBSERVER
119 The number of jobs (-jX) to pass to packages submake.
121 config PKG_DEFAULT_PARALLEL
123 prompt "Parallelize the default package build rule (May break build)"
124 depends on PKG_BUILD_PARALLEL
128 Always set the default package build rules to parallel build.
130 WARNING: This may break build or kill your cat, as it builds packages
131 with multiple jobs that are probably not tested in a parallel build
134 Only say Y if you don't mind fixing broken packages. Before reporting
135 build bugs, set this to N and re-run the build.
137 comment "Stripping options"
140 prompt "Binary stripping method"
141 default USE_STRIP if EXTERNAL_TOOLCHAIN
142 default USE_STRIP if USE_GLIBC || USE_MUSL
145 Select the binary stripping method you wish to use.
150 This will install unstripped binaries (useful for native
151 compiling/debugging).
156 This will install binaries stripped using strip from binutils.
162 depends on !USE_GLIBC
164 This will install binaries stripped using sstrip.
169 prompt "Strip arguments"
171 default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
172 default "--strip-all"
174 Specifies arguments passed to the strip command when stripping binaries.
176 config STRIP_KERNEL_EXPORTS
177 bool "Strip unnecessary exports from the kernel image"
179 Reduces kernel size by stripping unused kernel exports from the kernel
180 image. Note that this might make the kernel incompatible with any kernel
181 modules that were not selected at the time the kernel image was created.
184 bool "Strip unnecessary functions from libraries"
186 Reduces libraries to only those functions that are necessary for using all
187 selected packages (including those selected as <M>). Note that this will
188 make the system libraries incompatible with most of the packages that are
189 not selected during the build process.
192 prompt "Preferred standard C++ library"
193 default USE_LIBSTDCXX if USE_GLIBC
196 Select the preferred standard C++ library for all packages that support this.
205 comment "Hardening build options"
207 config PKG_CHECK_FORMAT_SECURITY
209 prompt "Enable gcc format-security"
212 Add -Wformat -Werror=format-security to the CFLAGS. You can disable
213 this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
217 prompt "User space Stack-Smashing Protection"
218 default PKG_CC_STACKPROTECTOR_NONE
220 Enable GCC Stack Smashing Protection (SSP) for userspace applications
221 config PKG_CC_STACKPROTECTOR_NONE
223 config PKG_CC_STACKPROTECTOR_REGULAR
226 depends on KERNEL_CC_STACKPROTECTOR_REGULAR
227 config PKG_CC_STACKPROTECTOR_STRONG
230 depends on GCC_VERSION_4_9_LINARO
231 depends on KERNEL_CC_STACKPROTECTOR_STRONG
235 prompt "Kernel space Stack-Smashing Protection"
236 default KERNEL_CC_STACKPROTECTOR_NONE
238 Enable GCC Stack-Smashing Protection (SSP) for the kernel
239 config KERNEL_CC_STACKPROTECTOR_NONE
241 config KERNEL_CC_STACKPROTECTOR_REGULAR
243 config KERNEL_CC_STACKPROTECTOR_STRONG
244 depends on GCC_VERSION_4_9_LINARO
249 prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
251 Enable the _FORTIFY_SOURCE macro which introduces additional
252 checks to detect buffer-overflows in the following standard library
253 functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
254 strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
255 gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
256 checks that shouldn't change the behavior of conforming programs,
257 while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
258 added, but some conforming programs might fail.
259 config PKG_FORTIFY_SOURCE_NONE
261 config PKG_FORTIFY_SOURCE_1
263 config PKG_FORTIFY_SOURCE_2
268 prompt "Enable RELRO protection"
270 Enable a link-time protection known as RELRO (Relocation Read Only)
271 which helps to protect from certain type of exploitation techniques
272 altering the content of some ELF sections. "Partial" RELRO makes the
273 .dynamic section not writeable after initialization, introducing
274 almost no performance penalty, while "full" RELRO also marks the GOT
275 as read-only at the cost of initializing all of it at startup.
276 config PKG_RELRO_NONE
278 config PKG_RELRO_PARTIAL
280 config PKG_RELRO_FULL