Config.in 31 KB

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