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"
12 default ALL || BUILDBOT
15 bool "Select all kernel module packages by default"
19 bool "Select all userspace packages by default"
23 bool "Set build defaults for automatic builds (e.g. via buildbot)"
26 This option changes several defaults to be more suitable for
27 automatic builds. This includes the following changes:
28 - Deleting build directories after compiling (to save space)
29 - Enabling per-device rootfs support
32 config SIGNED_PACKAGES
33 bool "Cryptographically signed package lists"
36 comment "General build options"
38 config DISPLAY_SUPPORT
39 bool "Show packages that require graphics support (local or remote)"
44 bool "Compile with support for patented functionality"
46 When this option is disabled, software which provides patented functionality
47 will not be built. In case software provides optional support for patented
48 functionality, this optional support will get disabled for this package.
52 bool "Compile with full language support"
54 When this option is enabled, packages are built with the full versions of
55 iconv and GNU gettext instead of the default OpenWrt stubs. If uClibc is
56 used, it is also built with locale support.
58 config SHADOW_PASSWORDS
64 prompt "Remove ipkg/opkg status data files in final images"
67 This removes all ipkg/opkg status data files from the target directory
68 before building the root filesystem.
70 config COLLECT_KERNEL_DEBUG
72 prompt "Collect kernel debug information"
73 select KERNEL_DEBUG_INFO
76 This collects debugging symbols from the kernel and all compiled modules.
77 Useful for release builds, so that kernel issues can be debugged offline
80 comment "Kernel build options"
82 source "config/Config-kernel.in"
84 comment "Package build options"
88 prompt "Compile packages with debugging info"
91 Adds -g3 to the CFLAGS.
95 prompt "Enable IPv6 support in packages"
98 Enables IPv6 support in kernel (builtin) and packages.
100 comment "Stripping options"
103 prompt "Binary stripping method"
104 default USE_STRIP if EXTERNAL_TOOLCHAIN
105 default USE_STRIP if USE_GLIBC
108 Select the binary stripping method you wish to use.
113 This will install unstripped binaries (useful for native
114 compiling/debugging).
119 This will install binaries stripped using strip from binutils.
124 depends on !USE_GLIBC
126 This will install binaries stripped using sstrip.
131 prompt "Strip arguments"
133 default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
134 default "--strip-all"
136 Specifies arguments passed to the strip command when stripping binaries.
138 config STRIP_KERNEL_EXPORTS
139 bool "Strip unnecessary exports from the kernel image"
141 Reduces kernel size by stripping unused kernel exports from the kernel
142 image. Note that this might make the kernel incompatible with any kernel
143 modules that were not selected at the time the kernel image was created.
146 bool "Strip unnecessary functions from libraries"
148 Reduces libraries to only those functions that are necessary for using all
149 selected packages (including those selected as <M>). Note that this will
150 make the system libraries incompatible with most of the packages that are
151 not selected during the build process.
154 prompt "Preferred standard C++ library"
155 default USE_LIBSTDCXX if USE_GLIBC
158 Select the preferred standard C++ library for all packages that support this.
167 comment "Hardening build options"
169 config PKG_CHECK_FORMAT_SECURITY
171 prompt "Enable gcc format-security"
174 Add -Wformat -Werror=format-security to the CFLAGS. You can disable
175 this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
179 prompt "User space Stack-Smashing Protection"
181 default PKG_CC_STACKPROTECTOR_REGULAR
183 Enable GCC Stack Smashing Protection (SSP) for userspace applications
184 config PKG_CC_STACKPROTECTOR_NONE
186 config PKG_CC_STACKPROTECTOR_REGULAR
188 select SSP_SUPPORT if !USE_MUSL
189 depends on KERNEL_CC_STACKPROTECTOR_REGULAR
190 config PKG_CC_STACKPROTECTOR_STRONG
192 select SSP_SUPPORT if !USE_MUSL
193 depends on !GCC_VERSION_4_8
194 depends on KERNEL_CC_STACKPROTECTOR_STRONG
198 prompt "Kernel space Stack-Smashing Protection"
199 default KERNEL_CC_STACKPROTECTOR_REGULAR
200 depends on USE_MUSL || !(x86_64 || i386)
202 Enable GCC Stack-Smashing Protection (SSP) for the kernel
203 config KERNEL_CC_STACKPROTECTOR_NONE
205 config KERNEL_CC_STACKPROTECTOR_REGULAR
207 config KERNEL_CC_STACKPROTECTOR_STRONG
208 depends on !GCC_VERSION_4_8
213 prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
214 default PKG_FORTIFY_SOURCE_1
216 Enable the _FORTIFY_SOURCE macro which introduces additional
217 checks to detect buffer-overflows in the following standard library
218 functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
219 strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
220 gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
221 checks that shouldn't change the behavior of conforming programs,
222 while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
223 added, but some conforming programs might fail.
224 config PKG_FORTIFY_SOURCE_NONE
226 config PKG_FORTIFY_SOURCE_1
228 config PKG_FORTIFY_SOURCE_2
233 prompt "Enable RELRO protection"
234 default PKG_RELRO_FULL
236 Enable a link-time protection known as RELRO (Relocation Read Only)
237 which helps to protect from certain type of exploitation techniques
238 altering the content of some ELF sections. "Partial" RELRO makes the
239 .dynamic section not writeable after initialization, introducing
240 almost no performance penalty, while "full" RELRO also marks the GOT
241 as read-only at the cost of initializing all of it at startup.
242 config PKG_RELRO_NONE
244 config PKG_RELRO_PARTIAL
246 config PKG_RELRO_FULL