Config.in 27 KB

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