Config.in 30 KB

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