Config-build.in 8.3 KB

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