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