Config.in 26 KB

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