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