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 comment "Stripping options"
93 prompt "Binary stripping method"
94 default USE_STRIP if EXTERNAL_TOOLCHAIN
95 default USE_STRIP if USE_GLIBC
98 Select the binary stripping method you wish to use.
103 This will install unstripped binaries (useful for native
104 compiling/debugging).
109 This will install binaries stripped using strip from binutils.
114 depends on !USE_GLIBC
116 This will install binaries stripped using sstrip.
121 prompt "Strip arguments"
123 default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
124 default "--strip-all"
126 Specifies arguments passed to the strip command when stripping binaries.
128 config STRIP_KERNEL_EXPORTS
129 bool "Strip unnecessary exports from the kernel image"
131 Reduces kernel size by stripping unused kernel exports from the kernel
132 image. Note that this might make the kernel incompatible with any kernel
133 modules that were not selected at the time the kernel image was created.
136 bool "Strip unnecessary functions from libraries"
138 Reduces libraries to only those functions that are necessary for using all
139 selected packages (including those selected as <M>). Note that this will
140 make the system libraries incompatible with most of the packages that are
141 not selected during the build process.
144 prompt "Preferred standard C++ library"
145 default USE_LIBSTDCXX if USE_GLIBC
148 Select the preferred standard C++ library for all packages that support this.
157 comment "Hardening build options"
159 config PKG_CHECK_FORMAT_SECURITY
161 prompt "Enable gcc format-security"
164 Add -Wformat -Werror=format-security to the CFLAGS. You can disable
165 this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
169 prompt "User space Stack-Smashing Protection"
171 default PKG_CC_STACKPROTECTOR_REGULAR
173 Enable GCC Stack Smashing Protection (SSP) for userspace applications
174 config PKG_CC_STACKPROTECTOR_NONE
176 config PKG_CC_STACKPROTECTOR_REGULAR
178 select SSP_SUPPORT if !USE_MUSL
179 depends on KERNEL_CC_STACKPROTECTOR_REGULAR
180 config PKG_CC_STACKPROTECTOR_STRONG
182 select SSP_SUPPORT if !USE_MUSL
183 depends on !GCC_VERSION_4_8
184 depends on KERNEL_CC_STACKPROTECTOR_STRONG
188 prompt "Kernel space Stack-Smashing Protection"
189 default KERNEL_CC_STACKPROTECTOR_REGULAR
190 depends on USE_MUSL || !(x86_64 || i386)
192 Enable GCC Stack-Smashing Protection (SSP) for the kernel
193 config KERNEL_CC_STACKPROTECTOR_NONE
195 config KERNEL_CC_STACKPROTECTOR_REGULAR
197 config KERNEL_CC_STACKPROTECTOR_STRONG
198 depends on !GCC_VERSION_4_8
203 prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
204 default PKG_FORTIFY_SOURCE_1
206 Enable the _FORTIFY_SOURCE macro which introduces additional
207 checks to detect buffer-overflows in the following standard library
208 functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
209 strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
210 gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
211 checks that shouldn't change the behavior of conforming programs,
212 while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
213 added, but some conforming programs might fail.
214 config PKG_FORTIFY_SOURCE_NONE
216 config PKG_FORTIFY_SOURCE_1
218 config PKG_FORTIFY_SOURCE_2
223 prompt "Enable RELRO protection"
224 default PKG_RELRO_FULL
226 Enable a link-time protection known as RELRO (Relocation Read Only)
227 which helps to protect from certain type of exploitation techniques
228 altering the content of some ELF sections. "Partial" RELRO makes the
229 .dynamic section not writeable after initialization, introducing
230 almost no performance penalty, while "full" RELRO also marks the GOT
231 as read-only at the cost of initializing all of it at startup.
232 config PKG_RELRO_NONE
234 config PKG_RELRO_PARTIAL
236 config PKG_RELRO_FULL