Config.in 27 KB

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