Config-build.in 8.3 KB

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