1 # Copyright (C) 2006-2013 OpenWrt.org
2 # Copyright (C) 2016 LEDE Project
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 menu "Global build settings"
11 bool "Select all target specific packages by default"
15 bool "Select all kernel module packages by default"
19 bool "Select all userspace packages by default"
22 config SIGNED_PACKAGES
23 bool "Cryptographically signed package lists"
26 comment "General build options"
28 config DISPLAY_SUPPORT
29 bool "Show packages that require graphics support (local or remote)"
34 bool "Compile with support for patented functionality"
36 When this option is disabled, software which provides patented functionality
37 will not be built. In case software provides optional support for patented
38 functionality, this optional support will get disabled for this package.
42 bool "Compile with full language support"
44 When this option is enabled, packages are built with the full versions of
45 iconv and GNU gettext instead of the default OpenWrt stubs. If uClibc is
46 used, it is also built with locale support.
48 config SHADOW_PASSWORDS
54 prompt "Remove ipkg/opkg status data files in final images"
57 This removes all ipkg/opkg status data files from the target directory
58 before building the root filesystem.
60 config COLLECT_KERNEL_DEBUG
62 prompt "Collect kernel debug information"
63 select KERNEL_DEBUG_INFO
66 This collects debugging symbols from the kernel and all compiled modules.
67 Useful for release builds, so that kernel issues can be debugged offline
70 comment "Kernel build options"
72 source "config/Config-kernel.in"
74 comment "Package build options"
78 prompt "Compile packages with debugging info"
81 Adds -g3 to the CFLAGS.
85 prompt "Enable IPv6 support in packages"
88 Enables IPv6 support in kernel (builtin) and packages.
90 config PKG_BUILD_PARALLEL
92 prompt "Compile certain packages parallelized"
95 This adds a -jX option to certain packages that are known to behave well
96 for parallel build. By default, the package make processes use the main
97 jobserver, in which case this option only takes effect when you add -jX
100 If you are unsure, select N.
102 config PKG_BUILD_USE_JOBSERVER
104 prompt "Use top-level make jobserver for packages"
105 depends on PKG_BUILD_PARALLEL
108 This passes the main make process jobserver fds to package builds,
109 enabling full parallelization across different packages.
111 Note that disabling this may overcommit CPU resources depending on the
112 -j level of the main make process, the number of package submake jobs
113 selected below and the number of actual CPUs present.
114 Example: If the main make is passed a -j4 and the submake -j
115 is also set to 4, we may end up with 16 parallel make processes
118 config PKG_BUILD_JOBS
120 prompt "Number of package submake jobs (2-512)"
123 depends on PKG_BUILD_PARALLEL && !PKG_BUILD_USE_JOBSERVER
125 The number of jobs (-jX) to pass to packages submake.
127 config PKG_DEFAULT_PARALLEL
129 prompt "Parallelize the default package build rule (May break build)"
130 depends on PKG_BUILD_PARALLEL
134 Always set the default package build rules to parallel build.
136 WARNING: This may break build or kill your cat, as it builds packages
137 with multiple jobs that are probably not tested in a parallel build
140 Only say Y if you don't mind fixing broken packages. Before reporting
141 build bugs, set this to N and re-run the build.
143 comment "Stripping options"
146 prompt "Binary stripping method"
147 default USE_STRIP if EXTERNAL_TOOLCHAIN
148 default USE_STRIP if USE_GLIBC
151 Select the binary stripping method you wish to use.
156 This will install unstripped binaries (useful for native
157 compiling/debugging).
162 This will install binaries stripped using strip from binutils.
167 depends on !USE_GLIBC
169 This will install binaries stripped using sstrip.
174 prompt "Strip arguments"
176 default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
177 default "--strip-all"
179 Specifies arguments passed to the strip command when stripping binaries.
181 config STRIP_KERNEL_EXPORTS
182 bool "Strip unnecessary exports from the kernel image"
184 Reduces kernel size by stripping unused kernel exports from the kernel
185 image. Note that this might make the kernel incompatible with any kernel
186 modules that were not selected at the time the kernel image was created.
189 bool "Strip unnecessary functions from libraries"
191 Reduces libraries to only those functions that are necessary for using all
192 selected packages (including those selected as <M>). Note that this will
193 make the system libraries incompatible with most of the packages that are
194 not selected during the build process.
197 prompt "Preferred standard C++ library"
198 default USE_LIBSTDCXX if USE_GLIBC
201 Select the preferred standard C++ library for all packages that support this.
210 comment "Hardening build options"
212 config PKG_CHECK_FORMAT_SECURITY
214 prompt "Enable gcc format-security"
217 Add -Wformat -Werror=format-security to the CFLAGS. You can disable
218 this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
222 prompt "User space Stack-Smashing Protection"
224 default PKG_CC_STACKPROTECTOR_REGULAR
226 Enable GCC Stack Smashing Protection (SSP) for userspace applications
227 config PKG_CC_STACKPROTECTOR_NONE
229 config PKG_CC_STACKPROTECTOR_REGULAR
231 select SSP_SUPPORT if !USE_MUSL
232 depends on KERNEL_CC_STACKPROTECTOR_REGULAR
233 config PKG_CC_STACKPROTECTOR_STRONG
235 select SSP_SUPPORT if !USE_MUSL
236 depends on !GCC_VERSION_4_8
237 depends on KERNEL_CC_STACKPROTECTOR_STRONG
241 prompt "Kernel space Stack-Smashing Protection"
242 default KERNEL_CC_STACKPROTECTOR_REGULAR
243 depends on USE_MUSL || !(x86_64 || i386)
245 Enable GCC Stack-Smashing Protection (SSP) for the kernel
246 config KERNEL_CC_STACKPROTECTOR_NONE
248 config KERNEL_CC_STACKPROTECTOR_REGULAR
250 config KERNEL_CC_STACKPROTECTOR_STRONG
251 depends on !GCC_VERSION_4_8
256 prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
257 default PKG_FORTIFY_SOURCE_1
259 Enable the _FORTIFY_SOURCE macro which introduces additional
260 checks to detect buffer-overflows in the following standard library
261 functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
262 strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
263 gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
264 checks that shouldn't change the behavior of conforming programs,
265 while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
266 added, but some conforming programs might fail.
267 config PKG_FORTIFY_SOURCE_NONE
269 config PKG_FORTIFY_SOURCE_1
271 config PKG_FORTIFY_SOURCE_2
276 prompt "Enable RELRO protection"
277 default PKG_RELRO_FULL
279 Enable a link-time protection known as RELRO (Relocation Read Only)
280 which helps to protect from certain type of exploitation techniques
281 altering the content of some ELF sections. "Partial" RELRO makes the
282 .dynamic section not writeable after initialization, introducing
283 almost no performance penalty, while "full" RELRO also marks the GOT
284 as read-only at the cost of initializing all of it at startup.
285 config PKG_RELRO_NONE
287 config PKG_RELRO_PARTIAL
289 config PKG_RELRO_FULL