Config.in 31 KB

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