Config.in 29 KB

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