]>
Commit | Line | Data |
---|---|---|
2d523c23 EA |
1 | # |
2 | ||
6a53b729 | 3 | mainmenu "Buildroot $BR2_VERSION Configuration" |
2d523c23 EA |
4 | |
5 | config BR2_HAVE_DOT_CONFIG | |
6 | bool | |
7 | default y | |
8 | ||
f5b8cd4a BRF |
9 | config BR2_VERSION |
10 | string | |
56c68bcd | 11 | option env="BR2_VERSION_FULL" |
f5b8cd4a | 12 | |
1d4104f0 FP |
13 | config BR2_HOSTARCH |
14 | string | |
15 | option env="HOSTARCH" | |
16 | ||
4802db3d YM |
17 | config BR2_BUILD_DIR |
18 | string | |
19 | option env="BUILD_DIR" | |
20 | ||
12825f7a AV |
21 | # Hidden config symbols for packages to check system gcc version |
22 | config BR2_HOST_GCC_VERSION | |
23 | string | |
24 | option env="HOST_GCC_VERSION" | |
25 | ||
e488b56c TP |
26 | config BR2_HOST_GCC_AT_LEAST_4_5 |
27 | bool | |
28 | default y if BR2_HOST_GCC_VERSION = "4 5" | |
29 | ||
8fce6d7c BK |
30 | config BR2_HOST_GCC_AT_LEAST_4_6 |
31 | bool | |
32 | default y if BR2_HOST_GCC_VERSION = "4 6" | |
e488b56c | 33 | select BR2_HOST_GCC_AT_LEAST_4_5 |
8fce6d7c | 34 | |
12825f7a AV |
35 | config BR2_HOST_GCC_AT_LEAST_4_7 |
36 | bool | |
37 | default y if BR2_HOST_GCC_VERSION = "4 7" | |
8fce6d7c | 38 | select BR2_HOST_GCC_AT_LEAST_4_6 |
12825f7a AV |
39 | |
40 | config BR2_HOST_GCC_AT_LEAST_4_8 | |
41 | bool | |
42 | default y if BR2_HOST_GCC_VERSION = "4 8" | |
43 | select BR2_HOST_GCC_AT_LEAST_4_7 | |
44 | ||
45 | config BR2_HOST_GCC_AT_LEAST_4_9 | |
46 | bool | |
47 | default y if BR2_HOST_GCC_VERSION = "4 9" | |
48 | select BR2_HOST_GCC_AT_LEAST_4_8 | |
49 | ||
50 | config BR2_HOST_GCC_AT_LEAST_5 | |
51 | bool | |
52 | default y if BR2_HOST_GCC_VERSION = "5" | |
53 | select BR2_HOST_GCC_AT_LEAST_4_9 | |
54 | ||
3d217578 MB |
55 | config BR2_HOST_GCC_AT_LEAST_6 |
56 | bool | |
57 | default y if BR2_HOST_GCC_VERSION = "6" | |
58 | select BR2_HOST_GCC_AT_LEAST_5 | |
59 | ||
435b4cce APC |
60 | config BR2_HOST_GCC_AT_LEAST_7 |
61 | bool | |
62 | default y if BR2_HOST_GCC_VERSION = "7" | |
63 | select BR2_HOST_GCC_AT_LEAST_6 | |
64 | ||
aac3d2b4 | 65 | # Hidden boolean selected by packages in need of Java in order to build |
4f3fdf15 | 66 | # (example: kodi) |
0721c713 | 67 | config BR2_NEEDS_HOST_JAVA |
aac3d2b4 MH |
68 | bool |
69 | ||
8f9da282 MH |
70 | # Hidden boolean selected by packages in need of javac in order to build |
71 | # (example: classpath) | |
72 | config BR2_NEEDS_HOST_JAVAC | |
73 | bool | |
74 | ||
75 | # Hidden boolean selected by packages in need of jar in order to build | |
76 | # (example: classpath) | |
77 | config BR2_NEEDS_HOST_JAR | |
78 | bool | |
79 | ||
70d6037e TP |
80 | # Hidden boolean selected by pre-built packages for x86, when they |
81 | # need to run on x86-64 machines (example: pre-built external | |
82 | # toolchains, binary tools like SAM-BA, etc.). | |
83 | config BR2_HOSTARCH_NEEDS_IA32_LIBS | |
84 | bool | |
85 | ||
0e4bc502 TP |
86 | # Hidden boolean selected by packages that need to build 32 bits |
87 | # binaries with the host compiler, even on 64 bits build machines (e.g | |
88 | # bootloaders). | |
89 | config BR2_HOSTARCH_NEEDS_IA32_COMPILER | |
90 | bool | |
91 | ||
de0df997 YM |
92 | # Hidden boolean selected by packages that need the host to have an |
93 | # UTF8 locale. | |
94 | config BR2_NEEDS_HOST_UTF8_LOCALE | |
95 | bool | |
96 | ||
79ee3c1f | 97 | source "arch/Config.in" |
7d8a59b4 | 98 | |
8e5fb3fb EA |
99 | menu "Build options" |
100 | ||
15929265 TP |
101 | menu "Commands" |
102 | ||
2d523c23 | 103 | config BR2_WGET |
8e5fb3fb | 104 | string "Wget command" |
6871b165 | 105 | default "wget --passive-ftp -nd -t 3" |
2d523c23 | 106 | |
cf71111b MP |
107 | config BR2_SVN |
108 | string "Subversion (svn) command" | |
ad477b08 | 109 | default "svn --non-interactive" |
e30cf26c | 110 | |
cf71111b MP |
111 | config BR2_BZR |
112 | string "Bazaar (bzr) command" | |
113 | default "bzr" | |
df03cdaf | 114 | |
85f54fbe | 115 | config BR2_GIT |
cf71111b MP |
116 | string "Git command" |
117 | default "git" | |
85f54fbe | 118 | |
15eb1faf GZ |
119 | config BR2_CVS |
120 | string "CVS command" | |
121 | default "cvs" | |
122 | ||
2690e76a DW |
123 | config BR2_LOCALFILES |
124 | string "Local files retrieval command" | |
125 | default "cp" | |
126 | ||
c61788f0 TDS |
127 | config BR2_SCP |
128 | string "Secure copy (scp) command" | |
129 | default "scp" | |
130 | ||
131 | config BR2_SSH | |
132 | string "Secure shell (ssh) command" | |
133 | default "ssh" | |
134 | ||
f694c076 TDS |
135 | config BR2_HG |
136 | string "Mercurial (hg) command" | |
137 | default "hg" | |
138 | ||
859b9137 BRF |
139 | config BR2_ZCAT |
140 | string "zcat command" | |
a9612bfd | 141 | default "gzip -d -c" |
859b9137 | 142 | help |
65f9b937 MK |
143 | Command to be used to extract a gzip'ed file to stdout. zcat |
144 | is identical to gunzip -c except that the former may not be | |
145 | available on your system. | |
a9612bfd BRF |
146 | Default is "gzip -d -c" |
147 | Other possible values include "gunzip -c" or "zcat". | |
6e2823c1 BRF |
148 | |
149 | config BR2_BZCAT | |
150 | string "bzcat command" | |
151 | default "bzcat" | |
152 | help | |
153 | Command to be used to extract a bzip2'ed file to stdout. | |
154 | bzcat is identical to bunzip2 -c except that the former may | |
155 | not be available on your system. | |
156 | Default is "bzcat" | |
157 | Other possible values include "bunzip2 -c" or "bzip2 -d -c". | |
859b9137 | 158 | |
177b4b4a AN |
159 | config BR2_XZCAT |
160 | string "xzcat command" | |
161 | default "xzcat" | |
162 | help | |
163 | Command to be used to extract a xz'ed file to stdout. | |
164 | Default is "xzcat" | |
165 | ||
f165032e BS |
166 | config BR2_LZCAT |
167 | string "lzcat command" | |
168 | default "lzip -d -c" | |
169 | help | |
170 | Command to be used to extract a lzip'ed file to stdout. | |
171 | Default is "lzip -d -c" | |
172 | ||
ce90aae1 BRF |
173 | config BR2_TAR_OPTIONS |
174 | string "Tar options" | |
7df4de6c BRF |
175 | default "" |
176 | help | |
177 | Options to pass to tar when extracting the sources. | |
d6109172 RM |
178 | E.g. " -v --exclude='*.svn*'" to exclude all .svn internal |
179 | files and to be verbose. | |
ce90aae1 | 180 | |
15929265 TP |
181 | endmenu |
182 | ||
4e0170d6 AVEM |
183 | config BR2_DEFCONFIG_FROM_ENV |
184 | string | |
185 | option env="BR2_DEFCONFIG" | |
186 | ||
187 | config BR2_DEFCONFIG | |
188 | string "Location to save buildroot config" | |
189 | default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != "" | |
190 | default "$(CONFIG_DIR)/defconfig" | |
191 | help | |
65f9b937 MK |
192 | When running 'make savedefconfig', the defconfig file will be |
193 | saved in this location. | |
4e0170d6 | 194 | |
59a63a91 MF |
195 | config BR2_DL_DIR |
196 | string "Download dir" | |
be695dcc | 197 | default "$(TOPDIR)/dl" |
59a63a91 MF |
198 | help |
199 | Directory to store all the source files that we need to fetch. | |
6768021c | 200 | If the Linux shell environment has defined the BR2_DL_DIR |
65f9b937 MK |
201 | environment variable, then this overrides this configuration |
202 | item. | |
07237491 MH |
203 | The directory is organized with a subdirectory for each package. |
204 | Each package has its own $(LIBFOO_DL_DIR) variable that can be used | |
205 | to find the correct path. | |
59a63a91 | 206 | |
be695dcc | 207 | The default is $(TOPDIR)/dl |
4b0d5a80 | 208 | |
a2b4f7fb GZ |
209 | config BR2_HOST_DIR |
210 | string "Host dir" | |
211 | default "$(BASE_DIR)/host" | |
212 | help | |
65f9b937 MK |
213 | Directory to store all the binary files that are built for the |
214 | host. This includes the cross compilation toolchain when | |
215 | building the internal buildroot toolchain. | |
a2b4f7fb GZ |
216 | |
217 | The default is $(BASE_DIR)/host | |
218 | ||
8008007c TP |
219 | menu "Mirrors and Download locations" |
220 | ||
221 | config BR2_PRIMARY_SITE | |
222 | string "Primary download site" | |
223 | default "" | |
224 | help | |
65f9b937 MK |
225 | Primary site to download from. If this option is set then |
226 | buildroot will try to download package source first from this | |
227 | site and try the default if the file is not found. | |
4a9d9807 JP |
228 | Valid URIs are: |
229 | - URIs recognized by $(WGET) | |
230 | - local URIs of the form file://absolutepath | |
231 | - scp URIs of the form scp://[user@]host:path. | |
8008007c | 232 | |
5a83e084 TDS |
233 | config BR2_PRIMARY_SITE_ONLY |
234 | bool "Only allow downloads from primary download site" | |
235 | depends on BR2_PRIMARY_SITE != "" | |
236 | help | |
237 | If this option is enabled, downloads will only be attempted | |
238 | from the primary download site. Other locations, like the | |
239 | package's official download location or the backup download | |
65f9b937 MK |
240 | site, will not be considered. Therefore, if the package is not |
241 | present on the primary site, the download fails. | |
5a83e084 | 242 | |
65f9b937 MK |
243 | This is useful for project developers who want to ensure that |
244 | the project can be built even if the upstream tarball | |
5a83e084 TDS |
245 | locations disappear. |
246 | ||
247 | if !BR2_PRIMARY_SITE_ONLY | |
248 | ||
8008007c TP |
249 | config BR2_BACKUP_SITE |
250 | string "Backup download site" | |
4a9eb20d | 251 | default "http://sources.buildroot.net" |
8008007c | 252 | help |
65f9b937 MK |
253 | Backup site to download from. If this option is set then |
254 | buildroot will fall back to download package sources from here | |
255 | if the normal location fails. | |
8008007c TP |
256 | |
257 | config BR2_KERNEL_MIRROR | |
258 | string "Kernel.org mirror" | |
de76cb7d | 259 | default "https://cdn.kernel.org/pub" |
8008007c | 260 | help |
de76cb7d | 261 | kernel.org is mirrored on a number of servers around the |
65f9b937 | 262 | world. The following allows you to select your preferred |
de76cb7d AB |
263 | mirror. By default, a CDN is used, which automatically |
264 | redirects to a mirror geographically close to you. | |
8008007c | 265 | |
65f9b937 MK |
266 | Have a look on the kernel.org site for a list of mirrors, then |
267 | enter the URL to the base directory. Examples: | |
8008007c TP |
268 | |
269 | http://www.XX.kernel.org/pub (XX = country code) | |
270 | http://mirror.aarnet.edu.au/pub/ftp.kernel.org | |
271 | ||
272 | config BR2_GNU_MIRROR | |
273 | string "GNU Software mirror" | |
3999f0ad | 274 | default "http://ftpmirror.gnu.org" |
8008007c | 275 | help |
3999f0ad | 276 | GNU has multiple software mirrors scattered around the |
65f9b937 | 277 | world. The following allows you to select your preferred |
3999f0ad TP |
278 | mirror. By default, a generic address is used, which |
279 | automatically selects an up-to-date and local mirror. | |
8008007c | 280 | |
65f9b937 MK |
281 | Have a look on the gnu.org site for a list of mirrors, then |
282 | enter the URL to the base directory. Examples: | |
8008007c TP |
283 | |
284 | http://ftp.gnu.org/pub/gnu | |
285 | http://mirror.aarnet.edu.au/pub/gnu | |
286 | ||
72afb294 FP |
287 | config BR2_LUAROCKS_MIRROR |
288 | string "LuaRocks mirror" | |
0b8411af | 289 | default "http://rocks.moonscript.org" |
72afb294 FP |
290 | help |
291 | LuaRocks repository. | |
292 | ||
293 | See http://luarocks.org | |
294 | ||
9fbb1699 FP |
295 | config BR2_CPAN_MIRROR |
296 | string "CPAN mirror (Perl packages)" | |
32567d12 | 297 | default "http://cpan.metacpan.org" |
9fbb1699 | 298 | help |
65f9b937 MK |
299 | CPAN (Comprehensive Perl Archive Network) is a repository of |
300 | Perl packages. It has multiple software mirrors scattered | |
9fbb1699 FP |
301 | around the world. This option allows you to select a mirror. |
302 | ||
303 | The list of mirrors is available at: | |
304 | http://search.cpan.org/mirror | |
305 | ||
3318a5a7 YM |
306 | endif |
307 | ||
8008007c | 308 | endmenu |
aa41d377 | 309 | |
8e5fb3fb | 310 | config BR2_JLEVEL |
5016aa02 NL |
311 | int "Number of jobs to run simultaneously (0 for auto)" |
312 | default "0" | |
8e5fb3fb | 313 | help |
65f9b937 MK |
314 | Number of jobs to run simultaneously. If 0, determine |
315 | automatically according to number of CPUs on the host system. | |
93ab6d30 | 316 | |
17b66aff TP |
317 | config BR2_CCACHE |
318 | bool "Enable compiler cache" | |
319 | help | |
65f9b937 MK |
320 | This option will enable the use of ccache, a compiler cache. |
321 | It will cache the result of previous builds to speed up future | |
322 | builds. By default, the cache is stored in | |
17b66aff TP |
323 | $HOME/.buildroot-ccache. |
324 | ||
f044e037 | 325 | Note that Buildroot does not try to invalidate the cache |
65f9b937 MK |
326 | contents when the compiler changes in an incompatible way. |
327 | Therefore, if you make a change to the compiler version and/or | |
328 | configuration, you are responsible for purging the ccache | |
329 | cache by removing the $HOME/.buildroot-ccache directory. | |
f044e037 | 330 | |
dd79f2df DM |
331 | if BR2_CCACHE |
332 | ||
43329076 TDS |
333 | config BR2_CCACHE_DIR |
334 | string "Compiler cache location" | |
43329076 TDS |
335 | default "$(HOME)/.buildroot-ccache" |
336 | help | |
337 | Where ccache should store cached files. | |
ad980ccc TP |
338 | If the Linux shell environment has defined the BR2_CCACHE_DIR |
339 | environment variable, then this overrides this configuration | |
340 | item. | |
43329076 | 341 | |
dd79f2df DM |
342 | config BR2_CCACHE_INITIAL_SETUP |
343 | string "Compiler cache initial setup" | |
344 | help | |
65f9b937 MK |
345 | Initial ccache settings to apply, such as --max-files or |
346 | --max-size. | |
dd79f2df | 347 | |
65f9b937 MK |
348 | For example, if your project is known to require more space |
349 | than the default max cache size, then you might want to | |
350 | increase the cache size to a suitable amount using the -M | |
351 | (--max-size) option. | |
dd79f2df | 352 | |
65f9b937 MK |
353 | The string you specify here is passed verbatim to ccache. |
354 | Refer to ccache documentation for more details. | |
dd79f2df | 355 | |
65f9b937 MK |
356 | These initial settings are applied after ccache has been |
357 | compiled. | |
dd79f2df | 358 | |
1e97b278 AV |
359 | config BR2_CCACHE_USE_BASEDIR |
360 | bool "Use relative paths" | |
361 | default y | |
362 | help | |
363 | Allow ccache to convert absolute paths within the output | |
364 | directory into relative paths. | |
365 | ||
65f9b937 MK |
366 | During the build, many -I include directives are given with an |
367 | absolute path. These absolute paths end up in the hashes that | |
368 | are computed by ccache. Therefore, when you build from a | |
369 | different directory, the hash will be different and the cached | |
370 | object will not be used. | |
1e97b278 AV |
371 | |
372 | To improve cache performance, set this option to y. This | |
373 | allows ccache to rewrite absolute paths within the output | |
65f9b937 MK |
374 | directory into relative paths. Note that only paths within the |
375 | output directory will be rewritten; therefore, if you change | |
376 | BR2_HOST_DIR to point outside the output directory and | |
1e97b278 AV |
377 | subsequently move it to a different location, this will lead |
378 | to cache misses. | |
379 | ||
380 | This option has as a result that the debug information in the | |
381 | object files also has only relative paths. Therefore, make | |
382 | sure you cd to the build directory before starting gdb. See | |
65f9b937 MK |
383 | the section "COMPILING IN DIFFERENT DIRECTORIES" in the ccache |
384 | manual for more information. | |
1e97b278 | 385 | |
dd79f2df DM |
386 | endif |
387 | ||
41f6b79f JV |
388 | config BR2_ENABLE_DEBUG |
389 | bool "build packages with debugging symbols" | |
41f6b79f | 390 | help |
a9a34676 TP |
391 | Build packages with debugging symbols enabled. All libraries |
392 | and binaries in the 'staging' directory will have debugging | |
393 | symbols, which allows remote debugging even if libraries and | |
394 | binaries are stripped on the target. Whether libraries and | |
395 | binaries are stripped on the target is controlled by the | |
396 | BR2_STRIP_* options below. | |
41f6b79f JV |
397 | |
398 | if BR2_ENABLE_DEBUG | |
399 | choice | |
400 | prompt "gcc debug level" | |
401 | default BR2_DEBUG_2 | |
402 | help | |
403 | Set the debug level for gcc | |
404 | ||
405 | config BR2_DEBUG_1 | |
406 | bool "debug level 1" | |
407 | help | |
65f9b937 MK |
408 | Debug level 1 produces minimal information, enough for making |
409 | backtraces in parts of the program that you don't plan to | |
410 | debug. This includes descriptions of functions and external | |
411 | variables, but no information about local variables and no | |
412 | line numbers. | |
41f6b79f JV |
413 | |
414 | config BR2_DEBUG_2 | |
415 | bool "debug level 2" | |
416 | help | |
417 | The default gcc debug level is 2 | |
418 | ||
419 | config BR2_DEBUG_3 | |
420 | bool "debug level 3" | |
421 | help | |
65f9b937 MK |
422 | Level 3 includes extra information, such as all the macro |
423 | definitions present in the program. Some debuggers support | |
424 | macro expansion when you use -g3. | |
41f6b79f JV |
425 | endchoice |
426 | endif | |
427 | ||
bbd251a0 | 428 | config BR2_STRIP_strip |
0d643fd3 | 429 | bool "strip target binaries" |
0d643fd3 | 430 | default y |
a1264445 | 431 | depends on !BR2_PACKAGE_HOST_ELF2FLT |
bbd251a0 | 432 | help |
a9a34676 | 433 | Binaries and libraries in the target filesystem will be |
65f9b937 MK |
434 | stripped using the normal 'strip' command. This allows to save |
435 | space, mainly by removing debugging symbols. Debugging symbols | |
436 | on the target are needed for native debugging, but not when | |
437 | remote debugging is used. | |
85f54fbe | 438 | |
2a97045d TDS |
439 | config BR2_STRIP_EXCLUDE_FILES |
440 | string "executables that should not be stripped" | |
2a97045d | 441 | default "" |
a1264445 | 442 | depends on BR2_STRIP_strip |
2a97045d | 443 | help |
65f9b937 MK |
444 | You may specify a space-separated list of binaries and |
445 | libraries here that should not be stripped on the target. | |
2a97045d TDS |
446 | |
447 | config BR2_STRIP_EXCLUDE_DIRS | |
448 | string "directories that should be skipped when stripping" | |
2a97045d | 449 | default "" |
a1264445 | 450 | depends on BR2_STRIP_strip |
2a97045d | 451 | help |
65f9b937 MK |
452 | You may specify a space-separated list of directories that |
453 | should be skipped when stripping. Binaries and libraries in | |
454 | these directories will not be touched. The directories should | |
455 | be specified relative to the target directory, without leading | |
456 | slash. | |
2a97045d | 457 | |
41f6b79f JV |
458 | choice |
459 | prompt "gcc optimization level" | |
7eb796ba | 460 | default BR2_OPTIMIZE_S |
923f42a3 | 461 | help |
41f6b79f JV |
462 | Set the optimization level for gcc |
463 | ||
464 | config BR2_OPTIMIZE_0 | |
465 | bool "optimization level 0" | |
466 | help | |
4e09fd8b | 467 | Do not optimize. |
41f6b79f JV |
468 | |
469 | config BR2_OPTIMIZE_1 | |
470 | bool "optimization level 1" | |
471 | help | |
65f9b937 MK |
472 | Optimize. Optimizing compilation takes somewhat more time, and |
473 | a lot more memory for a large function. With -O, the compiler | |
474 | tries to reduce code size and execution time, without | |
475 | performing any optimizations that take a great deal of | |
476 | compilation time. -O turns on the following optimization | |
02a623dd PK |
477 | flags: -fdefer-pop -fdelayed-branch -fguess-branch-probability |
478 | -fcprop-registers -floop-optimize -fif-conversion | |
479 | -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts | |
480 | -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename | |
65f9b937 MK |
481 | -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants. -O |
482 | also turns on -fomit-frame-pointer on machines where doing so | |
483 | does not interfere with debugging. | |
41f6b79f JV |
484 | |
485 | config BR2_OPTIMIZE_2 | |
486 | bool "optimization level 2" | |
487 | help | |
65f9b937 MK |
488 | Optimize even more. GCC performs nearly all supported |
489 | optimizations that do not involve a space-speed tradeoff. The | |
490 | compiler does not perform loop unrolling or function inlining | |
491 | when you specify -O2. As compared to -O, this option increases | |
492 | both compilation time and the performance of the generated | |
493 | code. -O2 turns on all optimization flags specified by -O. It | |
494 | also turns on the following optimization flags: | |
495 | -fthread-jumps -fcrossjumping -foptimize-sibling-calls | |
02a623dd | 496 | -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm |
65f9b937 MK |
497 | -fexpensive-optimizations -fstrength-reduce |
498 | -frerun-cse-after-loop -frerun-loop-opt -fcaller-saves | |
499 | -fpeephole2 -fschedule-insns -fschedule-insns2 | |
500 | -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing | |
501 | -fdelete-null-pointer-checks -freorder-blocks | |
502 | -freorder-functions -falign-functions -falign-jumps | |
503 | -falign-loops -falign-labels -ftree-vrp -ftree-pre. Please | |
504 | note the warning under -fgcse about invoking -O2 on programs | |
41f6b79f JV |
505 | that use computed gotos. |
506 | ||
507 | config BR2_OPTIMIZE_3 | |
508 | bool "optimization level 3" | |
509 | help | |
65f9b937 MK |
510 | Optimize yet more. -O3 turns on all optimizations specified by |
511 | -O2 and also turns on the -finline-functions, -funswitch-loops | |
512 | and -fgcse-after-reload options. | |
41f6b79f | 513 | |
5ff84592 MK |
514 | config BR2_OPTIMIZE_G |
515 | bool "optimize for debugging" | |
516 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 | |
517 | help | |
518 | Optimize for debugging. This enables optimizations that do not | |
65f9b937 MK |
519 | interfere with debugging. It should be the optimization level |
520 | of choice for the standard edit-compile-debug cycle, offering | |
521 | a reasonable level of optimization while maintaining fast | |
522 | compilation and a good debugging experience. | |
41f6b79f JV |
523 | |
524 | config BR2_OPTIMIZE_S | |
525 | bool "optimize for size" | |
526 | help | |
65f9b937 MK |
527 | Optimize for size. -Os enables all -O2 optimizations that do |
528 | not typically increase code size. It also performs further | |
529 | optimizations designed to reduce code size. -Os disables the | |
530 | following optimization flags: -falign-functions -falign-jumps | |
531 | -falign-loops -falign-labels -freorder-blocks | |
532 | -freorder-blocks-and-partition -fprefetch-loop-arrays | |
41f6b79f | 533 | -ftree-vect-loop-version |
4e09fd8b | 534 | This is the default. |
02a623dd | 535 | |
ed6a7e18 JH |
536 | config BR2_OPTIMIZE_FAST |
537 | bool "optimize for fast" | |
538 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 | |
539 | help | |
540 | Optimize for fast. Disregard strict standards | |
541 | compliance. -Ofast enables all -O3 optimizations. It also | |
542 | enables optimizations that are not valid for all | |
543 | standard-compliant programs. It turns on -ffast-math and the | |
544 | Fortran-specific -fstack-arrays, unless -fmax-stack-var-size | |
545 | is specified, and -fno-protect-parens. | |
546 | ||
41f6b79f | 547 | endchoice |
923f42a3 | 548 | |
09a1a10f PH |
549 | config BR2_GOOGLE_BREAKPAD_ENABLE |
550 | bool "Enable google-breakpad support" | |
09a1a10f | 551 | depends on BR2_INSTALL_LIBSTDCPP |
282ffecb RN |
552 | depends on BR2_HOST_GCC_AT_LEAST_4_8 # C++11 |
553 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 | |
e9ffb3b8 | 554 | depends on BR2_USE_WCHAR |
0bb3983c | 555 | depends on BR2_TOOLCHAIN_HAS_THREADS |
e9ffb3b8 | 556 | depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC) |
09a1a10f | 557 | depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS |
fadc4383 | 558 | depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS |
a1264445 | 559 | select BR2_PACKAGE_GOOGLE_BREAKPAD |
09a1a10f | 560 | help |
65f9b937 MK |
561 | This option will enable the use of google breakpad, a library |
562 | and tool suite that allows you to distribute an application to | |
563 | users with compiler-provided debugging information removed, | |
564 | record crashes in compact "minidump" files, send them back to | |
565 | your server and produce C and C++ stack traces from these | |
566 | minidumps. Breakpad can also write minidumps on request for | |
567 | programs that have not crashed. | |
09a1a10f PH |
568 | |
569 | if BR2_GOOGLE_BREAKPAD_ENABLE | |
570 | ||
571 | config BR2_GOOGLE_BREAKPAD_INCLUDE_FILES | |
572 | string "List of executables and libraries to extract symbols from" | |
573 | default "" | |
574 | help | |
575 | You may specify a space-separated list of binaries and | |
576 | libraries with full paths relative to $(TARGET_DIR) of which | |
577 | debug symbols will be dumped for further use with google | |
578 | breakpad. | |
579 | ||
580 | A directory structure that can be used by minidump-stackwalk | |
581 | will be created at: | |
582 | ||
583 | $(STAGING_DIR)/usr/share/google-breakpad-symbols | |
584 | ||
585 | endif | |
586 | ||
158001f5 TP |
587 | choice |
588 | bool "libraries" | |
f1d3e098 | 589 | default BR2_SHARED_LIBS if BR2_BINFMT_SUPPORTS_SHARED |
158001f5 TP |
590 | default BR2_STATIC_LIBS if !BR2_BINFMT_SUPPORTS_SHARED |
591 | help | |
592 | Select the type of libraries you want to use on the target. | |
593 | ||
65f9b937 MK |
594 | The default is to build dynamic libraries and use those on the |
595 | target filesystem, except when the architecture and/or the | |
596 | selected binary format does not support shared libraries. | |
158001f5 | 597 | |
665e13c8 | 598 | config BR2_STATIC_LIBS |
158001f5 | 599 | bool "static only" |
3096f34d | 600 | help |
65f9b937 | 601 | Build and use only static libraries. No shared libraries will |
d9312d63 | 602 | be installed on the target. This potentially increases your |
65f9b937 MK |
603 | code size and should only be used if you know what you are |
604 | doing. Note that some packages may not be available when this | |
605 | option is enabled, due to their need for dynamic library | |
606 | support. | |
3096f34d | 607 | |
158001f5 TP |
608 | config BR2_SHARED_LIBS |
609 | bool "shared only" | |
610 | depends on BR2_BINFMT_SUPPORTS_SHARED | |
611 | help | |
612 | Build and use only shared libraries. This is the recommended | |
613 | solution as it saves space and build time. | |
614 | ||
615 | config BR2_SHARED_STATIC_LIBS | |
616 | bool "both static and shared" | |
617 | depends on BR2_BINFMT_SUPPORTS_SHARED | |
618 | help | |
619 | Build both shared and static libraries, but link executables | |
620 | dynamically. While building both shared and static libraries | |
621 | take more time and more disk space, having static libraries | |
622 | may be useful to link some of the applications statically. | |
7d9c0df0 | 623 | |
158001f5 | 624 | endchoice |
7d9c0df0 | 625 | |
ee0246e1 TP |
626 | config BR2_PACKAGE_OVERRIDE_FILE |
627 | string "location of a package override file" | |
eda3d0e1 | 628 | default "$(CONFIG_DIR)/local.mk" |
ee0246e1 TP |
629 | help |
630 | A package override file is a short makefile that contains | |
65f9b937 MK |
631 | variable definitions of the form <pkg>_OVERRIDE_SRCDIR, which |
632 | allows to tell Buildroot to use an existing directory as the | |
633 | source directory for a particular package. See the Buildroot | |
634 | documentation for more details on this feature. | |
ee0246e1 | 635 | |
5538e476 | 636 | config BR2_GLOBAL_PATCH_DIR |
bc4f79d6 | 637 | string "global patch directories" |
5538e476 | 638 | help |
65f9b937 MK |
639 | You may specify a space separated list of one or more |
640 | directories containing global package patches. For a specific | |
641 | version <packageversion> of a specific package <packagename>, | |
642 | patches are applied as follows: | |
5538e476 | 643 | |
65f9b937 MK |
644 | First, the default Buildroot patch set for the package is |
645 | applied from the package's directory in Buildroot. | |
5538e476 | 646 | |
bc4f79d6 RB |
647 | Then for every directory - <global-patch-dir> - that exists in |
648 | BR2_GLOBAL_PATCH_DIR, if the directory | |
65f9b937 MK |
649 | <global-patch-dir>/<packagename>/<packageversion>/ exists, |
650 | then all *.patch files in this directory will be applied. | |
5538e476 | 651 | |
65f9b937 MK |
652 | Otherwise, if the directory <global-patch-dir>/<packagename> |
653 | exists, then all *.patch files in the directory will be | |
654 | applied. | |
5538e476 | 655 | |
4ac8f78d TP |
656 | menu "Advanced" |
657 | ||
658 | config BR2_COMPILER_PARANOID_UNSAFE_PATH | |
659 | bool "paranoid check of library/header paths" | |
61c8854c | 660 | default y |
4ac8f78d TP |
661 | help |
662 | By default, when this option is disabled, when the Buildroot | |
65f9b937 MK |
663 | cross-compiler will encounter an unsafe library or header path |
664 | (such as /usr/include, or /usr/lib), the compiler will display | |
665 | a warning. | |
4ac8f78d | 666 | |
65f9b937 MK |
667 | By enabling this option, this warning is turned into an error, |
668 | which will completely abort the build when such unsafe paths | |
669 | are encountered. | |
4ac8f78d TP |
670 | |
671 | Note that this mechanism is available for both the internal | |
f9d311ed | 672 | toolchain (through the toolchain wrapper and binutils patches) |
d6109172 RM |
673 | and external toolchain backends (through the toolchain |
674 | wrapper). | |
4ac8f78d | 675 | |
71574a65 GC |
676 | config BR2_REPRODUCIBLE |
677 | bool "Make the build reproducible (experimental)" | |
6393b690 YM |
678 | # SOURCE_DATE_EPOCH support in toolchain-wrapper requires GCC 4.4 |
679 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 | |
a446ab74 JG |
680 | help |
681 | This option will remove all sources of non-reproducibility | |
682 | from the build process. For a given Buildroot configuration, | |
683 | this allows to generate exactly identical binaries from one | |
684 | build to the other, including on different machines. | |
685 | ||
bedb1610 JP |
686 | The current implementation is restricted to builds with the |
687 | same output directory. Many (absolute) paths are recorded in | |
688 | intermediary files, and it is very likely that some of these | |
689 | paths leak into the target rootfs. If you build with the | |
690 | same O=... path, however, the result is identical. | |
691 | ||
a446ab74 JG |
692 | This is labeled as an experimental feature, as not all |
693 | packages behave properly to ensure reproducibility. | |
71574a65 | 694 | |
8e5fb3fb | 695 | endmenu |
2d523c23 | 696 | |
d3732cf4 MW |
697 | comment "Security Hardening Options" |
698 | ||
699 | choice | |
700 | bool "Stack Smashing Protection" | |
701 | default BR2_SSP_ALL if BR2_ENABLE_SSP # legacy | |
702 | depends on BR2_TOOLCHAIN_HAS_SSP | |
703 | help | |
704 | Enable stack smashing protection support using GCC's | |
705 | -fstack-protector option family. | |
706 | ||
707 | See | |
708 | http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt | |
709 | for details. | |
710 | ||
711 | Note that this requires the toolchain to have SSP support. | |
712 | This is always the case for glibc and eglibc toolchain, but is | |
713 | optional in uClibc toolchains. | |
714 | ||
715 | config BR2_SSP_NONE | |
716 | bool "None" | |
717 | help | |
718 | Disable stack-smashing protection. | |
719 | ||
720 | config BR2_SSP_REGULAR | |
721 | bool "-fstack-protector" | |
722 | help | |
723 | Emit extra code to check for buffer overflows, such as stack | |
724 | smashing attacks. This is done by adding a guard variable to | |
725 | functions with vulnerable objects. This includes functions | |
726 | that call alloca, and functions with buffers larger than 8 | |
727 | bytes. The guards are initialized when a function is entered | |
728 | and then checked when the function exits. If a guard check | |
729 | fails, an error message is printed and the program exits. | |
730 | ||
731 | config BR2_SSP_STRONG | |
732 | bool "-fstack-protector-strong" | |
733 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 | |
734 | help | |
735 | Like -fstack-protector but includes additional functions to be | |
736 | protected - those that have local array definitions, or have | |
737 | references to local frame addresses. | |
738 | ||
739 | comment "Stack Smashing Protection strong needs a toolchain w/ gcc >= 4.9" | |
740 | depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 | |
741 | ||
742 | config BR2_SSP_ALL | |
743 | bool "-fstack-protector-all" | |
744 | help | |
745 | Like -fstack-protector except that all functions are | |
746 | protected. This option might have a significant performance | |
747 | impact on the compiled binaries. | |
748 | ||
749 | endchoice | |
750 | ||
751 | comment "Stack Smashing Protection needs a toolchain w/ SSP" | |
752 | depends on !BR2_TOOLCHAIN_HAS_SSP | |
753 | ||
20a4583e MW |
754 | choice |
755 | bool "RELRO Protection" | |
756 | depends on BR2_SHARED_LIBS | |
757 | help | |
d6109172 RM |
758 | Enable a link-time protection know as RELRO (RELocation Read |
759 | Only) which helps to protect from certain type of exploitation | |
760 | techniques altering the content of some ELF sections. | |
20a4583e MW |
761 | |
762 | config BR2_RELRO_NONE | |
763 | bool "None" | |
764 | help | |
765 | Disables Relocation link-time protections. | |
766 | ||
767 | config BR2_RELRO_PARTIAL | |
768 | bool "Partial" | |
769 | help | |
770 | This option makes the dynamic section not writeable after | |
771 | initialization (with almost no performance penalty). | |
772 | ||
773 | config BR2_RELRO_FULL | |
774 | bool "Full" | |
775 | help | |
d6109172 RM |
776 | This option includes the partial configuration, but also marks |
777 | the GOT as read-only at the cost of initialization time during | |
778 | program loading, i.e every time an executable is started. | |
20a4583e MW |
779 | |
780 | endchoice | |
781 | ||
782 | comment "RELocation Read Only (RELRO) needs shared libraries" | |
783 | depends on !BR2_SHARED_LIBS | |
784 | ||
785 | choice | |
786 | bool "Buffer-overflow Detection (FORTIFY_SOURCE)" | |
787 | depends on BR2_TOOLCHAIN_USES_GLIBC | |
788 | depends on !BR2_OPTIMIZE_0 | |
789 | help | |
790 | Enable the _FORTIFY_SOURCE macro which introduces additional | |
d6109172 RM |
791 | checks to detect buffer-overflows in the following standard |
792 | library functions: memcpy, mempcpy, memmove, memset, strcpy, | |
793 | stpcpy, strncpy, strcat, strncat, sprintf, vsprintf, snprintf, | |
794 | vsnprintf, gets. | |
20a4583e MW |
795 | |
796 | NOTE: This feature requires an optimization level of s/1/2/3/g | |
797 | ||
798 | Support for this feature has been present since GCC 4.x. | |
799 | ||
800 | config BR2_FORTIFY_SOURCE_NONE | |
801 | bool "None" | |
802 | help | |
803 | Disables additional checks to detect buffer-overflows. | |
804 | ||
805 | config BR2_FORTIFY_SOURCE_1 | |
806 | bool "Conservative" | |
807 | help | |
808 | This option sets _FORTIFY_SOURCE to 1 and only introduces | |
809 | checks that shouldn't change the behavior of conforming | |
810 | programs. Adds checks at compile-time only. | |
811 | ||
812 | config BR2_FORTIFY_SOURCE_2 | |
813 | bool "Aggressive" | |
814 | help | |
815 | This option sets _FORTIFY_SOURCES to 2 and some more | |
816 | checking is added, but some conforming programs might fail. | |
817 | Also adds checks at run-time (detected buffer overflow | |
818 | terminates the program) | |
819 | ||
820 | endchoice | |
821 | ||
822 | comment "Fortify Source needs a glibc toolchain and optimization" | |
823 | depends on (!BR2_TOOLCHAIN_USES_GLIBC || BR2_OPTIMIZE_0) | |
1ac2cdd7 YM |
824 | endmenu |
825 | ||
50100394 BRF |
826 | source "toolchain/Config.in" |
827 | ||
6c3e3ad4 | 828 | source "system/Config.in" |
beb43c7d | 829 | |
24403857 | 830 | source "linux/Config.in" |
50100394 | 831 | |
24403857 | 832 | source "package/Config.in" |
d06e8022 | 833 | |
05852415 TP |
834 | source "fs/Config.in" |
835 | ||
649b5b92 TP |
836 | source "boot/Config.in" |
837 | ||
24403857 | 838 | source "package/Config.in.host" |
ebcfa987 AVEM |
839 | |
840 | source "Config.in.legacy" | |
8eb8aaf9 | 841 | |
4802db3d | 842 | source "$BR2_BUILD_DIR/.br2-external.in" |