Config-build.in 8.2 KB

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