toolchain: The glorious return of glibc, ver 2.21
[openwrt.git] / config / Config-build.in
1 # Copyright (C) 2006-2013 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6
7 menu "Global build settings"
8
9         config ALL
10                 bool "Select all packages by default"
11                 default n
12
13         comment "General build options"
14
15         config DISPLAY_SUPPORT
16                 bool "Show packages that require graphics support (local or remote)"
17                 default n
18
19         config BUILD_PATENTED
20                 default y
21                 bool "Compile with support for patented functionality"
22                 help
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.
26
27         config BUILD_NLS
28                 default n
29                 bool "Compile with full language support"
30                 help
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.
34
35         config SHADOW_PASSWORDS
36                 bool
37                 prompt "Enable shadow password support"
38                 default y
39                 help
40                   Enable shadow password support.
41
42         config CLEAN_IPKG
43                 bool
44                 prompt "Remove ipkg/opkg status data files in final images"
45                 default n
46                 help
47                   This removes all ipkg/opkg status data files from the target directory
48                   before building the root filesystem.
49
50         config COLLECT_KERNEL_DEBUG
51                 bool
52                 prompt "Collect kernel debug information"
53                 select KERNEL_DEBUG_INFO
54                 default n
55                 help
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
58                   later.
59
60         comment "Kernel build options"
61
62         source "config/Config-kernel.in"
63
64         comment "Package build options"
65
66         config DEBUG
67                 bool
68                 prompt "Compile packages with debugging info"
69                 default n
70                 help
71                   Adds -g3 to the CFLAGS.
72
73         config IPV6
74                 bool
75                 prompt "Enable IPv6 support in packages"
76                 default y
77                 help
78                   Enable IPv6 support in packages (passes --enable-ipv6 to configure scripts).
79
80         config PKG_BUILD_PARALLEL
81                 bool
82                 prompt "Compile certain packages parallelized"
83                 default y
84                 help
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
88                   to the make command.
89
90                   If you are unsure, select N.
91
92         config PKG_BUILD_USE_JOBSERVER
93                 bool
94                 prompt "Use top-level make jobserver for packages"
95                 depends on PKG_BUILD_PARALLEL
96                 default y
97                 help
98                   This passes the main make process jobserver fds to package builds,
99                   enabling full parallelization across different packages.
100
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
106                   in the worst case.
107
108         config PKG_BUILD_JOBS
109                 int
110                 prompt "Number of package submake jobs (2-512)"
111                 range 2 512
112                 default 2
113                 depends on PKG_BUILD_PARALLEL && !PKG_BUILD_USE_JOBSERVER
114                 help
115                   The number of jobs (-jX) to pass to packages submake.
116
117         config PKG_DEFAULT_PARALLEL
118                 bool
119                 prompt "Parallelize the default package build rule (May break build)"
120                 depends on PKG_BUILD_PARALLEL
121                 depends on BROKEN
122                 default n
123                 help
124                   Always set the default package build rules to parallel build.
125
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
128                   environment.
129
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.
132
133         comment "Stripping options"
134
135         choice
136                 prompt "Binary stripping method"
137                 default USE_STRIP   if EXTERNAL_TOOLCHAIN
138                 default USE_STRIP   if USE_GLIBC || USE_MUSL
139                 default USE_SSTRIP
140                 help
141                   Select the binary stripping method you wish to use.
142
143                 config NO_STRIP
144                         bool "none"
145                         help
146                           This will install unstripped binaries (useful for native
147                           compiling/debugging).
148
149                 config USE_STRIP
150                         bool "strip"
151                         help
152                           This will install binaries stripped using strip from binutils.
153
154
155                 config USE_SSTRIP
156                         bool "sstrip"
157                         depends on !DEBUG
158                         depends on !USE_GLIBC
159                         help
160                           This will install binaries stripped using sstrip.
161         endchoice
162
163         config STRIP_ARGS
164                 string
165                 prompt "Strip arguments"
166                 depends on USE_STRIP
167                 default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
168                 default "--strip-all"
169                 help
170                   Specifies arguments passed to the strip command when stripping binaries.
171
172         config STRIP_KERNEL_EXPORTS
173                 bool "Strip unnecessary exports from the kernel image"
174                 help
175                   Reduces kernel size by stripping unused kernel exports from the kernel
176                   image.  Note that this might make the kernel incompatible with any kernel
177                   modules that were not selected at the time the kernel image was created.
178
179         config USE_MKLIBS
180                 bool "Strip unnecessary functions from libraries"
181                 help
182                   Reduces libraries to only those functions that are necessary for using all
183                   selected packages (including those selected as <M>).  Note that this will
184                   make the system libraries incompatible with most of the packages that are
185                   not selected during the build process.
186
187         choice
188                 prompt "Preferred standard C++ library"
189                 default USE_LIBSTDCXX if USE_GLIBC
190                 default USE_UCLIBCXX
191                 help
192                   Select the preferred standard C++ library for all packages that support this.
193
194                 config USE_UCLIBCXX
195                         bool "uClibc++"
196
197                 config USE_LIBSTDCXX
198                         bool "libstdc++"
199         endchoice
200
201         comment "Hardening build options"
202
203         config PKG_CHECK_FORMAT_SECURITY
204                 bool
205                 prompt "Enable gcc format-security"
206                 default n
207                 help
208                   Add -Wformat -Werror=format-security to the CFLAGS.  You can disable
209                   this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
210                   Makefile.
211
212         choice
213                 prompt "User space Stack-Smashing Protection"
214                 default PKG_CC_STACKPROTECTOR_NONE
215                 help
216                   Enable GCC Stack Smashing Protection (SSP) for userspace applications
217                 config PKG_CC_STACKPROTECTOR_NONE
218                         bool "None"
219                 config PKG_CC_STACKPROTECTOR_REGULAR
220                         bool "Regular"
221                         select SSP_SUPPORT
222                         depends on KERNEL_CC_STACKPROTECTOR_REGULAR
223                 config PKG_CC_STACKPROTECTOR_STRONG
224                         bool "Strong"
225                         select SSP_SUPPORT
226                         depends on GCC_VERSION_4_9_LINARO
227                         depends on KERNEL_CC_STACKPROTECTOR_STRONG
228         endchoice
229
230         choice
231                 prompt "Kernel space Stack-Smashing Protection"
232                 default KERNEL_CC_STACKPROTECTOR_NONE
233                 help
234                   Enable GCC Stack-Smashing Protection (SSP) for the kernel
235                 config KERNEL_CC_STACKPROTECTOR_NONE
236                         bool "None"
237                 config KERNEL_CC_STACKPROTECTOR_REGULAR
238                         bool "Regular"
239                 config KERNEL_CC_STACKPROTECTOR_STRONG
240                         depends on GCC_VERSION_4_9_LINARO
241                         bool "Strong"
242         endchoice
243
244         choice
245                 prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
246                 help
247                   Enable the _FORTIFY_SOURCE macro which introduces additional
248                   checks to detect buffer-overflows in the following standard library
249                   functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
250                   strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
251                   gets.  "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
252                   checks that shouldn't change the behavior of conforming programs,
253                   while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
254                   added, but some conforming programs might fail.
255                 config PKG_FORTIFY_SOURCE_NONE
256                         bool "None"
257                 config PKG_FORTIFY_SOURCE_1
258                         bool "Conservative"
259                 config PKG_FORTIFY_SOURCE_2
260                         bool "Aggressive"
261         endchoice
262
263         choice
264                 prompt "Enable RELRO protection"
265                 help
266                   Enable a link-time protection known as RELRO (Relocation Read Only)
267                   which helps to protect from certain type of exploitation techniques
268                   altering the content of some ELF sections. "Partial" RELRO makes the
269                   .dynamic section not writeable after initialization, introducing
270                   almost no performance penalty, while "full" RELRO also marks the GOT
271                   as read-only at the cost of initializing all of it at startup.
272                 config PKG_RELRO_NONE
273                         bool "None"
274                 config PKG_RELRO_PARTIAL
275                         bool "Partial"
276                 config PKG_RELRO_FULL
277                         bool "Full"
278         endchoice
279
280 endmenu