3 mainmenu "Buildroot $BR2_VERSION Configuration"
5 config BR2_HAVE_DOT_CONFIG
11 option env="BR2_VERSION_FULL"
19 option env="BUILD_DIR"
21 # Hidden config symbols for packages to check system gcc version
22 config BR2_HOST_GCC_VERSION
24 option env="HOST_GCC_VERSION"
26 config BR2_HOST_GCC_AT_LEAST_4_5
28 default y if BR2_HOST_GCC_VERSION = "4 5"
30 config BR2_HOST_GCC_AT_LEAST_4_6
32 default y if BR2_HOST_GCC_VERSION = "4 6"
33 select BR2_HOST_GCC_AT_LEAST_4_5
35 config BR2_HOST_GCC_AT_LEAST_4_7
37 default y if BR2_HOST_GCC_VERSION = "4 7"
38 select BR2_HOST_GCC_AT_LEAST_4_6
40 config BR2_HOST_GCC_AT_LEAST_4_8
42 default y if BR2_HOST_GCC_VERSION = "4 8"
43 select BR2_HOST_GCC_AT_LEAST_4_7
45 config BR2_HOST_GCC_AT_LEAST_4_9
47 default y if BR2_HOST_GCC_VERSION = "4 9"
48 select BR2_HOST_GCC_AT_LEAST_4_8
50 config BR2_HOST_GCC_AT_LEAST_5
52 default y if BR2_HOST_GCC_VERSION = "5"
53 select BR2_HOST_GCC_AT_LEAST_4_9
55 config BR2_HOST_GCC_AT_LEAST_6
57 default y if BR2_HOST_GCC_VERSION = "6"
58 select BR2_HOST_GCC_AT_LEAST_5
60 config BR2_HOST_GCC_AT_LEAST_7
62 default y if BR2_HOST_GCC_VERSION = "7"
63 select BR2_HOST_GCC_AT_LEAST_6
65 # Hidden boolean selected by packages in need of Java in order to build
67 config BR2_NEEDS_HOST_JAVA
70 # Hidden boolean selected by packages in need of javac in order to build
71 # (example: classpath)
72 config BR2_NEEDS_HOST_JAVAC
75 # Hidden boolean selected by packages in need of jar in order to build
76 # (example: classpath)
77 config BR2_NEEDS_HOST_JAR
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
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
89 config BR2_HOSTARCH_NEEDS_IA32_COMPILER
92 # Hidden boolean selected by packages that need the host to have an
94 config BR2_NEEDS_HOST_UTF8_LOCALE
97 # Hidden boolean selected by packages that explicitly need C.UTF-8 locale
98 # to be available on host system.
99 config BR2_NEEDS_HOST_C_UTF8_LOCALE
102 source "arch/Config.in"
109 string "Wget command"
110 default "wget --passive-ftp -nd -t 3"
113 string "Subversion (svn) command"
114 default "svn --non-interactive"
117 string "Bazaar (bzr) command"
128 config BR2_LOCALFILES
129 string "Local files retrieval command"
133 string "Secure copy (scp) command"
137 string "Secure shell (ssh) command"
141 string "Mercurial (hg) command"
145 string "zcat command"
148 Command to be used to extract a gzip'ed file to stdout. zcat
149 is identical to gunzip -c except that the former may not be
150 available on your system.
151 Default is "gzip -d -c"
152 Other possible values include "gunzip -c" or "zcat".
155 string "bzcat command"
158 Command to be used to extract a bzip2'ed file to stdout.
159 bzcat is identical to bunzip2 -c except that the former may
160 not be available on your system.
162 Other possible values include "bunzip2 -c" or "bzip2 -d -c".
165 string "xzcat command"
168 Command to be used to extract a xz'ed file to stdout.
172 string "lzcat command"
175 Command to be used to extract a lzip'ed file to stdout.
176 Default is "lzip -d -c"
178 config BR2_TAR_OPTIONS
182 Options to pass to tar when extracting the sources.
183 E.g. " -v --exclude='*.svn*'" to exclude all .svn internal files
188 config BR2_DEFCONFIG_FROM_ENV
190 option env="BR2_DEFCONFIG"
193 string "Location to save buildroot config"
194 default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != ""
195 default "$(CONFIG_DIR)/defconfig"
197 When running 'make savedefconfig', the defconfig file will be
198 saved in this location.
201 string "Download dir"
202 default "$(TOPDIR)/dl"
204 Directory to store all the source files that we need to fetch.
205 If the Linux shell environment has defined the BR2_DL_DIR
206 environment variable, then this overrides this configuration
209 The default is $(TOPDIR)/dl
213 default "$(BASE_DIR)/host"
215 Directory to store all the binary files that are built for the
216 host. This includes the cross compilation toolchain when
217 building the internal buildroot toolchain.
219 The default is $(BASE_DIR)/host
221 menu "Mirrors and Download locations"
223 config BR2_PRIMARY_SITE
224 string "Primary download site"
227 Primary site to download from. If this option is set then
228 buildroot will try to download package source first from this
229 site and try the default if the file is not found.
231 - URIs recognized by $(WGET)
232 - local URIs of the form file://absolutepath
233 - scp URIs of the form scp://[user@]host:path.
235 config BR2_PRIMARY_SITE_ONLY
236 bool "Only allow downloads from primary download site"
237 depends on BR2_PRIMARY_SITE != ""
239 If this option is enabled, downloads will only be attempted
240 from the primary download site. Other locations, like the
241 package's official download location or the backup download
242 site, will not be considered. Therefore, if the package is not
243 present on the primary site, the download fails.
245 This is useful for project developers who want to ensure that
246 the project can be built even if the upstream tarball
249 if !BR2_PRIMARY_SITE_ONLY
251 config BR2_BACKUP_SITE
252 string "Backup download site"
253 default "http://sources.buildroot.net"
255 Backup site to download from. If this option is set then
256 buildroot will fall back to download package sources from here
257 if the normal location fails.
259 config BR2_KERNEL_MIRROR
260 string "Kernel.org mirror"
261 default "https://cdn.kernel.org/pub"
263 kernel.org is mirrored on a number of servers around the
264 world. The following allows you to select your preferred
265 mirror. By default, a CDN is used, which automatically
266 redirects to a mirror geographically close to you.
268 Have a look on the kernel.org site for a list of mirrors, then
269 enter the URL to the base directory. Examples:
271 http://www.XX.kernel.org/pub (XX = country code)
272 http://mirror.aarnet.edu.au/pub/ftp.kernel.org
274 config BR2_GNU_MIRROR
275 string "GNU Software mirror"
276 default "http://ftpmirror.gnu.org"
278 GNU has multiple software mirrors scattered around the
279 world. The following allows you to select your preferred
280 mirror. By default, a generic address is used, which
281 automatically selects an up-to-date and local mirror.
283 Have a look on the gnu.org site for a list of mirrors, then
284 enter the URL to the base directory. Examples:
286 http://ftp.gnu.org/pub/gnu
287 http://mirror.aarnet.edu.au/pub/gnu
289 config BR2_LUAROCKS_MIRROR
290 string "LuaRocks mirror"
291 default "http://rocks.moonscript.org"
295 See http://luarocks.org
297 config BR2_CPAN_MIRROR
298 string "CPAN mirror (Perl packages)"
299 default "http://cpan.metacpan.org"
301 CPAN (Comprehensive Perl Archive Network) is a repository of
302 Perl packages. It has multiple software mirrors scattered
303 around the world. This option allows you to select a mirror.
305 The list of mirrors is available at:
306 http://search.cpan.org/mirror
313 int "Number of jobs to run simultaneously (0 for auto)"
316 Number of jobs to run simultaneously. If 0, determine
317 automatically according to number of CPUs on the host system.
320 bool "Enable compiler cache"
322 This option will enable the use of ccache, a compiler cache.
323 It will cache the result of previous builds to speed up future
324 builds. By default, the cache is stored in
325 $HOME/.buildroot-ccache.
327 Note that Buildroot does not try to invalidate the cache
328 contents when the compiler changes in an incompatible way.
329 Therefore, if you make a change to the compiler version and/or
330 configuration, you are responsible for purging the ccache
331 cache by removing the $HOME/.buildroot-ccache directory.
335 config BR2_CCACHE_DIR
336 string "Compiler cache location"
337 default "$(HOME)/.buildroot-ccache"
339 Where ccache should store cached files.
341 config BR2_CCACHE_INITIAL_SETUP
342 string "Compiler cache initial setup"
344 Initial ccache settings to apply, such as --max-files or
347 For example, if your project is known to require more space
348 than the default max cache size, then you might want to
349 increase the cache size to a suitable amount using the -M
352 The string you specify here is passed verbatim to ccache.
353 Refer to ccache documentation for more details.
355 These initial settings are applied after ccache has been
358 config BR2_CCACHE_USE_BASEDIR
359 bool "Use relative paths"
362 Allow ccache to convert absolute paths within the output
363 directory into relative paths.
365 During the build, many -I include directives are given with an
366 absolute path. These absolute paths end up in the hashes that
367 are computed by ccache. Therefore, when you build from a
368 different directory, the hash will be different and the cached
369 object will not be used.
371 To improve cache performance, set this option to y. This
372 allows ccache to rewrite absolute paths within the output
373 directory into relative paths. Note that only paths within the
374 output directory will be rewritten; therefore, if you change
375 BR2_HOST_DIR to point outside the output directory and
376 subsequently move it to a different location, this will lead
379 This option has as a result that the debug information in the
380 object files also has only relative paths. Therefore, make
381 sure you cd to the build directory before starting gdb. See
382 the section "COMPILING IN DIFFERENT DIRECTORIES" in the ccache
383 manual for more information.
387 config BR2_ENABLE_DEBUG
388 bool "build packages with debugging symbols"
390 Build packages with debugging symbols enabled. All libraries
391 and binaries in the 'staging' directory will have debugging
392 symbols, which allows remote debugging even if libraries and
393 binaries are stripped on the target. Whether libraries and
394 binaries are stripped on the target is controlled by the
395 BR2_STRIP_* options below.
399 prompt "gcc debug level"
402 Set the debug level for gcc
407 Debug level 1 produces minimal information, enough for making
408 backtraces in parts of the program that you don't plan to
409 debug. This includes descriptions of functions and external
410 variables, but no information about local variables and no
416 The default gcc debug level is 2
421 Level 3 includes extra information, such as all the macro
422 definitions present in the program. Some debuggers support
423 macro expansion when you use -g3.
427 config BR2_STRIP_strip
428 bool "strip target binaries"
429 depends on !BR2_PACKAGE_HOST_ELF2FLT
432 Binaries and libraries in the target filesystem will be
433 stripped using the normal 'strip' command. This allows to save
434 space, mainly by removing debugging symbols. Debugging symbols
435 on the target are needed for native debugging, but not when
436 remote debugging is used.
438 config BR2_STRIP_EXCLUDE_FILES
439 string "executables that should not be stripped"
440 depends on BR2_STRIP_strip
443 You may specify a space-separated list of binaries and
444 libraries here that should not be stripped on the target.
446 config BR2_STRIP_EXCLUDE_DIRS
447 string "directories that should be skipped when stripping"
448 depends on BR2_STRIP_strip
451 You may specify a space-separated list of directories that
452 should be skipped when stripping. Binaries and libraries in
453 these directories will not be touched. The directories should
454 be specified relative to the target directory, without leading
458 prompt "gcc optimization level"
459 default BR2_OPTIMIZE_S
461 Set the optimization level for gcc
463 config BR2_OPTIMIZE_0
464 bool "optimization level 0"
468 config BR2_OPTIMIZE_1
469 bool "optimization level 1"
471 Optimize. Optimizing compilation takes somewhat more time, and
472 a lot more memory for a large function. With -O, the compiler
473 tries to reduce code size and execution time, without
474 performing any optimizations that take a great deal of
475 compilation time. -O turns on the following optimization
476 flags: -fdefer-pop -fdelayed-branch -fguess-branch-probability
477 -fcprop-registers -floop-optimize -fif-conversion
478 -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts
479 -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename
480 -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants. -O
481 also turns on -fomit-frame-pointer on machines where doing so
482 does not interfere with debugging.
484 config BR2_OPTIMIZE_2
485 bool "optimization level 2"
487 Optimize even more. GCC performs nearly all supported
488 optimizations that do not involve a space-speed tradeoff. The
489 compiler does not perform loop unrolling or function inlining
490 when you specify -O2. As compared to -O, this option increases
491 both compilation time and the performance of the generated
492 code. -O2 turns on all optimization flags specified by -O. It
493 also turns on the following optimization flags:
494 -fthread-jumps -fcrossjumping -foptimize-sibling-calls
495 -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm
496 -fexpensive-optimizations -fstrength-reduce
497 -frerun-cse-after-loop -frerun-loop-opt -fcaller-saves
498 -fpeephole2 -fschedule-insns -fschedule-insns2
499 -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing
500 -fdelete-null-pointer-checks -freorder-blocks
501 -freorder-functions -falign-functions -falign-jumps
502 -falign-loops -falign-labels -ftree-vrp -ftree-pre. Please
503 note the warning under -fgcse about invoking -O2 on programs
504 that use computed gotos.
506 config BR2_OPTIMIZE_3
507 bool "optimization level 3"
509 Optimize yet more. -O3 turns on all optimizations specified by
510 -O2 and also turns on the -finline-functions, -funswitch-loops
511 and -fgcse-after-reload options.
513 config BR2_OPTIMIZE_G
514 bool "optimize for debugging"
515 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
517 Optimize for debugging. This enables optimizations that do not
518 interfere with debugging. It should be the optimization level
519 of choice for the standard edit-compile-debug cycle, offering
520 a reasonable level of optimization while maintaining fast
521 compilation and a good debugging experience.
523 config BR2_OPTIMIZE_S
524 bool "optimize for size"
526 Optimize for size. -Os enables all -O2 optimizations that do
527 not typically increase code size. It also performs further
528 optimizations designed to reduce code size. -Os disables the
529 following optimization flags: -falign-functions -falign-jumps
530 -falign-loops -falign-labels -freorder-blocks
531 -freorder-blocks-and-partition -fprefetch-loop-arrays
532 -ftree-vect-loop-version
537 config BR2_GOOGLE_BREAKPAD_ENABLE
538 bool "Enable google-breakpad support"
539 select BR2_PACKAGE_GOOGLE_BREAKPAD
540 depends on BR2_INSTALL_LIBSTDCPP
541 depends on BR2_HOST_GCC_AT_LEAST_4_8 # C++11
542 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
543 depends on BR2_USE_WCHAR
544 depends on BR2_TOOLCHAIN_HAS_THREADS
545 depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC)
546 depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS
547 depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS
549 This option will enable the use of google breakpad, a library
550 and tool suite that allows you to distribute an application to
551 users with compiler-provided debugging information removed,
552 record crashes in compact "minidump" files, send them back to
553 your server and produce C and C++ stack traces from these
554 minidumps. Breakpad can also write minidumps on request for
555 programs that have not crashed.
557 if BR2_GOOGLE_BREAKPAD_ENABLE
559 config BR2_GOOGLE_BREAKPAD_INCLUDE_FILES
560 string "List of executables and libraries to extract symbols from"
563 You may specify a space-separated list of binaries and
564 libraries with full paths relative to $(TARGET_DIR) of which
565 debug symbols will be dumped for further use with google
568 A directory structure that can be used by minidump-stackwalk
571 $(STAGING_DIR)/usr/share/google-breakpad-symbols
577 default BR2_SHARED_LIBS if BR2_BINFMT_SUPPORTS_SHARED
578 default BR2_STATIC_LIBS if !BR2_BINFMT_SUPPORTS_SHARED
580 Select the type of libraries you want to use on the target.
582 The default is to build dynamic libraries and use those on the
583 target filesystem, except when the architecture and/or the
584 selected binary format does not support shared libraries.
586 config BR2_STATIC_LIBS
589 Build and use only static libraries. No shared libraries will
590 be installed on the target. This potentially increases your
591 code size and should only be used if you know what you are
592 doing. Note that some packages may not be available when this
593 option is enabled, due to their need for dynamic library
596 config BR2_SHARED_LIBS
598 depends on BR2_BINFMT_SUPPORTS_SHARED
600 Build and use only shared libraries. This is the recommended
601 solution as it saves space and build time.
603 config BR2_SHARED_STATIC_LIBS
604 bool "both static and shared"
605 depends on BR2_BINFMT_SUPPORTS_SHARED
607 Build both shared and static libraries, but link executables
608 dynamically. While building both shared and static libraries
609 take more time and more disk space, having static libraries
610 may be useful to link some of the applications statically.
615 config BR2_PACKAGE_OVERRIDE_FILE
616 string "location of a package override file"
617 default "$(CONFIG_DIR)/local.mk"
619 A package override file is a short makefile that contains
620 variable definitions of the form <pkg>_OVERRIDE_SRCDIR, which
621 allows to tell Buildroot to use an existing directory as the
622 source directory for a particular package. See the Buildroot
623 documentation for more details on this feature.
625 config BR2_GLOBAL_PATCH_DIR
626 string "global patch directories"
628 You may specify a space separated list of one or more
629 directories containing global package patches. For a specific
630 version <packageversion> of a specific package <packagename>,
631 patches are applied as follows:
633 First, the default Buildroot patch set for the package is
634 applied from the package's directory in Buildroot.
636 Then for every directory - <global-patch-dir> - that exists in
637 BR2_GLOBAL_PATCH_DIR, if the directory
638 <global-patch-dir>/<packagename>/<packageversion>/ exists,
639 then all *.patch files in this directory will be applied.
641 Otherwise, if the directory <global-patch-dir>/<packagename>
642 exists, then all *.patch files in the directory will be
647 config BR2_COMPILER_PARANOID_UNSAFE_PATH
648 bool "paranoid check of library/header paths"
651 By default, when this option is disabled, when the Buildroot
652 cross-compiler will encounter an unsafe library or header path
653 (such as /usr/include, or /usr/lib), the compiler will display
656 By enabling this option, this warning is turned into an error,
657 which will completely abort the build when such unsafe paths
660 Note that this mechanism is available for both the internal
661 toolchain (through the toolchain wrapper and binutils patches)
662 and external toolchain backends (through the toolchain wrapper).
664 config BR2_REPRODUCIBLE
665 bool "Make the build reproducible (experimental)"
666 # SOURCE_DATE_EPOCH support in toolchain-wrapper requires GCC 4.4
667 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
669 This option will remove all sources of non-reproducibility
670 from the build process. For a given Buildroot configuration,
671 this allows to generate exactly identical binaries from one
672 build to the other, including on different machines.
674 The current implementation is restricted to builds with the
675 same output directory. Many (absolute) paths are recorded in
676 intermediary files, and it is very likely that some of these
677 paths leak into the target rootfs. If you build with the
678 same O=... path, however, the result is identical.
680 This is labeled as an experimental feature, as not all
681 packages behave properly to ensure reproducibility.
685 comment "Security Hardening Options"
688 bool "Stack Smashing Protection"
689 default BR2_SSP_ALL if BR2_ENABLE_SSP # legacy
690 depends on BR2_TOOLCHAIN_HAS_SSP
692 Enable stack smashing protection support using GCC's
693 -fstack-protector option family.
696 http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
699 Note that this requires the toolchain to have SSP support.
700 This is always the case for glibc and eglibc toolchain, but is
701 optional in uClibc toolchains.
706 Disable stack-smashing protection.
708 config BR2_SSP_REGULAR
709 bool "-fstack-protector"
711 Emit extra code to check for buffer overflows, such as stack
712 smashing attacks. This is done by adding a guard variable to
713 functions with vulnerable objects. This includes functions
714 that call alloca, and functions with buffers larger than 8
715 bytes. The guards are initialized when a function is entered
716 and then checked when the function exits. If a guard check
717 fails, an error message is printed and the program exits.
719 config BR2_SSP_STRONG
720 bool "-fstack-protector-strong"
721 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
723 Like -fstack-protector but includes additional functions to be
724 protected - those that have local array definitions, or have
725 references to local frame addresses.
727 comment "Stack Smashing Protection strong needs a toolchain w/ gcc >= 4.9"
728 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
731 bool "-fstack-protector-all"
733 Like -fstack-protector except that all functions are
734 protected. This option might have a significant performance
735 impact on the compiled binaries.
739 comment "Stack Smashing Protection needs a toolchain w/ SSP"
740 depends on !BR2_TOOLCHAIN_HAS_SSP
743 bool "RELRO Protection"
744 depends on BR2_SHARED_LIBS
746 Enable a link-time protection know as RELRO (RELocation Read Only)
747 which helps to protect from certain type of exploitation techniques
748 altering the content of some ELF sections.
750 config BR2_RELRO_NONE
753 Disables Relocation link-time protections.
755 config BR2_RELRO_PARTIAL
758 This option makes the dynamic section not writeable after
759 initialization (with almost no performance penalty).
761 config BR2_RELRO_FULL
764 This option includes the partial configuration, but also
765 marks the GOT as read-only at the cost of initialization time
766 during program loading, i.e every time an executable is started.
770 comment "RELocation Read Only (RELRO) needs shared libraries"
771 depends on !BR2_SHARED_LIBS
774 bool "Buffer-overflow Detection (FORTIFY_SOURCE)"
775 depends on BR2_TOOLCHAIN_USES_GLIBC
776 depends on !BR2_OPTIMIZE_0
778 Enable the _FORTIFY_SOURCE macro which introduces additional
779 checks to detect buffer-overflows in the following standard library
780 functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
781 strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
784 NOTE: This feature requires an optimization level of s/1/2/3/g
786 Support for this feature has been present since GCC 4.x.
788 config BR2_FORTIFY_SOURCE_NONE
791 Disables additional checks to detect buffer-overflows.
793 config BR2_FORTIFY_SOURCE_1
796 This option sets _FORTIFY_SOURCE to 1 and only introduces
797 checks that shouldn't change the behavior of conforming
798 programs. Adds checks at compile-time only.
800 config BR2_FORTIFY_SOURCE_2
803 This option sets _FORTIFY_SOURCES to 2 and some more
804 checking is added, but some conforming programs might fail.
805 Also adds checks at run-time (detected buffer overflow
806 terminates the program)
810 comment "Fortify Source needs a glibc toolchain and optimization"
811 depends on (!BR2_TOOLCHAIN_USES_GLIBC || BR2_OPTIMIZE_0)
814 source "toolchain/Config.in"
816 source "system/Config.in"
818 source "linux/Config.in"
820 source "package/Config.in"
822 source "fs/Config.in"
824 source "boot/Config.in"
826 source "package/Config.in.host"
828 source "Config.in.legacy"
830 source "$BR2_BUILD_DIR/.br2-external.in"