Config.in 32 KB

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