Config.in 31 KB

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