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 packages by default"
13 comment "General build options"
15 config DISPLAY_SUPPORT
16 bool "Show packages that require graphics support (local or remote)"
21 bool "Compile with support for patented functionality"
23 When this option is disabled, software which provides patented functionality
24 will not be built. In case software provides optional support for patented
25 functionality, this optional support will get disabled for this package.
29 bool "Compile with full language support"
31 When this option is enabled, packages are built with the full versions of
32 iconv and GNU gettext instead of the default OpenWrt stubs. If uClibc is
33 used, it is also built with locale support.
35 config SHADOW_PASSWORDS
37 prompt "Enable shadow password support"
40 Enable shadow password support.
44 prompt "Remove ipkg/opkg status data files in final images"
47 This removes all ipkg/opkg status data files from the target directory
48 before building the root filesystem.
50 config COLLECT_KERNEL_DEBUG
52 prompt "Collect kernel debug information"
53 select KERNEL_DEBUG_INFO
56 This collects debugging symbols from the kernel and all compiled modules.
57 Useful for release builds, so that kernel issues can be debugged offline
60 comment "Kernel build options"
62 source "config/Config-kernel.in"
64 comment "Package build options"
68 prompt "Compile packages with debugging info"
71 Adds -g3 to the CFLAGS.
75 prompt "Enable IPv6 support in packages"
78 Enable IPv6 support in packages (passes --enable-ipv6 to configure scripts).
80 config PKG_BUILD_PARALLEL
82 prompt "Compile certain packages parallelized"
85 This adds a -jX option to certain packages that are known to behave well
86 for parallel build. By default, the package make processes use the main
87 jobserver, in which case this option only takes effect when you add -jX
90 If you are unsure, select N.
92 config PKG_BUILD_USE_JOBSERVER
94 prompt "Use top-level make jobserver for packages"
95 depends on PKG_BUILD_PARALLEL
98 This passes the main make process jobserver fds to package builds,
99 enabling full parallelization across different packages.
101 Note that disabling this may overcommit CPU resources depending on the
102 -j level of the main make process, the number of package submake jobs
103 selected below and the number of actual CPUs present.
104 Example: If the main make is passed a -j4 and the submake -j
105 is also set to 4, we may end up with 16 parallel make processes
108 config PKG_BUILD_JOBS
110 prompt "Number of package submake jobs (2-512)"
113 depends on PKG_BUILD_PARALLEL && !PKG_BUILD_USE_JOBSERVER
115 The number of jobs (-jX) to pass to packages submake.
117 config PKG_DEFAULT_PARALLEL
119 prompt "Parallelize the default package build rule (May break build)"
120 depends on PKG_BUILD_PARALLEL
124 Always set the default package build rules to parallel build.
126 WARNING: This may break build or kill your cat, as it builds packages
127 with multiple jobs that are probably not tested in a parallel build
130 Only say Y if you don't mind fixing broken packages. Before reporting
131 build bugs, set this to N and re-run the build.
133 comment "Stripping options"
136 prompt "Binary stripping method"
137 default USE_STRIP if EXTERNAL_TOOLCHAIN
138 default USE_STRIP if USE_GLIBC || USE_MUSL
141 Select the binary stripping method you wish to use.
146 This will install unstripped binaries (useful for native
147 compiling/debugging).
152 This will install binaries stripped using strip from binutils.
158 depends on !USE_GLIBC
160 This will install binaries stripped using sstrip.
165 prompt "Strip arguments"
167 default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
168 default "--strip-all"
170 Specifies arguments passed to the strip command when stripping binaries.
172 config STRIP_KERNEL_EXPORTS
173 bool "Strip unnecessary exports from the kernel image"
175 Reduces kernel size by stripping unused kernel exports from the kernel
176 image. Note that this might make the kernel incompatible with any kernel
177 modules that were not selected at the time the kernel image was created.
180 bool "Strip unnecessary functions from libraries"
182 Reduces libraries to only those functions that are necessary for using all
183 selected packages (including those selected as <M>). Note that this will
184 make the system libraries incompatible with most of the packages that are
185 not selected during the build process.
188 prompt "Preferred standard C++ library"
189 default USE_LIBSTDCXX if USE_GLIBC
192 Select the preferred standard C++ library for all packages that support this.
201 comment "Hardening build options"
203 config PKG_CHECK_FORMAT_SECURITY
205 prompt "Enable gcc format-security"
208 Add -Wformat -Werror=format-security to the CFLAGS. You can disable
209 this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
213 prompt "User space Stack-Smashing Protection"
214 default PKG_CC_STACKPROTECTOR_NONE
216 Enable GCC Stack Smashing Protection (SSP) for userspace applications
217 config PKG_CC_STACKPROTECTOR_NONE
219 config PKG_CC_STACKPROTECTOR_REGULAR
222 depends on KERNEL_CC_STACKPROTECTOR_REGULAR
223 config PKG_CC_STACKPROTECTOR_STRONG
226 depends on GCC_VERSION_4_9_LINARO
227 depends on KERNEL_CC_STACKPROTECTOR_STRONG
231 prompt "Kernel space Stack-Smashing Protection"
232 default KERNEL_CC_STACKPROTECTOR_NONE
234 Enable GCC Stack-Smashing Protection (SSP) for the kernel
235 config KERNEL_CC_STACKPROTECTOR_NONE
237 config KERNEL_CC_STACKPROTECTOR_REGULAR
239 config KERNEL_CC_STACKPROTECTOR_STRONG
240 depends on GCC_VERSION_4_9_LINARO
245 prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
247 Enable the _FORTIFY_SOURCE macro which introduces additional
248 checks to detect buffer-overflows in the following standard library
249 functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
250 strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
251 gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
252 checks that shouldn't change the behavior of conforming programs,
253 while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
254 added, but some conforming programs might fail.
255 config PKG_FORTIFY_SOURCE_NONE
257 config PKG_FORTIFY_SOURCE_1
259 config PKG_FORTIFY_SOURCE_2
264 prompt "Enable RELRO protection"
266 Enable a link-time protection known as RELRO (Relocation Read Only)
267 which helps to protect from certain type of exploitation techniques
268 altering the content of some ELF sections. "Partial" RELRO makes the
269 .dynamic section not writeable after initialization, introducing
270 almost no performance penalty, while "full" RELRO also marks the GOT
271 as read-only at the cost of initializing all of it at startup.
272 config PKG_RELRO_NONE
274 config PKG_RELRO_PARTIAL
276 config PKG_RELRO_FULL