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