]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - Config.in
toolchain: refactor Stack Smashing Protection support
[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 # Hidden boolean selected by pre-built packages for x86, when they
18 # need to run on x86-64 machines (example: pre-built external
19 # toolchains, binary tools like SAM-BA, etc.).
20 config BR2_HOSTARCH_NEEDS_IA32_LIBS
21         bool
22
23 source "arch/Config.in"
24
25 menu "Build options"
26
27 menu "Commands"
28
29 config BR2_WGET
30         string "Wget command"
31         default "wget --passive-ftp -nd -t 3"
32
33 config BR2_SVN
34         string "Subversion (svn) command"
35         default "svn"
36
37 config BR2_BZR
38         string "Bazaar (bzr) command"
39         default "bzr"
40
41 config BR2_GIT
42         string "Git command"
43         default "git"
44
45 config BR2_CVS
46         string "CVS command"
47         default "cvs"
48
49 config BR2_LOCALFILES
50         string "Local files retrieval command"
51         default "cp"
52
53 config BR2_SCP
54         string "Secure copy (scp) command"
55         default "scp"
56
57 config BR2_SSH
58         string "Secure shell (ssh) command"
59         default "ssh"
60
61 config BR2_HG
62         string "Mercurial (hg) command"
63         default "hg"
64
65 config BR2_ZCAT
66         string "zcat command"
67         default "gzip -d -c"
68         help
69           Command to be used to extract a gzip'ed file to stdout.
70           zcat is identical to gunzip -c except that the former may
71           not be available on your system.
72           Default is "gzip -d -c"
73           Other possible values include "gunzip -c" or "zcat".
74
75 config BR2_BZCAT
76         string "bzcat command"
77         default "bzcat"
78         help
79           Command to be used to extract a bzip2'ed file to stdout.
80           bzcat is identical to bunzip2 -c except that the former may
81           not be available on your system.
82           Default is "bzcat"
83           Other possible values include "bunzip2 -c" or "bzip2 -d -c".
84
85 config BR2_XZCAT
86         string "xzcat command"
87         default "xzcat"
88         help
89           Command to be used to extract a xz'ed file to stdout.
90           Default is "xzcat"
91
92 config BR2_TAR_OPTIONS
93         string "Tar options"
94         default ""
95         help
96           Options to pass to tar when extracting the sources.
97           E.g. " -v --exclude='*.svn*'" to exclude all .svn internal files
98           and to be verbose.
99
100 endmenu
101
102 config BR2_DEFCONFIG_FROM_ENV
103         string
104         option env="BR2_DEFCONFIG"
105
106 config BR2_DEFCONFIG
107         string "Location to save buildroot config"
108         default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != ""
109         default "$(CONFIG_DIR)/defconfig"
110         help
111           When running 'make savedefconfig', the defconfig file will be saved
112           in this location.
113
114 config BR2_DL_DIR
115         string "Download dir"
116         default "$(TOPDIR)/dl"
117         help
118           Directory to store all the source files that we need to fetch.
119           If the Linux shell environment has defined the BUILDROOT_DL_DIR
120           environment variable, then this overrides this configuration item.
121
122           The default is $(TOPDIR)/dl
123
124 config BR2_HOST_DIR
125         string "Host dir"
126         default "$(BASE_DIR)/host"
127         help
128           Directory to store all the binary files that are built for the host.
129           This includes the cross compilation toolchain when building the
130           internal buildroot toolchain.
131
132           The default is $(BASE_DIR)/host
133
134 menu "Mirrors and Download locations"
135
136 config BR2_PRIMARY_SITE
137         string "Primary download site"
138         default ""
139         help
140           Primary site to download from. If this option is set then buildroot
141           will try to download package source first from this site and try the
142           default if the file is not found.
143           Valid URIs are URIs recognized by $(WGET) and scp URIs of the form
144           scp://[user@]host:path.
145           NOTE: This works for all packages using the central package
146           infrastructure (generic, autotools, cmake, ...)
147
148 config BR2_PRIMARY_SITE_ONLY
149         bool "Only allow downloads from primary download site"
150         depends on BR2_PRIMARY_SITE != ""
151         help
152           If this option is enabled, downloads will only be attempted
153           from the primary download site. Other locations, like the
154           package's official download location or the backup download
155           site, will not be considered. Therefore, if the package is
156           not present on the primary site, the download fails.
157
158           This is useful for project developers who want to ensure
159           that the project can be built even if the upstream tarball
160           locations disappear.
161
162 if !BR2_PRIMARY_SITE_ONLY
163
164 config BR2_BACKUP_SITE
165         string "Backup download site"
166         default "http://sources.buildroot.net/"
167         help
168           Backup site to download from. If this option is set then buildroot
169           will fall back to download package sources from here if the
170           normal location fails.
171
172 config BR2_KERNEL_MIRROR
173         string "Kernel.org mirror"
174         default "http://www.kernel.org/pub/"
175         help
176           kernel.org is mirrored on a number of servers around the world.
177           The following allows you to select your preferred mirror.
178
179           Have a look on the kernel.org site for a list of mirrors, then enter
180           the URL to the base directory.  Examples:
181
182              http://www.XX.kernel.org/pub (XX = country code)
183              http://mirror.aarnet.edu.au/pub/ftp.kernel.org
184
185 config BR2_GNU_MIRROR
186         string "GNU Software mirror"
187         default "http://ftp.gnu.org/pub/gnu"
188         help
189           GNU has multiple software mirrors scattered around the world.
190           The following allows you to select your preferred mirror.
191
192           Have a look on the gnu.org site for a list of mirrors, then enter
193           the URL to the base directory.  Examples:
194
195              http://ftp.gnu.org/pub/gnu
196              http://mirror.aarnet.edu.au/pub/gnu
197
198 config BR2_DEBIAN_MIRROR
199         string "Debian Software mirror"
200         default "http://ftp.debian.org"
201         help
202           Debian has multiple software mirrors scattered around the world.
203           The following allows you to select your preferred mirror.
204
205           Usually, just add your country code like XX here:
206           http://ftp.XX.debian.org
207
208 endif
209
210 endmenu
211
212 config BR2_JLEVEL
213         int "Number of jobs to run simultaneously (0 for auto)"
214         default "0"
215         help
216           Number of jobs to run simultaneously.  If 0, determine
217           automatically according to number of CPUs on the host
218           system.
219
220 config BR2_CCACHE
221         bool "Enable compiler cache"
222         help
223           This option will enable the use of ccache, a compiler
224           cache. It will cache the result of previous builds to speed
225           up future builds. The cache is stored in
226           $HOME/.buildroot-ccache.
227
228           Note that Buildroot does not try to invalidate the cache
229           contents when the compiler changes in an incompatible
230           way. Therefore, if you make a change to the compiler version
231           and/or configuration, you are responsible for purging the
232           ccache cache by removing the $HOME/.buildroot-ccache
233           directory.
234
235 config BR2_CCACHE_DIR
236         string "Compiler cache location"
237         depends on BR2_CCACHE
238         default "$(HOME)/.buildroot-ccache"
239         help
240           Where ccache should store cached files.
241
242 config BR2_DEPRECATED
243         bool "Show packages that are deprecated or obsolete"
244         help
245           This option hides outdated/obsolete versions of packages.
246
247 config BR2_ENABLE_DEBUG
248         bool "build packages with debugging symbols"
249         help
250           Build packages with debugging symbols enabled. All libraries
251           and binaries in the 'staging' directory will have debugging
252           symbols, which allows remote debugging even if libraries and
253           binaries are stripped on the target. Whether libraries and
254           binaries are stripped on the target is controlled by the
255           BR2_STRIP_* options below.
256
257 if BR2_ENABLE_DEBUG
258 choice
259         prompt "gcc debug level"
260         default BR2_DEBUG_2
261         help
262           Set the debug level for gcc
263
264 config BR2_DEBUG_1
265         bool "debug level 1"
266         help
267           Debug level 1 produces minimal information, enough
268           for making backtraces in parts of the program that
269           you don't plan to debug. This includes descriptions
270           of functions and external variables, but no information
271           about local variables and no line numbers.
272
273 config BR2_DEBUG_2
274         bool "debug level 2"
275         help
276           The default gcc debug level is 2
277
278 config BR2_DEBUG_3
279         bool "debug level 3"
280         help
281           Level 3 includes extra information, such as all the
282           macro definitions present in the program. Some debuggers
283           support macro expansion when you use -g3.
284 endchoice
285 endif
286
287 choice
288         prompt "strip command for binaries on target"
289         default BR2_STRIP_strip
290
291 config BR2_STRIP_strip
292         bool "strip"
293         depends on !BR2_PACKAGE_HOST_ELF2FLT
294         help
295           Binaries and libraries in the target filesystem will be
296           stripped using the normal 'strip' command. This allows to
297           save space, mainly by removing debugging symbols. Debugging
298           symbols on the target are needed for native debugging, but
299           not when remote debugging is used.
300
301 config BR2_STRIP_sstrip
302         bool "sstrip"
303         select BR2_PACKAGE_SSTRIP_HOST
304         depends on !BR2_PACKAGE_HOST_ELF2FLT
305         help
306           Binaries and libraries in the target filesystem will be
307           stripped using the 'sstrip' command, which strips a little
308           bit more than the traditional 'strip' command. This allows to
309           save space, mainly by removing debugging symbols. Debugging
310           symbols on the target are needed for native debugging, but
311           not when remote debugging is used.
312
313 config BR2_STRIP_none
314         bool "none"
315         help
316           Do not strip binaries and libraries in the target
317           filesystem.
318 endchoice
319
320 config BR2_STRIP_EXCLUDE_FILES
321         string "executables that should not be stripped"
322         depends on !BR2_STRIP_none
323         default ""
324         help
325           You may specify a space-separated list of binaries and libraries
326           here that should not be stripped on the target.
327
328 config BR2_STRIP_EXCLUDE_DIRS
329         string "directories that should be skipped when stripping"
330         depends on !BR2_STRIP_none
331         default ""
332         help
333           You may specify a space-separated list of directories that should
334           be skipped when stripping. Binaries and libraries in these
335           directories will not be touched.
336           The directories should be specified relative to the target directory,
337           without leading slash.
338
339 choice
340         prompt "gcc optimization level"
341         default BR2_OPTIMIZE_S
342         help
343           Set the optimization level for gcc
344
345 config BR2_OPTIMIZE_0
346         bool "optimization level 0"
347         help
348           Do not optimize. This is the default.
349
350 config BR2_OPTIMIZE_1
351         bool "optimization level 1"
352         help
353           Optimize. Optimizing compilation takes somewhat more time,
354           and a lot more memory for a large function. With -O, the
355           compiler tries to reduce code size and execution time,
356           without performing any optimizations that take a great deal
357           of compilation time. -O turns on the following optimization
358           flags: -fdefer-pop -fdelayed-branch -fguess-branch-probability
359           -fcprop-registers -floop-optimize -fif-conversion
360           -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts
361           -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename
362           -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants
363           -O also turns on -fomit-frame-pointer on machines where doing
364           so does not interfere with debugging.
365
366 config BR2_OPTIMIZE_2
367         bool "optimization level 2"
368         help
369           Optimize even more. GCC performs nearly all supported optimizations
370           that do not involve a space-speed tradeoff. The compiler does not
371           perform loop unrolling or function inlining when you specify -O2.
372           As compared to -O, this option increases both compilation time and
373           the performance of the generated code. -O2 turns on all optimization
374           flags specified by -O. It also turns on the following optimization
375           flags: -fthread-jumps -fcrossjumping -foptimize-sibling-calls
376           -fcse-follow-jumps -fcse-skip-blocks -fgcse  -fgcse-lm
377           -fexpensive-optimizations -fstrength-reduce -frerun-cse-after-loop
378           -frerun-loop-opt -fcaller-saves -fpeephole2 -fschedule-insns
379           -fschedule-insns2 -fsched-interblock -fsched-spec -fregmove
380           -fstrict-aliasing -fdelete-null-pointer-checks -freorder-blocks
381           -freorder-functions -falign-functions -falign-jumps -falign-loops
382           -falign-labels -ftree-vrp -ftree-pre
383           Please note the warning under -fgcse about invoking -O2 on programs
384           that use computed gotos.
385
386 config BR2_OPTIMIZE_3
387         bool "optimization level 3"
388         help
389           Optimize yet more. -O3 turns on all optimizations specified by -O2
390           and also turns on the -finline-functions, -funswitch-loops and
391           -fgcse-after-reload options.
392
393 config BR2_OPTIMIZE_S
394         bool "optimize for size"
395         help
396           Optimize for size. -Os enables all -O2 optimizations that do not
397           typically increase code size. It also performs further optimizations
398           designed to reduce code size. -Os disables the following optimization
399           flags: -falign-functions -falign-jumps -falign-loops -falign-labels
400           -freorder-blocks -freorder-blocks-and-partition -fprefetch-loop-arrays
401           -ftree-vect-loop-version
402
403 endchoice
404
405 config BR2_ENABLE_SSP
406         bool "build code with Stack Smashing Protection"
407         depends on BR2_TOOLCHAIN_HAS_SSP
408         help
409           Enable stack smashing protection support using GCCs
410           -fstack-protector-all option.
411
412           See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
413           for details.
414
415           Note that this requires the toolchain to have SSP
416           support. This is always the case for glibc and eglibc
417           toolchain, but is optional in uClibc toolchains.
418
419 comment "enabling Stack Smashing Protection requires support in the toolchain"
420         depends on !BR2_TOOLCHAIN_HAS_SSP
421
422 config BR2_PREFER_STATIC_LIB
423         bool "prefer static libraries"
424         help
425           Where possible, build and use static libraries for the target.
426           This potentially increases your code size and should only be
427           used if you know what you do.
428           The default is to build dynamic libraries and use those on
429           the target filesystem.
430
431           WARNING: This is highly experimental at the moment.
432
433 config BR2_HAVE_DOCUMENTATION
434         bool "documentation on the target"
435         # We no longer want to support a toolchain on the target
436         depends on BR2_DEPRECATED
437         help
438           Install the documentation, including manual pages and info
439           pages, on the target.
440           If you say n here, your target will not contain any
441           documentation.
442
443 config BR2_PACKAGE_OVERRIDE_FILE
444         string "location of a package override file"
445         default "$(TOPDIR)/local.mk"
446         help
447           A package override file is a short makefile that contains
448           variable definitions of the form <pkg>_OVERRIDE_SRCDIR,
449           which allows to tell Buildroot to use an existing directory
450           as the source directory for a particular package. See the
451           Buildroot documentation for more details on this feature.
452
453 config BR2_GLOBAL_PATCH_DIR
454         string "global patch directory"
455         help
456           You may specify a directory containing global package patches.
457           For a specific version <packageversion> of a specific package
458           <packagename>, patches are applied as follows.
459
460           First, the default Buildroot patch set for the package is applied.
461
462           If the directory $(BR2_GLOBAL_PATCH_DIR)/<packagename>/<packageversion>
463           exists, then all *.patch files in the directory will be applied.
464
465           Otherwise, if the directory $(BR2_GLOBAL_PATCH_DIR)/<packagename> exists,
466           then all *.patch files in the directory will be applied.
467
468 endmenu
469
470 source "toolchain/Config.in"
471
472 source "system/Config.in"
473
474 source "linux/Config.in"
475
476 source "package/Config.in"
477
478 source "fs/Config.in"
479
480 source "boot/Config.in"
481
482 source "package/Config.in.host"
483
484 source "Config.in.legacy"