blob: ccd777e8bb00e56cec09a61f630dda8773e31d28 [file] [log] [blame]
Eric Andersen2d523c22004-10-09 01:06:03 +00001#
2
Peter Korsgaard6a53b722011-02-02 14:53:23 +01003mainmenu "Buildroot $BR2_VERSION Configuration"
Eric Andersen2d523c22004-10-09 01:06:03 +00004
5config BR2_HAVE_DOT_CONFIG
6 bool
7 default y
8
Bernhard Reutner-Fischerf5b8cd42007-09-25 11:37:31 +00009config BR2_VERSION
10 string
Yann E. MORIN56c68bc2010-10-31 17:35:14 +010011 option env="BR2_VERSION_FULL"
Bernhard Reutner-Fischerf5b8cd42007-09-25 11:37:31 +000012
Francois Perrad1d4104f2012-07-18 15:59:09 +020013config BR2_HOSTARCH
14 string
15 option env="HOSTARCH"
16
Yann E. MORIN4802db32016-07-17 12:34:26 +020017config BR2_BUILD_DIR
18 string
19 option env="BUILD_DIR"
20
Arnout Vandecappelle12825f72015-12-31 01:34:13 +010021# Hidden config symbols for packages to check system gcc version
22config BR2_HOST_GCC_VERSION
23 string
24 option env="HOST_GCC_VERSION"
25
Thomas Petazzonie488b562016-10-26 21:11:34 +020026config BR2_HOST_GCC_AT_LEAST_4_5
27 bool
28 default y if BR2_HOST_GCC_VERSION = "4 5"
29
Bernd Kuhls8fce6d72016-03-19 21:25:35 +010030config BR2_HOST_GCC_AT_LEAST_4_6
31 bool
32 default y if BR2_HOST_GCC_VERSION = "4 6"
Thomas Petazzonie488b562016-10-26 21:11:34 +020033 select BR2_HOST_GCC_AT_LEAST_4_5
Bernd Kuhls8fce6d72016-03-19 21:25:35 +010034
Arnout Vandecappelle12825f72015-12-31 01:34:13 +010035config BR2_HOST_GCC_AT_LEAST_4_7
36 bool
37 default y if BR2_HOST_GCC_VERSION = "4 7"
Bernd Kuhls8fce6d72016-03-19 21:25:35 +010038 select BR2_HOST_GCC_AT_LEAST_4_6
Arnout Vandecappelle12825f72015-12-31 01:34:13 +010039
40config 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
45config 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
50config 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
Martin Bark3d217572016-06-06 11:18:14 +010055config 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
Maxime Hadjinlianaac3d2b2014-02-18 00:37:12 +010060# Hidden boolean selected by packages in need of Java in order to build
61# (example: xbmc)
Maxime Hadjinlian0721c712014-02-19 16:33:50 +010062config BR2_NEEDS_HOST_JAVA
Maxime Hadjinlianaac3d2b2014-02-18 00:37:12 +010063 bool
64
Maxime Hadjinlian8f9da282014-05-04 00:45:44 +020065# Hidden boolean selected by packages in need of javac in order to build
66# (example: classpath)
67config BR2_NEEDS_HOST_JAVAC
68 bool
69
70# Hidden boolean selected by packages in need of jar in order to build
71# (example: classpath)
72config BR2_NEEDS_HOST_JAR
73 bool
74
Thomas Petazzoni70d60372012-12-29 06:14:49 +000075# Hidden boolean selected by pre-built packages for x86, when they
76# need to run on x86-64 machines (example: pre-built external
77# toolchains, binary tools like SAM-BA, etc.).
78config BR2_HOSTARCH_NEEDS_IA32_LIBS
79 bool
80
Thomas Petazzoni0e4bc502013-11-11 17:47:25 +010081# Hidden boolean selected by packages that need to build 32 bits
82# binaries with the host compiler, even on 64 bits build machines (e.g
83# bootloaders).
84config BR2_HOSTARCH_NEEDS_IA32_COMPILER
85 bool
86
Yann E. MORINde0df992016-12-04 10:43:04 +010087# Hidden boolean selected by packages that need the host to have an
88# UTF8 locale.
89config BR2_NEEDS_HOST_UTF8_LOCALE
90 bool
91
Thomas Petazzoni79ee3c12012-11-03 08:27:59 +000092source "arch/Config.in"
Bernhard Reutner-Fischer7d8a59b2007-07-08 16:28:54 +000093
Eric Andersen8e5fb3f2004-12-11 13:01:10 +000094menu "Build options"
95
Thomas Petazzoni15929262010-04-10 22:55:01 +020096menu "Commands"
97
Eric Andersen2d523c22004-10-09 01:06:03 +000098config BR2_WGET
Eric Andersen8e5fb3f2004-12-11 13:01:10 +000099 string "Wget command"
Peter Korsgaard6871b162010-11-04 19:16:43 +0100100 default "wget --passive-ftp -nd -t 3"
Eric Andersen2d523c22004-10-09 01:06:03 +0000101
Maxime Petazzonicf711112010-09-02 12:09:45 +0200102config BR2_SVN
103 string "Subversion (svn) command"
104 default "svn"
Eric Andersene30cf262005-01-23 11:20:30 +0000105
Maxime Petazzonicf711112010-09-02 12:09:45 +0200106config BR2_BZR
107 string "Bazaar (bzr) command"
108 default "bzr"
Sven Neumanndf03cda2009-08-07 11:57:54 +0200109
Ulf Samuelsson85f54fb2007-08-24 05:31:07 +0000110config BR2_GIT
Maxime Petazzonicf711112010-09-02 12:09:45 +0200111 string "Git command"
112 default "git"
Ulf Samuelsson85f54fb2007-08-24 05:31:07 +0000113
Gustavo Zacarias15eb1fa2013-09-11 09:12:04 -0300114config BR2_CVS
115 string "CVS command"
116 default "cvs"
117
David Wagner2690e762011-09-29 21:57:46 +0200118config BR2_LOCALFILES
119 string "Local files retrieval command"
120 default "cp"
121
Thomas De Schampheleirec61788f2011-10-19 09:25:40 +0200122config BR2_SCP
123 string "Secure copy (scp) command"
124 default "scp"
125
126config BR2_SSH
127 string "Secure shell (ssh) command"
128 default "ssh"
129
Thomas De Schampheleiref694c072011-10-19 09:25:47 +0200130config BR2_HG
131 string "Mercurial (hg) command"
132 default "hg"
133
Bernhard Reutner-Fischer859b9132006-10-01 15:07:45 +0000134config BR2_ZCAT
135 string "zcat command"
Bernhard Reutner-Fischera9612bf2007-03-09 08:26:10 +0000136 default "gzip -d -c"
Bernhard Reutner-Fischer859b9132006-10-01 15:07:45 +0000137 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700138 Command to be used to extract a gzip'ed file to stdout. zcat
139 is identical to gunzip -c except that the former may not be
140 available on your system.
Bernhard Reutner-Fischera9612bf2007-03-09 08:26:10 +0000141 Default is "gzip -d -c"
142 Other possible values include "gunzip -c" or "zcat".
Bernhard Reutner-Fischer6e2823c2006-11-17 15:43:51 +0000143
144config BR2_BZCAT
145 string "bzcat command"
146 default "bzcat"
147 help
148 Command to be used to extract a bzip2'ed file to stdout.
149 bzcat is identical to bunzip2 -c except that the former may
150 not be available on your system.
151 Default is "bzcat"
152 Other possible values include "bunzip2 -c" or "bzip2 -d -c".
Bernhard Reutner-Fischer859b9132006-10-01 15:07:45 +0000153
Allan W. Nielsen177b4b42011-05-10 08:17:05 +0200154config BR2_XZCAT
155 string "xzcat command"
156 default "xzcat"
157 help
158 Command to be used to extract a xz'ed file to stdout.
159 Default is "xzcat"
160
Bernhard Reutner-Fischerce90aae2005-12-10 14:59:02 +0000161config BR2_TAR_OPTIONS
162 string "Tar options"
Bernhard Reutner-Fischer7df4de62005-12-10 15:36:43 +0000163 default ""
164 help
165 Options to pass to tar when extracting the sources.
166 E.g. " -v --exclude='*.svn*'" to exclude all .svn internal files
167 and to be verbose.
Bernhard Reutner-Fischerce90aae2005-12-10 14:59:02 +0000168
Thomas Petazzoni15929262010-04-10 22:55:01 +0200169endmenu
170
Arnout Vandecappelle (Essensium/Mind)4e0170d2013-02-06 21:50:57 +0000171config BR2_DEFCONFIG_FROM_ENV
172 string
173 option env="BR2_DEFCONFIG"
174
175config BR2_DEFCONFIG
176 string "Location to save buildroot config"
177 default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != ""
178 default "$(CONFIG_DIR)/defconfig"
179 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700180 When running 'make savedefconfig', the defconfig file will be
181 saved in this location.
Arnout Vandecappelle (Essensium/Mind)4e0170d2013-02-06 21:50:57 +0000182
Mike Frysinger59a63a92005-10-01 00:35:24 +0000183config BR2_DL_DIR
184 string "Download dir"
H Hartley Sweetenbe695dc2009-09-23 08:46:52 +0200185 default "$(TOPDIR)/dl"
Mike Frysinger59a63a92005-10-01 00:35:24 +0000186 help
187 Directory to store all the source files that we need to fetch.
Arnout Vandecappelle67680212014-02-04 16:18:51 +0100188 If the Linux shell environment has defined the BR2_DL_DIR
Martin Kelly65f9b932016-05-31 09:57:22 -0700189 environment variable, then this overrides this configuration
190 item.
Mike Frysinger59a63a92005-10-01 00:35:24 +0000191
H Hartley Sweetenbe695dc2009-09-23 08:46:52 +0200192 The default is $(TOPDIR)/dl
Bernhard Reutner-Fischer4b0d5a82007-09-26 21:12:38 +0000193
Gustavo Zacariasa2b4f7f2011-02-02 10:05:56 -0300194config BR2_HOST_DIR
195 string "Host dir"
196 default "$(BASE_DIR)/host"
197 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700198 Directory to store all the binary files that are built for the
199 host. This includes the cross compilation toolchain when
200 building the internal buildroot toolchain.
Gustavo Zacariasa2b4f7f2011-02-02 10:05:56 -0300201
202 The default is $(BASE_DIR)/host
203
Thomas Petazzoni80080072010-12-05 21:52:37 +0100204menu "Mirrors and Download locations"
205
206config BR2_PRIMARY_SITE
207 string "Primary download site"
208 default ""
209 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700210 Primary site to download from. If this option is set then
211 buildroot will try to download package source first from this
212 site and try the default if the file is not found.
Jérôme Pouiller4a9d9802015-11-18 10:03:25 +0100213 Valid URIs are:
214 - URIs recognized by $(WGET)
215 - local URIs of the form file://absolutepath
216 - scp URIs of the form scp://[user@]host:path.
Thomas Petazzoni80080072010-12-05 21:52:37 +0100217
Thomas De Schampheleire5a83e082012-06-22 07:37:03 +0200218config BR2_PRIMARY_SITE_ONLY
219 bool "Only allow downloads from primary download site"
220 depends on BR2_PRIMARY_SITE != ""
221 help
222 If this option is enabled, downloads will only be attempted
223 from the primary download site. Other locations, like the
224 package's official download location or the backup download
Martin Kelly65f9b932016-05-31 09:57:22 -0700225 site, will not be considered. Therefore, if the package is not
226 present on the primary site, the download fails.
Thomas De Schampheleire5a83e082012-06-22 07:37:03 +0200227
Martin Kelly65f9b932016-05-31 09:57:22 -0700228 This is useful for project developers who want to ensure that
229 the project can be built even if the upstream tarball
Thomas De Schampheleire5a83e082012-06-22 07:37:03 +0200230 locations disappear.
231
232if !BR2_PRIMARY_SITE_ONLY
233
Thomas Petazzoni80080072010-12-05 21:52:37 +0100234config BR2_BACKUP_SITE
235 string "Backup download site"
Peter Seiderer4a9eb202014-02-21 23:33:36 +0100236 default "http://sources.buildroot.net"
Thomas Petazzoni80080072010-12-05 21:52:37 +0100237 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700238 Backup site to download from. If this option is set then
239 buildroot will fall back to download package sources from here
240 if the normal location fails.
Thomas Petazzoni80080072010-12-05 21:52:37 +0100241
Thomas Petazzoni80080072010-12-05 21:52:37 +0100242config BR2_KERNEL_MIRROR
243 string "Kernel.org mirror"
Alexey Brodkinde76cb72016-05-23 18:36:53 +0300244 default "https://cdn.kernel.org/pub"
Thomas Petazzoni80080072010-12-05 21:52:37 +0100245 help
Alexey Brodkinde76cb72016-05-23 18:36:53 +0300246 kernel.org is mirrored on a number of servers around the
Martin Kelly65f9b932016-05-31 09:57:22 -0700247 world. The following allows you to select your preferred
Alexey Brodkinde76cb72016-05-23 18:36:53 +0300248 mirror. By default, a CDN is used, which automatically
249 redirects to a mirror geographically close to you.
Thomas Petazzoni80080072010-12-05 21:52:37 +0100250
Martin Kelly65f9b932016-05-31 09:57:22 -0700251 Have a look on the kernel.org site for a list of mirrors, then
252 enter the URL to the base directory. Examples:
Thomas Petazzoni80080072010-12-05 21:52:37 +0100253
254 http://www.XX.kernel.org/pub (XX = country code)
255 http://mirror.aarnet.edu.au/pub/ftp.kernel.org
256
257config BR2_GNU_MIRROR
258 string "GNU Software mirror"
Thomas Petazzoni3999f0a2016-05-24 20:48:26 +0200259 default "http://ftpmirror.gnu.org"
Thomas Petazzoni80080072010-12-05 21:52:37 +0100260 help
Thomas Petazzoni3999f0a2016-05-24 20:48:26 +0200261 GNU has multiple software mirrors scattered around the
Martin Kelly65f9b932016-05-31 09:57:22 -0700262 world. The following allows you to select your preferred
Thomas Petazzoni3999f0a2016-05-24 20:48:26 +0200263 mirror. By default, a generic address is used, which
264 automatically selects an up-to-date and local mirror.
Thomas Petazzoni80080072010-12-05 21:52:37 +0100265
Martin Kelly65f9b932016-05-31 09:57:22 -0700266 Have a look on the gnu.org site for a list of mirrors, then
267 enter the URL to the base directory. Examples:
Thomas Petazzoni80080072010-12-05 21:52:37 +0100268
269 http://ftp.gnu.org/pub/gnu
270 http://mirror.aarnet.edu.au/pub/gnu
271
Francois Perrad72afb292014-01-11 16:42:07 +0100272config BR2_LUAROCKS_MIRROR
273 string "LuaRocks mirror"
Francois Perrad0b8411a2014-07-25 20:21:24 +0200274 default "http://rocks.moonscript.org"
Francois Perrad72afb292014-01-11 16:42:07 +0100275 help
276 LuaRocks repository.
277
278 See http://luarocks.org
279
Francois Perrad9fbb1692014-02-23 15:17:16 +0100280config BR2_CPAN_MIRROR
281 string "CPAN mirror (Perl packages)"
Yann E. MORIN32567d12014-07-19 12:09:19 +0200282 default "http://cpan.metacpan.org"
Francois Perrad9fbb1692014-02-23 15:17:16 +0100283 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700284 CPAN (Comprehensive Perl Archive Network) is a repository of
285 Perl packages. It has multiple software mirrors scattered
Francois Perrad9fbb1692014-02-23 15:17:16 +0100286 around the world. This option allows you to select a mirror.
287
288 The list of mirrors is available at:
289 http://search.cpan.org/mirror
290
Yann E. MORIN3318a5a2015-07-14 09:42:40 +0200291endif
292
Thomas Petazzoni80080072010-12-05 21:52:37 +0100293endmenu
Thomas Petazzoniaa41d372010-04-10 22:55:38 +0200294
Eric Andersen8e5fb3f2004-12-11 13:01:10 +0000295config BR2_JLEVEL
Nathan Lynch5016aa02012-06-16 09:37:17 +0000296 int "Number of jobs to run simultaneously (0 for auto)"
297 default "0"
Eric Andersen8e5fb3f2004-12-11 13:01:10 +0000298 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700299 Number of jobs to run simultaneously. If 0, determine
300 automatically according to number of CPUs on the host system.
Bernhard Reutner-Fischer93ab6d32007-01-28 12:03:58 +0000301
Thomas Petazzoni17b66af2010-12-07 21:09:56 +0100302config BR2_CCACHE
303 bool "Enable compiler cache"
304 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700305 This option will enable the use of ccache, a compiler cache.
306 It will cache the result of previous builds to speed up future
307 builds. By default, the cache is stored in
Thomas Petazzoni17b66af2010-12-07 21:09:56 +0100308 $HOME/.buildroot-ccache.
309
Thomas Petazzonif044e032012-03-07 20:26:50 +0100310 Note that Buildroot does not try to invalidate the cache
Martin Kelly65f9b932016-05-31 09:57:22 -0700311 contents when the compiler changes in an incompatible way.
312 Therefore, if you make a change to the compiler version and/or
313 configuration, you are responsible for purging the ccache
314 cache by removing the $HOME/.buildroot-ccache directory.
Thomas Petazzonif044e032012-03-07 20:26:50 +0100315
Danomi Manchegodd79f2d2014-04-30 22:05:07 -0400316if BR2_CCACHE
317
Thomas De Schampheleire43329072012-05-16 21:39:28 +0200318config BR2_CCACHE_DIR
319 string "Compiler cache location"
Thomas De Schampheleire43329072012-05-16 21:39:28 +0200320 default "$(HOME)/.buildroot-ccache"
321 help
322 Where ccache should store cached files.
323
Danomi Manchegodd79f2d2014-04-30 22:05:07 -0400324config BR2_CCACHE_INITIAL_SETUP
325 string "Compiler cache initial setup"
326 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700327 Initial ccache settings to apply, such as --max-files or
328 --max-size.
Danomi Manchegodd79f2d2014-04-30 22:05:07 -0400329
Martin Kelly65f9b932016-05-31 09:57:22 -0700330 For example, if your project is known to require more space
331 than the default max cache size, then you might want to
332 increase the cache size to a suitable amount using the -M
333 (--max-size) option.
Danomi Manchegodd79f2d2014-04-30 22:05:07 -0400334
Martin Kelly65f9b932016-05-31 09:57:22 -0700335 The string you specify here is passed verbatim to ccache.
336 Refer to ccache documentation for more details.
Danomi Manchegodd79f2d2014-04-30 22:05:07 -0400337
Martin Kelly65f9b932016-05-31 09:57:22 -0700338 These initial settings are applied after ccache has been
339 compiled.
Danomi Manchegodd79f2d2014-04-30 22:05:07 -0400340
Arnout Vandecappelle1e97b272015-10-04 16:25:32 +0100341config BR2_CCACHE_USE_BASEDIR
342 bool "Use relative paths"
343 default y
344 help
345 Allow ccache to convert absolute paths within the output
346 directory into relative paths.
347
Martin Kelly65f9b932016-05-31 09:57:22 -0700348 During the build, many -I include directives are given with an
349 absolute path. These absolute paths end up in the hashes that
350 are computed by ccache. Therefore, when you build from a
351 different directory, the hash will be different and the cached
352 object will not be used.
Arnout Vandecappelle1e97b272015-10-04 16:25:32 +0100353
354 To improve cache performance, set this option to y. This
355 allows ccache to rewrite absolute paths within the output
Martin Kelly65f9b932016-05-31 09:57:22 -0700356 directory into relative paths. Note that only paths within the
357 output directory will be rewritten; therefore, if you change
358 BR2_HOST_DIR to point outside the output directory and
Arnout Vandecappelle1e97b272015-10-04 16:25:32 +0100359 subsequently move it to a different location, this will lead
360 to cache misses.
361
362 This option has as a result that the debug information in the
363 object files also has only relative paths. Therefore, make
364 sure you cd to the build directory before starting gdb. See
Martin Kelly65f9b932016-05-31 09:57:22 -0700365 the section "COMPILING IN DIFFERENT DIRECTORIES" in the ccache
366 manual for more information.
Arnout Vandecappelle1e97b272015-10-04 16:25:32 +0100367
Danomi Manchegodd79f2d2014-04-30 22:05:07 -0400368endif
369
John Voltz41f6b792008-03-12 13:07:10 +0000370config BR2_ENABLE_DEBUG
371 bool "build packages with debugging symbols"
John Voltz41f6b792008-03-12 13:07:10 +0000372 help
Thomas Petazzonia9a34672012-03-14 23:49:58 +0100373 Build packages with debugging symbols enabled. All libraries
374 and binaries in the 'staging' directory will have debugging
375 symbols, which allows remote debugging even if libraries and
376 binaries are stripped on the target. Whether libraries and
377 binaries are stripped on the target is controlled by the
378 BR2_STRIP_* options below.
John Voltz41f6b792008-03-12 13:07:10 +0000379
380if BR2_ENABLE_DEBUG
381choice
382 prompt "gcc debug level"
383 default BR2_DEBUG_2
384 help
385 Set the debug level for gcc
386
387config BR2_DEBUG_1
388 bool "debug level 1"
389 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700390 Debug level 1 produces minimal information, enough for making
391 backtraces in parts of the program that you don't plan to
392 debug. This includes descriptions of functions and external
393 variables, but no information about local variables and no
394 line numbers.
John Voltz41f6b792008-03-12 13:07:10 +0000395
396config BR2_DEBUG_2
397 bool "debug level 2"
398 help
399 The default gcc debug level is 2
400
401config BR2_DEBUG_3
402 bool "debug level 3"
403 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700404 Level 3 includes extra information, such as all the macro
405 definitions present in the program. Some debuggers support
406 macro expansion when you use -g3.
John Voltz41f6b792008-03-12 13:07:10 +0000407endchoice
408endif
409
Bernhard Reutner-Fischerbbd251a2007-07-31 18:06:50 +0000410choice
Thomas Petazzonia9a34672012-03-14 23:49:58 +0100411 prompt "strip command for binaries on target"
Bernhard Reutner-Fischerbbd251a2007-07-31 18:06:50 +0000412 default BR2_STRIP_strip
Bernhard Reutner-Fischerbbd251a2007-07-31 18:06:50 +0000413
414config BR2_STRIP_strip
415 bool "strip"
Axel Lin9f2bf302013-09-03 17:39:53 +0800416 depends on !BR2_PACKAGE_HOST_ELF2FLT
Bernhard Reutner-Fischerbbd251a2007-07-31 18:06:50 +0000417 help
Thomas Petazzonia9a34672012-03-14 23:49:58 +0100418 Binaries and libraries in the target filesystem will be
Martin Kelly65f9b932016-05-31 09:57:22 -0700419 stripped using the normal 'strip' command. This allows to save
420 space, mainly by removing debugging symbols. Debugging symbols
421 on the target are needed for native debugging, but not when
422 remote debugging is used.
Ulf Samuelsson85f54fb2007-08-24 05:31:07 +0000423
Bernhard Reutner-Fischerbbd251a2007-07-31 18:06:50 +0000424config BR2_STRIP_none
425 bool "none"
426 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700427 Do not strip binaries and libraries in the target filesystem.
Bernhard Reutner-Fischerbbd251a2007-07-31 18:06:50 +0000428endchoice
429
Thomas De Schampheleire2a970452012-06-21 19:34:50 +0000430config BR2_STRIP_EXCLUDE_FILES
431 string "executables that should not be stripped"
432 depends on !BR2_STRIP_none
433 default ""
434 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700435 You may specify a space-separated list of binaries and
436 libraries here that should not be stripped on the target.
Thomas De Schampheleire2a970452012-06-21 19:34:50 +0000437
438config BR2_STRIP_EXCLUDE_DIRS
439 string "directories that should be skipped when stripping"
440 depends on !BR2_STRIP_none
441 default ""
442 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700443 You may specify a space-separated list of directories that
444 should be skipped when stripping. Binaries and libraries in
445 these directories will not be touched. The directories should
446 be specified relative to the target directory, without leading
447 slash.
Thomas De Schampheleire2a970452012-06-21 19:34:50 +0000448
John Voltz41f6b792008-03-12 13:07:10 +0000449choice
450 prompt "gcc optimization level"
John Voltz7eb796b2008-03-16 13:26:14 +0000451 default BR2_OPTIMIZE_S
John Voltz923f42a2008-03-12 11:23:11 +0000452 help
John Voltz41f6b792008-03-12 13:07:10 +0000453 Set the optimization level for gcc
454
455config BR2_OPTIMIZE_0
456 bool "optimization level 0"
457 help
Peter Korsgaard02a623d2008-08-04 19:07:05 +0000458 Do not optimize. This is the default.
John Voltz41f6b792008-03-12 13:07:10 +0000459
460config BR2_OPTIMIZE_1
461 bool "optimization level 1"
462 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700463 Optimize. Optimizing compilation takes somewhat more time, and
464 a lot more memory for a large function. With -O, the compiler
465 tries to reduce code size and execution time, without
466 performing any optimizations that take a great deal of
467 compilation time. -O turns on the following optimization
Peter Korsgaard02a623d2008-08-04 19:07:05 +0000468 flags: -fdefer-pop -fdelayed-branch -fguess-branch-probability
469 -fcprop-registers -floop-optimize -fif-conversion
470 -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts
471 -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename
Martin Kelly65f9b932016-05-31 09:57:22 -0700472 -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants. -O
473 also turns on -fomit-frame-pointer on machines where doing so
474 does not interfere with debugging.
John Voltz41f6b792008-03-12 13:07:10 +0000475
476config BR2_OPTIMIZE_2
477 bool "optimization level 2"
478 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700479 Optimize even more. GCC performs nearly all supported
480 optimizations that do not involve a space-speed tradeoff. The
481 compiler does not perform loop unrolling or function inlining
482 when you specify -O2. As compared to -O, this option increases
483 both compilation time and the performance of the generated
484 code. -O2 turns on all optimization flags specified by -O. It
485 also turns on the following optimization flags:
486 -fthread-jumps -fcrossjumping -foptimize-sibling-calls
Peter Korsgaard02a623d2008-08-04 19:07:05 +0000487 -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm
Martin Kelly65f9b932016-05-31 09:57:22 -0700488 -fexpensive-optimizations -fstrength-reduce
489 -frerun-cse-after-loop -frerun-loop-opt -fcaller-saves
490 -fpeephole2 -fschedule-insns -fschedule-insns2
491 -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing
492 -fdelete-null-pointer-checks -freorder-blocks
493 -freorder-functions -falign-functions -falign-jumps
494 -falign-loops -falign-labels -ftree-vrp -ftree-pre. Please
495 note the warning under -fgcse about invoking -O2 on programs
John Voltz41f6b792008-03-12 13:07:10 +0000496 that use computed gotos.
497
498config BR2_OPTIMIZE_3
499 bool "optimization level 3"
500 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700501 Optimize yet more. -O3 turns on all optimizations specified by
502 -O2 and also turns on the -finline-functions, -funswitch-loops
503 and -fgcse-after-reload options.
John Voltz41f6b792008-03-12 13:07:10 +0000504
Martin Kelly5ff84592016-05-18 14:17:55 -0700505config BR2_OPTIMIZE_G
506 bool "optimize for debugging"
507 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
508 help
509 Optimize for debugging. This enables optimizations that do not
Martin Kelly65f9b932016-05-31 09:57:22 -0700510 interfere with debugging. It should be the optimization level
511 of choice for the standard edit-compile-debug cycle, offering
512 a reasonable level of optimization while maintaining fast
513 compilation and a good debugging experience.
John Voltz41f6b792008-03-12 13:07:10 +0000514
515config BR2_OPTIMIZE_S
516 bool "optimize for size"
517 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700518 Optimize for size. -Os enables all -O2 optimizations that do
519 not typically increase code size. It also performs further
520 optimizations designed to reduce code size. -Os disables the
521 following optimization flags: -falign-functions -falign-jumps
522 -falign-loops -falign-labels -freorder-blocks
523 -freorder-blocks-and-partition -fprefetch-loop-arrays
John Voltz41f6b792008-03-12 13:07:10 +0000524 -ftree-vect-loop-version
Peter Korsgaard02a623d2008-08-04 19:07:05 +0000525
John Voltz41f6b792008-03-12 13:07:10 +0000526endchoice
John Voltz923f42a2008-03-12 11:23:11 +0000527
Pascal Huerst09a1a102014-07-31 22:08:55 +0200528config BR2_GOOGLE_BREAKPAD_ENABLE
529 bool "Enable google-breakpad support"
530 select BR2_PACKAGE_GOOGLE_BREAKPAD
531 depends on BR2_INSTALL_LIBSTDCPP
Romain Naour282ffec2016-12-21 23:07:07 +0100532 depends on BR2_HOST_GCC_AT_LEAST_4_8 # C++11
533 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
Gustavo Zacariase9ffb3b2016-09-14 21:46:29 -0300534 depends on BR2_USE_WCHAR
Thomas Petazzoni0bb39832016-09-19 16:50:46 +0200535 depends on BR2_TOOLCHAIN_HAS_THREADS
Gustavo Zacariase9ffb3b2016-09-14 21:46:29 -0300536 depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC)
Pascal Huerst09a1a102014-07-31 22:08:55 +0200537 depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS
538 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700539 This option will enable the use of google breakpad, a library
540 and tool suite that allows you to distribute an application to
541 users with compiler-provided debugging information removed,
542 record crashes in compact "minidump" files, send them back to
543 your server and produce C and C++ stack traces from these
544 minidumps. Breakpad can also write minidumps on request for
545 programs that have not crashed.
Pascal Huerst09a1a102014-07-31 22:08:55 +0200546
547if BR2_GOOGLE_BREAKPAD_ENABLE
548
549config BR2_GOOGLE_BREAKPAD_INCLUDE_FILES
550 string "List of executables and libraries to extract symbols from"
551 default ""
552 help
553 You may specify a space-separated list of binaries and
554 libraries with full paths relative to $(TARGET_DIR) of which
555 debug symbols will be dumped for further use with google
556 breakpad.
557
558 A directory structure that can be used by minidump-stackwalk
559 will be created at:
560
561 $(STAGING_DIR)/usr/share/google-breakpad-symbols
562
563endif
564
Steven Noonand29c7192015-12-27 12:07:31 +0100565choice
Thomas Petazzonic5866be2013-09-02 18:06:36 +0200566 bool "build code with Stack Smashing Protection"
Steven Noonand29c7192015-12-27 12:07:31 +0100567 default BR2_SSP_ALL if BR2_ENABLE_SSP # legacy
Thomas Petazzonic5866be2013-09-02 18:06:36 +0200568 depends on BR2_TOOLCHAIN_HAS_SSP
569 help
Steven Noonand29c7192015-12-27 12:07:31 +0100570 Enable stack smashing protection support using GCC's
571 -fstack-protector option family.
Thomas Petazzonic5866be2013-09-02 18:06:36 +0200572
Martin Kelly65f9b932016-05-31 09:57:22 -0700573 See
574 http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
Thomas De Schampheleirebed4e272013-11-11 17:23:23 +0100575 for details.
Thomas Petazzonic5866be2013-09-02 18:06:36 +0200576
Martin Kelly65f9b932016-05-31 09:57:22 -0700577 Note that this requires the toolchain to have SSP support.
578 This is always the case for glibc and eglibc toolchain, but is
579 optional in uClibc toolchains.
Thomas Petazzonic5866be2013-09-02 18:06:36 +0200580
Steven Noonand29c7192015-12-27 12:07:31 +0100581config BR2_SSP_NONE
582 bool "None"
583 help
584 Disable stack-smashing protection.
585
586config BR2_SSP_REGULAR
587 bool "-fstack-protector"
588 help
589 Emit extra code to check for buffer overflows, such as stack
590 smashing attacks. This is done by adding a guard variable to
591 functions with vulnerable objects. This includes functions
592 that call alloca, and functions with buffers larger than 8
593 bytes. The guards are initialized when a function is entered
594 and then checked when the function exits. If a guard check
595 fails, an error message is printed and the program exits.
596
597config BR2_SSP_STRONG
598 bool "-fstack-protector-strong"
599 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
600 help
601 Like -fstack-protector but includes additional functions to be
602 protected - those that have local array definitions, or have
603 references to local frame addresses.
604
605comment "Stack Smashing Protection strong needs a toolchain w/ gcc >= 4.9"
606 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
607
608config BR2_SSP_ALL
609 bool "-fstack-protector-all"
610 help
611 Like -fstack-protector except that all functions are
612 protected. This option might have a significant performance
613 impact on the compiled binaries.
614
615endchoice
616
617comment "Stack Smashing Protection needs a toolchain w/ SSP"
Thomas Petazzonic5866be2013-09-02 18:06:36 +0200618 depends on !BR2_TOOLCHAIN_HAS_SSP
619
Thomas Petazzoni158001f2014-12-11 23:50:09 +0100620choice
621 bool "libraries"
Thomas Petazzonif1d3e092014-12-11 23:50:11 +0100622 default BR2_SHARED_LIBS if BR2_BINFMT_SUPPORTS_SHARED
Thomas Petazzoni158001f2014-12-11 23:50:09 +0100623 default BR2_STATIC_LIBS if !BR2_BINFMT_SUPPORTS_SHARED
Bernhard Reutner-Fischer3096f342007-06-01 22:16:28 +0000624 help
Thomas Petazzoni158001f2014-12-11 23:50:09 +0100625 Select the type of libraries you want to use on the target.
Bernhard Reutner-Fischer3096f342007-06-01 22:16:28 +0000626
Martin Kelly65f9b932016-05-31 09:57:22 -0700627 The default is to build dynamic libraries and use those on the
628 target filesystem, except when the architecture and/or the
629 selected binary format does not support shared libraries.
Alexey Brodkin7d9c0df2014-10-12 18:34:44 +0200630
Thomas Petazzoni158001f2014-12-11 23:50:09 +0100631config BR2_STATIC_LIBS
632 bool "static only"
633 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700634 Build and use only static libraries. No shared libraries will
Bernd Kuhlsd9312d62016-07-31 18:02:47 +0200635 be installed on the target. This potentially increases your
Martin Kelly65f9b932016-05-31 09:57:22 -0700636 code size and should only be used if you know what you are
637 doing. Note that some packages may not be available when this
638 option is enabled, due to their need for dynamic library
639 support.
Thomas Petazzoni158001f2014-12-11 23:50:09 +0100640
641config BR2_SHARED_LIBS
642 bool "shared only"
643 depends on BR2_BINFMT_SUPPORTS_SHARED
644 help
645 Build and use only shared libraries. This is the recommended
646 solution as it saves space and build time.
647
648config BR2_SHARED_STATIC_LIBS
649 bool "both static and shared"
650 depends on BR2_BINFMT_SUPPORTS_SHARED
651 help
652 Build both shared and static libraries, but link executables
653 dynamically. While building both shared and static libraries
654 take more time and more disk space, having static libraries
655 may be useful to link some of the applications statically.
656
657endchoice
Alexey Brodkin7d9c0df2014-10-12 18:34:44 +0200658
Bernhard Reutner-Fischer3096f342007-06-01 22:16:28 +0000659
Thomas Petazzoniee0246e2011-09-29 21:57:38 +0200660config BR2_PACKAGE_OVERRIDE_FILE
661 string "location of a package override file"
Yann E. MORINeda3d0e2014-01-29 22:48:24 +0100662 default "$(CONFIG_DIR)/local.mk"
Thomas Petazzoniee0246e2011-09-29 21:57:38 +0200663 help
664 A package override file is a short makefile that contains
Martin Kelly65f9b932016-05-31 09:57:22 -0700665 variable definitions of the form <pkg>_OVERRIDE_SRCDIR, which
666 allows to tell Buildroot to use an existing directory as the
667 source directory for a particular package. See the Buildroot
668 documentation for more details on this feature.
Thomas Petazzoniee0246e2011-09-29 21:57:38 +0200669
Simon Dawson5538e472013-03-17 23:13:47 +0000670config BR2_GLOBAL_PATCH_DIR
Ryan Barnettbc4f79d2013-12-18 04:25:01 -0600671 string "global patch directories"
Simon Dawson5538e472013-03-17 23:13:47 +0000672 help
Martin Kelly65f9b932016-05-31 09:57:22 -0700673 You may specify a space separated list of one or more
674 directories containing global package patches. For a specific
675 version <packageversion> of a specific package <packagename>,
676 patches are applied as follows:
Simon Dawson5538e472013-03-17 23:13:47 +0000677
Martin Kelly65f9b932016-05-31 09:57:22 -0700678 First, the default Buildroot patch set for the package is
679 applied from the package's directory in Buildroot.
Simon Dawson5538e472013-03-17 23:13:47 +0000680
Ryan Barnettbc4f79d2013-12-18 04:25:01 -0600681 Then for every directory - <global-patch-dir> - that exists in
682 BR2_GLOBAL_PATCH_DIR, if the directory
Martin Kelly65f9b932016-05-31 09:57:22 -0700683 <global-patch-dir>/<packagename>/<packageversion>/ exists,
684 then all *.patch files in this directory will be applied.
Simon Dawson5538e472013-03-17 23:13:47 +0000685
Martin Kelly65f9b932016-05-31 09:57:22 -0700686 Otherwise, if the directory <global-patch-dir>/<packagename>
687 exists, then all *.patch files in the directory will be
688 applied.
Simon Dawson5538e472013-03-17 23:13:47 +0000689
Thomas Petazzoni4ac8f782014-12-10 23:53:57 +0100690menu "Advanced"
691
692config BR2_COMPILER_PARANOID_UNSAFE_PATH
693 bool "paranoid check of library/header paths"
Romain Naour61c88542016-05-15 12:26:00 +0200694 default y
Thomas Petazzoni4ac8f782014-12-10 23:53:57 +0100695 help
696 By default, when this option is disabled, when the Buildroot
Martin Kelly65f9b932016-05-31 09:57:22 -0700697 cross-compiler will encounter an unsafe library or header path
698 (such as /usr/include, or /usr/lib), the compiler will display
699 a warning.
Thomas Petazzoni4ac8f782014-12-10 23:53:57 +0100700
Martin Kelly65f9b932016-05-31 09:57:22 -0700701 By enabling this option, this warning is turned into an error,
702 which will completely abort the build when such unsafe paths
703 are encountered.
Thomas Petazzoni4ac8f782014-12-10 23:53:57 +0100704
705 Note that this mechanism is available for both the internal
Romain Naourf9d311e2016-05-15 12:26:01 +0200706 toolchain (through the toolchain wrapper and binutils patches)
707 and external toolchain backends (through the toolchain wrapper).
Thomas Petazzoni4ac8f782014-12-10 23:53:57 +0100708
Gilles Chanteperdrix71574a62016-06-14 17:31:09 +0200709config BR2_REPRODUCIBLE
710 bool "Make the build reproducible (experimental)"
Jerzy Grzegoreka446ab72016-07-02 17:06:18 +0200711 help
712 This option will remove all sources of non-reproducibility
713 from the build process. For a given Buildroot configuration,
714 this allows to generate exactly identical binaries from one
715 build to the other, including on different machines.
Gilles Chanteperdrix71574a62016-06-14 17:31:09 +0200716
Jérôme Pouillerbedb1612016-11-23 13:58:56 +0100717 The current implementation is restricted to builds with the
718 same output directory. Many (absolute) paths are recorded in
719 intermediary files, and it is very likely that some of these
720 paths leak into the target rootfs. If you build with the
721 same O=... path, however, the result is identical.
722
Jerzy Grzegoreka446ab72016-07-02 17:06:18 +0200723 This is labeled as an experimental feature, as not all
724 packages behave properly to ensure reproducibility.
Gilles Chanteperdrix71574a62016-06-14 17:31:09 +0200725
Eric Andersen8e5fb3f2004-12-11 13:01:10 +0000726endmenu
Eric Andersen2d523c22004-10-09 01:06:03 +0000727
Yann E. MORIN1ac2cdd2016-08-25 19:19:46 +0200728endmenu
729
Bernhard Reutner-Fischer50100392007-09-25 07:55:45 +0000730source "toolchain/Config.in"
731
Thomas Petazzoni6c3e3ad2012-11-03 08:27:58 +0000732source "system/Config.in"
Thomas Petazzonibeb43c72010-12-05 21:52:44 +0100733
Yann E. MORIN24403852013-08-17 22:35:37 +0200734source "linux/Config.in"
Bernhard Reutner-Fischer50100392007-09-25 07:55:45 +0000735
Yann E. MORIN24403852013-08-17 22:35:37 +0200736source "package/Config.in"
Thomas Petazzonid06e8022012-01-28 18:42:49 +0100737
Thomas Petazzoni05852412010-03-10 22:30:06 +0100738source "fs/Config.in"
739
Thomas Petazzoni649b5b92010-03-14 18:20:45 +0100740source "boot/Config.in"
741
Yann E. MORIN24403852013-08-17 22:35:37 +0200742source "package/Config.in.host"
Arnout Vandecappelle (Essensium/Mind)ebcfa982012-11-12 10:08:28 +0000743
744source "Config.in.legacy"
Thomas Petazzoni8eb8aaf2013-12-05 20:11:11 +0100745
Yann E. MORIN4802db32016-07-17 12:34:26 +0200746source "$BR2_BUILD_DIR/.br2-external.in"