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 config SIGNED_PACKAGES
18 bool "Cryptographically signed package lists"
21 comment "General build options"
23 config DISPLAY_SUPPORT
24 bool "Show packages that require graphics support (local or remote)"
29 bool "Compile with support for patented functionality"
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.
37 bool "Compile with full language support"
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.
43 config SHADOW_PASSWORDS
45 prompt "Enable shadow password support"
48 Enable shadow password support.
52 prompt "Remove ipkg/opkg status data files in final images"
55 This removes all ipkg/opkg status data files from the target directory
56 before building the root filesystem.
58 config COLLECT_KERNEL_DEBUG
60 prompt "Collect kernel debug information"
61 select KERNEL_DEBUG_INFO
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
68 comment "Kernel build options"
70 source "config/Config-kernel.in"
72 comment "Package build options"
76 prompt "Compile packages with debugging info"
79 Adds -g3 to the CFLAGS.
83 prompt "Enable IPv6 support in packages"
86 Enables IPv6 support in kernel (builtin) and packages.
88 config PKG_BUILD_PARALLEL
90 prompt "Compile certain packages parallelized"
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
98 If you are unsure, select N.
100 config PKG_BUILD_USE_JOBSERVER
102 prompt "Use top-level make jobserver for packages"
103 depends on PKG_BUILD_PARALLEL
106 This passes the main make process jobserver fds to package builds,
107 enabling full parallelization across different packages.
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
116 config PKG_BUILD_JOBS
118 prompt "Number of package submake jobs (2-512)"
121 depends on PKG_BUILD_PARALLEL && !PKG_BUILD_USE_JOBSERVER
123 The number of jobs (-jX) to pass to packages submake.
125 config PKG_DEFAULT_PARALLEL
127 prompt "Parallelize the default package build rule (May break build)"
128 depends on PKG_BUILD_PARALLEL
132 Always set the default package build rules to parallel build.
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
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.
141 comment "Stripping options"
144 prompt "Binary stripping method"
145 default USE_STRIP if EXTERNAL_TOOLCHAIN
146 default USE_STRIP if USE_GLIBC || USE_MUSL
149 Select the binary stripping method you wish to use.
154 This will install unstripped binaries (useful for native
155 compiling/debugging).
160 This will install binaries stripped using strip from binutils.
166 depends on !USE_GLIBC
168 This will install binaries stripped using sstrip.
173 prompt "Strip arguments"
175 default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
176 default "--strip-all"
178 Specifies arguments passed to the strip command when stripping binaries.
180 config STRIP_KERNEL_EXPORTS
181 bool "Strip unnecessary exports from the kernel image"
183 Reduces kernel size by stripping unused kernel exports from the kernel
184 image. Note that this might make the kernel incompatible with any kernel
185 modules that were not selected at the time the kernel image was created.
188 bool "Strip unnecessary functions from libraries"
190 Reduces libraries to only those functions that are necessary for using all
191 selected packages (including those selected as <M>). Note that this will
192 make the system libraries incompatible with most of the packages that are
193 not selected during the build process.
196 prompt "Preferred standard C++ library"
197 default USE_LIBSTDCXX if USE_GLIBC
200 Select the preferred standard C++ library for all packages that support this.
209 comment "Hardening build options"
211 config PKG_CHECK_FORMAT_SECURITY
213 prompt "Enable gcc format-security"
216 Add -Wformat -Werror=format-security to the CFLAGS. You can disable
217 this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
221 prompt "User space Stack-Smashing Protection"
223 default PKG_CC_STACKPROTECTOR_REGULAR
225 Enable GCC Stack Smashing Protection (SSP) for userspace applications
226 config PKG_CC_STACKPROTECTOR_NONE
228 config PKG_CC_STACKPROTECTOR_REGULAR
230 select SSP_SUPPORT if !USE_MUSL
231 depends on KERNEL_CC_STACKPROTECTOR_REGULAR
232 config PKG_CC_STACKPROTECTOR_STRONG
234 select SSP_SUPPORT if !USE_MUSL
235 depends on GCC_VERSION_5
236 depends on KERNEL_CC_STACKPROTECTOR_STRONG
240 prompt "Kernel space Stack-Smashing Protection"
241 default KERNEL_CC_STACKPROTECTOR_REGULAR
242 depends on USE_MUSL || !(x86_64 || i386)
244 Enable GCC Stack-Smashing Protection (SSP) for the kernel
245 config KERNEL_CC_STACKPROTECTOR_NONE
247 config KERNEL_CC_STACKPROTECTOR_REGULAR
249 config KERNEL_CC_STACKPROTECTOR_STRONG
250 depends on GCC_VERSION_5
255 prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
256 default PKG_FORTIFY_SOURCE_1
258 Enable the _FORTIFY_SOURCE macro which introduces additional
259 checks to detect buffer-overflows in the following standard library
260 functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
261 strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
262 gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
263 checks that shouldn't change the behavior of conforming programs,
264 while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
265 added, but some conforming programs might fail.
266 config PKG_FORTIFY_SOURCE_NONE
268 config PKG_FORTIFY_SOURCE_1
270 config PKG_FORTIFY_SOURCE_2
275 prompt "Enable RELRO protection"
276 default PKG_RELRO_FULL
278 Enable a link-time protection known as RELRO (Relocation Read Only)
279 which helps to protect from certain type of exploitation techniques
280 altering the content of some ELF sections. "Partial" RELRO makes the
281 .dynamic section not writeable after initialization, introducing
282 almost no performance penalty, while "full" RELRO also marks the GOT
283 as read-only at the cost of initializing all of it at startup.
284 config PKG_RELRO_NONE
286 config PKG_RELRO_PARTIAL
288 config PKG_RELRO_FULL