hostapd: backport extra changes related to KRACK
[librecmc/librecmc.git] / config / Config-build.in
1 # Copyright (C) 2006-2013 OpenWrt.org
2 # Copyright (C) 2016 LEDE Project
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 menu "Global build settings"
9
10         config ALL_NONSHARED
11                 bool "Select all target specific packages by default"
12                 default ALL || BUILDBOT
13
14         config ALL_KMODS
15                 bool "Select all kernel module packages by default"
16                 default ALL
17
18         config ALL
19                 bool "Select all userspace packages by default"
20                 default n
21
22         config BUILDBOT
23                 bool "Set build defaults for automatic builds (e.g. via buildbot)"
24                 default n
25                 help
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
30                   ...
31
32         config SIGNED_PACKAGES
33                 bool "Cryptographically signed package lists"
34                 default y
35
36         comment "General build options"
37
38         config DISPLAY_SUPPORT
39                 bool "Show packages that require graphics support (local or remote)"
40                 default n
41
42         config BUILD_PATENTED
43                 default y
44                 bool "Compile with support for patented functionality"
45                 help
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.
49
50         config BUILD_NLS
51                 default n
52                 bool "Compile with full language support"
53                 help
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.
57
58         config SHADOW_PASSWORDS
59                 bool
60                 default y
61
62         config CLEAN_IPKG
63                 bool
64                 prompt "Remove ipkg/opkg status data files in final images"
65                 default n
66                 help
67                   This removes all ipkg/opkg status data files from the target directory
68                   before building the root filesystem.
69
70         config COLLECT_KERNEL_DEBUG
71                 bool
72                 prompt "Collect kernel debug information"
73                 select KERNEL_DEBUG_INFO
74                 default BUILDBOT
75                 help
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
78                   later.
79
80         comment "Kernel build options"
81
82         source "config/Config-kernel.in"
83
84         comment "Package build options"
85
86         config DEBUG
87                 bool
88                 prompt "Compile packages with debugging info"
89                 default n
90                 help
91                   Adds -g3 to the CFLAGS.
92
93         config IPV6
94                 bool
95                 prompt "Enable IPv6 support in packages"
96                 default y
97                 help
98                   Enables IPv6 support in kernel (builtin) and packages.
99
100         comment "Stripping options"
101
102         choice
103                 prompt "Binary stripping method"
104                 default USE_STRIP   if EXTERNAL_TOOLCHAIN
105                 default USE_STRIP   if USE_GLIBC
106                 default USE_SSTRIP
107                 help
108                   Select the binary stripping method you wish to use.
109
110                 config NO_STRIP
111                         bool "none"
112                         help
113                           This will install unstripped binaries (useful for native
114                           compiling/debugging).
115
116                 config USE_STRIP
117                         bool "strip"
118                         help
119                           This will install binaries stripped using strip from binutils.
120
121
122                 config USE_SSTRIP
123                         bool "sstrip"
124                         depends on !USE_GLIBC
125                         help
126                           This will install binaries stripped using sstrip.
127         endchoice
128
129         config STRIP_ARGS
130                 string
131                 prompt "Strip arguments"
132                 depends on USE_STRIP
133                 default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
134                 default "--strip-all"
135                 help
136                   Specifies arguments passed to the strip command when stripping binaries.
137
138         config STRIP_KERNEL_EXPORTS
139                 bool "Strip unnecessary exports from the kernel image"
140                 help
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.
144
145         config USE_MKLIBS
146                 bool "Strip unnecessary functions from libraries"
147                 help
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.
152
153         choice
154                 prompt "Preferred standard C++ library"
155                 default USE_LIBSTDCXX if USE_GLIBC
156                 default USE_UCLIBCXX
157                 help
158                   Select the preferred standard C++ library for all packages that support this.
159
160                 config USE_UCLIBCXX
161                         bool "uClibc++"
162
163                 config USE_LIBSTDCXX
164                         bool "libstdc++"
165         endchoice
166
167         comment "Hardening build options"
168
169         config PKG_CHECK_FORMAT_SECURITY
170                 bool
171                 prompt "Enable gcc format-security"
172                 default y
173                 help
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
176                   Makefile.
177
178         choice
179                 prompt "User space Stack-Smashing Protection"
180                 depends on USE_MUSL
181                 default PKG_CC_STACKPROTECTOR_REGULAR
182                 help
183                   Enable GCC Stack Smashing Protection (SSP) for userspace applications
184                 config PKG_CC_STACKPROTECTOR_NONE
185                         bool "None"
186                 config PKG_CC_STACKPROTECTOR_REGULAR
187                         bool "Regular"
188                         select SSP_SUPPORT if !USE_MUSL
189                         depends on KERNEL_CC_STACKPROTECTOR_REGULAR
190                 config PKG_CC_STACKPROTECTOR_STRONG
191                         bool "Strong"
192                         select SSP_SUPPORT if !USE_MUSL
193                         depends on !GCC_VERSION_4_8
194                         depends on KERNEL_CC_STACKPROTECTOR_STRONG
195         endchoice
196
197         choice
198                 prompt "Kernel space Stack-Smashing Protection"
199                 default KERNEL_CC_STACKPROTECTOR_REGULAR
200                 depends on USE_MUSL || !(x86_64 || i386)
201                 help
202                   Enable GCC Stack-Smashing Protection (SSP) for the kernel
203                 config KERNEL_CC_STACKPROTECTOR_NONE
204                         bool "None"
205                 config KERNEL_CC_STACKPROTECTOR_REGULAR
206                         bool "Regular"
207                 config KERNEL_CC_STACKPROTECTOR_STRONG
208                         depends on !GCC_VERSION_4_8
209                         bool "Strong"
210         endchoice
211
212         choice
213                 prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
214                 default PKG_FORTIFY_SOURCE_1
215                 help
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
225                         bool "None"
226                 config PKG_FORTIFY_SOURCE_1
227                         bool "Conservative"
228                 config PKG_FORTIFY_SOURCE_2
229                         bool "Aggressive"
230         endchoice
231
232         choice
233                 prompt "Enable RELRO protection"
234                 default PKG_RELRO_FULL
235                 help
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
243                         bool "None"
244                 config PKG_RELRO_PARTIAL
245                         bool "Partial"
246                 config PKG_RELRO_FULL
247                         bool "Full"
248         endchoice
249
250 endmenu