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_EGLIBC || 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
159 depends on !USE_EGLIBC
161 This will install binaries stripped using sstrip.
166 prompt "Strip arguments"
168 default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
169 default "--strip-all"
171 Specifies arguments passed to the strip command when stripping binaries.
173 config STRIP_KERNEL_EXPORTS
174 bool "Strip unnecessary exports from the kernel image"
176 Reduces kernel size by stripping unused kernel exports from the kernel
177 image. Note that this might make the kernel incompatible with any kernel
178 modules that were not selected at the time the kernel image was created.
181 bool "Strip unnecessary functions from libraries"
183 Reduces libraries to only those functions that are necessary for using all
184 selected packages (including those selected as <M>). Note that this will
185 make the system libraries incompatible with most of the packages that are
186 not selected during the build process.
189 prompt "Preferred standard C++ library"
190 default USE_LIBSTDCXX if USE_EGLIBC
193 Select the preferred standard C++ library for all packages that support this.
202 comment "Hardening build options"
204 config PKG_CHECK_FORMAT_SECURITY
206 prompt "Enable gcc format-security"
209 Add -Wformat -Werror=format-security to the CFLAGS. You can disable
210 this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
214 prompt "User space Stack-Smashing Protection"
215 default PKG_CC_STACKPROTECTOR_NONE
217 Enable GCC Stack Smashing Protection (SSP) for userspace applications
218 config PKG_CC_STACKPROTECTOR_NONE
220 config PKG_CC_STACKPROTECTOR_REGULAR
223 depends on KERNEL_CC_STACKPROTECTOR_REGULAR
224 config PKG_CC_STACKPROTECTOR_STRONG
227 depends on GCC_VERSION_4_9_LINARO
228 depends on KERNEL_CC_STACKPROTECTOR_STRONG
232 prompt "Kernel space Stack-Smashing Protection"
233 default KERNEL_CC_STACKPROTECTOR_NONE
235 Enable GCC Stack-Smashing Protection (SSP) for the kernel
236 config KERNEL_CC_STACKPROTECTOR_NONE
238 config KERNEL_CC_STACKPROTECTOR_REGULAR
240 config KERNEL_CC_STACKPROTECTOR_STRONG
241 depends on GCC_VERSION_4_9_LINARO
246 prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
248 Enable the _FORTIFY_SOURCE macro which introduces additional
249 checks to detect buffer-overflows in the following standard library
250 functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
251 strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
252 gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
253 checks that shouldn't change the behavior of conforming programs,
254 while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
255 added, but some conforming programs might fail.
256 config PKG_FORTIFY_SOURCE_NONE
258 config PKG_FORTIFY_SOURCE_1
260 config PKG_FORTIFY_SOURCE_2
265 prompt "Enable RELRO protection"
267 Enable a link-time protection known as RELRO (Relocation Read Only)
268 which helps to protect from certain type of exploitation techniques
269 altering the content of some ELF sections. "Partial" RELRO makes the
270 .dynamic section not writeable after initialization, introducing
271 almost no performance penalty, while "full" RELRO also marks the GOT
272 as read-only at the cost of initializing all of it at startup.
273 config PKG_RELRO_NONE
275 config PKG_RELRO_PARTIAL
277 config PKG_RELRO_FULL