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