Config.in 25 KB

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