Config-build.in 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. # Copyright (C) 2006-2013 OpenWrt.org
  2. # Copyright (C) 2016 LEDE Project
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. menu "Global build settings"
  8. config ALL_NONSHARED
  9. bool "Select all target specific packages by default"
  10. default ALL
  11. config ALL_KMODS
  12. bool "Select all kernel module packages by default"
  13. default ALL
  14. config ALL
  15. bool "Select all userspace packages by default"
  16. default n
  17. config SIGNED_PACKAGES
  18. bool "Cryptographically signed package lists"
  19. default y
  20. comment "General build options"
  21. config DISPLAY_SUPPORT
  22. bool "Show packages that require graphics support (local or remote)"
  23. default n
  24. config BUILD_PATENTED
  25. default y
  26. bool "Compile with support for patented functionality"
  27. help
  28. When this option is disabled, software which provides patented functionality
  29. will not be built. In case software provides optional support for patented
  30. functionality, this optional support will get disabled for this package.
  31. config BUILD_NLS
  32. default n
  33. bool "Compile with full language support"
  34. help
  35. When this option is enabled, packages are built with the full versions of
  36. iconv and GNU gettext instead of the default OpenWrt stubs. If uClibc is
  37. used, it is also built with locale support.
  38. config SHADOW_PASSWORDS
  39. bool
  40. prompt "Enable shadow password support"
  41. default y
  42. help
  43. Enable shadow password support.
  44. config CLEAN_IPKG
  45. bool
  46. prompt "Remove ipkg/opkg status data files in final images"
  47. default n
  48. help
  49. This removes all ipkg/opkg status data files from the target directory
  50. before building the root filesystem.
  51. config COLLECT_KERNEL_DEBUG
  52. bool
  53. prompt "Collect kernel debug information"
  54. select KERNEL_DEBUG_INFO
  55. default n
  56. help
  57. This collects debugging symbols from the kernel and all compiled modules.
  58. Useful for release builds, so that kernel issues can be debugged offline
  59. later.
  60. comment "Kernel build options"
  61. source "config/Config-kernel.in"
  62. comment "Package build options"
  63. config DEBUG
  64. bool
  65. prompt "Compile packages with debugging info"
  66. default n
  67. help
  68. Adds -g3 to the CFLAGS.
  69. config IPV6
  70. bool
  71. prompt "Enable IPv6 support in packages"
  72. default y
  73. help
  74. Enables IPv6 support in kernel (builtin) and packages.
  75. config PKG_BUILD_PARALLEL
  76. bool
  77. prompt "Compile certain packages parallelized"
  78. default y
  79. help
  80. This adds a -jX option to certain packages that are known to behave well
  81. for parallel build. By default, the package make processes use the main
  82. jobserver, in which case this option only takes effect when you add -jX
  83. to the make command.
  84. If you are unsure, select N.
  85. config PKG_BUILD_USE_JOBSERVER
  86. bool
  87. prompt "Use top-level make jobserver for packages"
  88. depends on PKG_BUILD_PARALLEL
  89. default y
  90. help
  91. This passes the main make process jobserver fds to package builds,
  92. enabling full parallelization across different packages.
  93. Note that disabling this may overcommit CPU resources depending on the
  94. -j level of the main make process, the number of package submake jobs
  95. selected below and the number of actual CPUs present.
  96. Example: If the main make is passed a -j4 and the submake -j
  97. is also set to 4, we may end up with 16 parallel make processes
  98. in the worst case.
  99. config PKG_BUILD_JOBS
  100. int
  101. prompt "Number of package submake jobs (2-512)"
  102. range 2 512
  103. default 2
  104. depends on PKG_BUILD_PARALLEL && !PKG_BUILD_USE_JOBSERVER
  105. help
  106. The number of jobs (-jX) to pass to packages submake.
  107. config PKG_DEFAULT_PARALLEL
  108. bool
  109. prompt "Parallelize the default package build rule (May break build)"
  110. depends on PKG_BUILD_PARALLEL
  111. depends on BROKEN
  112. default n
  113. help
  114. Always set the default package build rules to parallel build.
  115. WARNING: This may break build or kill your cat, as it builds packages
  116. with multiple jobs that are probably not tested in a parallel build
  117. environment.
  118. Only say Y if you don't mind fixing broken packages. Before reporting
  119. build bugs, set this to N and re-run the build.
  120. comment "Stripping options"
  121. choice
  122. prompt "Binary stripping method"
  123. default USE_STRIP if EXTERNAL_TOOLCHAIN
  124. default USE_STRIP if USE_GLIBC
  125. default USE_SSTRIP
  126. help
  127. Select the binary stripping method you wish to use.
  128. config NO_STRIP
  129. bool "none"
  130. help
  131. This will install unstripped binaries (useful for native
  132. compiling/debugging).
  133. config USE_STRIP
  134. bool "strip"
  135. help
  136. This will install binaries stripped using strip from binutils.
  137. config USE_SSTRIP
  138. bool "sstrip"
  139. depends on !USE_GLIBC
  140. help
  141. This will install binaries stripped using sstrip.
  142. endchoice
  143. config STRIP_ARGS
  144. string
  145. prompt "Strip arguments"
  146. depends on USE_STRIP
  147. default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
  148. default "--strip-all"
  149. help
  150. Specifies arguments passed to the strip command when stripping binaries.
  151. config STRIP_KERNEL_EXPORTS
  152. bool "Strip unnecessary exports from the kernel image"
  153. help
  154. Reduces kernel size by stripping unused kernel exports from the kernel
  155. image. Note that this might make the kernel incompatible with any kernel
  156. modules that were not selected at the time the kernel image was created.
  157. config USE_MKLIBS
  158. bool "Strip unnecessary functions from libraries"
  159. help
  160. Reduces libraries to only those functions that are necessary for using all
  161. selected packages (including those selected as <M>). Note that this will
  162. make the system libraries incompatible with most of the packages that are
  163. not selected during the build process.
  164. choice
  165. prompt "Preferred standard C++ library"
  166. default USE_LIBSTDCXX if USE_GLIBC
  167. default USE_UCLIBCXX
  168. help
  169. Select the preferred standard C++ library for all packages that support this.
  170. config USE_UCLIBCXX
  171. bool "uClibc++"
  172. config USE_LIBSTDCXX
  173. bool "libstdc++"
  174. endchoice
  175. comment "Hardening build options"
  176. config PKG_CHECK_FORMAT_SECURITY
  177. bool
  178. prompt "Enable gcc format-security"
  179. default y
  180. help
  181. Add -Wformat -Werror=format-security to the CFLAGS. You can disable
  182. this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
  183. Makefile.
  184. choice
  185. prompt "User space Stack-Smashing Protection"
  186. depends on USE_MUSL
  187. default PKG_CC_STACKPROTECTOR_REGULAR
  188. help
  189. Enable GCC Stack Smashing Protection (SSP) for userspace applications
  190. config PKG_CC_STACKPROTECTOR_NONE
  191. bool "None"
  192. config PKG_CC_STACKPROTECTOR_REGULAR
  193. bool "Regular"
  194. select SSP_SUPPORT if !USE_MUSL
  195. depends on KERNEL_CC_STACKPROTECTOR_REGULAR
  196. config PKG_CC_STACKPROTECTOR_STRONG
  197. bool "Strong"
  198. select SSP_SUPPORT if !USE_MUSL
  199. depends on GCC_VERSION_5
  200. depends on KERNEL_CC_STACKPROTECTOR_STRONG
  201. endchoice
  202. choice
  203. prompt "Kernel space Stack-Smashing Protection"
  204. default KERNEL_CC_STACKPROTECTOR_REGULAR
  205. depends on USE_MUSL || !(x86_64 || i386)
  206. help
  207. Enable GCC Stack-Smashing Protection (SSP) for the kernel
  208. config KERNEL_CC_STACKPROTECTOR_NONE
  209. bool "None"
  210. config KERNEL_CC_STACKPROTECTOR_REGULAR
  211. bool "Regular"
  212. config KERNEL_CC_STACKPROTECTOR_STRONG
  213. depends on GCC_VERSION_5
  214. bool "Strong"
  215. endchoice
  216. choice
  217. prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
  218. default PKG_FORTIFY_SOURCE_1
  219. help
  220. Enable the _FORTIFY_SOURCE macro which introduces additional
  221. checks to detect buffer-overflows in the following standard library
  222. functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
  223. strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
  224. gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
  225. checks that shouldn't change the behavior of conforming programs,
  226. while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
  227. added, but some conforming programs might fail.
  228. config PKG_FORTIFY_SOURCE_NONE
  229. bool "None"
  230. config PKG_FORTIFY_SOURCE_1
  231. bool "Conservative"
  232. config PKG_FORTIFY_SOURCE_2
  233. bool "Aggressive"
  234. endchoice
  235. choice
  236. prompt "Enable RELRO protection"
  237. default PKG_RELRO_FULL
  238. help
  239. Enable a link-time protection known as RELRO (Relocation Read Only)
  240. which helps to protect from certain type of exploitation techniques
  241. altering the content of some ELF sections. "Partial" RELRO makes the
  242. .dynamic section not writeable after initialization, introducing
  243. almost no performance penalty, while "full" RELRO also marks the GOT
  244. as read-only at the cost of initializing all of it at startup.
  245. config PKG_RELRO_NONE
  246. bool "None"
  247. config PKG_RELRO_PARTIAL
  248. bool "Partial"
  249. config PKG_RELRO_FULL
  250. bool "Full"
  251. endchoice
  252. endmenu