Config-build.in 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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 || BUILDBOT
  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 BUILDBOT
  18. bool "Set build defaults for automatic builds (e.g. via buildbot)"
  19. default n
  20. help
  21. This option changes several defaults to be more suitable for
  22. automatic builds. This includes the following changes:
  23. - Deleting build directories after compiling (to save space)
  24. - Enabling per-device rootfs support
  25. ...
  26. config SIGNED_PACKAGES
  27. bool "Cryptographically signed package lists"
  28. default y
  29. comment "General build options"
  30. config DISPLAY_SUPPORT
  31. bool "Show packages that require graphics support (local or remote)"
  32. default n
  33. config BUILD_PATENTED
  34. default y
  35. bool "Compile with support for patented functionality"
  36. help
  37. When this option is disabled, software which provides patented functionality
  38. will not be built. In case software provides optional support for patented
  39. functionality, this optional support will get disabled for this package.
  40. config BUILD_NLS
  41. default n
  42. bool "Compile with full language support"
  43. help
  44. When this option is enabled, packages are built with the full versions of
  45. iconv and GNU gettext instead of the default OpenWrt stubs. If uClibc is
  46. used, it is also built with locale support.
  47. config SHADOW_PASSWORDS
  48. bool
  49. default y
  50. config CLEAN_IPKG
  51. bool
  52. prompt "Remove ipkg/opkg status data files in final images"
  53. default n
  54. help
  55. This removes all ipkg/opkg status data files from the target directory
  56. before building the root filesystem.
  57. config INCLUDE_CONFIG
  58. bool "Include build configuration in firmware" if DEVEL
  59. default n
  60. help
  61. If enabled, config.seed will be stored in /etc/build.config of firmware.
  62. config COLLECT_KERNEL_DEBUG
  63. bool
  64. prompt "Collect kernel debug information"
  65. select KERNEL_DEBUG_INFO
  66. default BUILDBOT
  67. help
  68. This collects debugging symbols from the kernel and all compiled modules.
  69. Useful for release builds, so that kernel issues can be debugged offline
  70. later.
  71. menu "Kernel build options"
  72. source "config/Config-kernel.in"
  73. endmenu
  74. comment "Package build options"
  75. config DEBUG
  76. bool
  77. prompt "Compile packages with debugging info"
  78. default n
  79. help
  80. Adds -g3 to the CFLAGS.
  81. config IPV6
  82. bool
  83. prompt "Enable IPv6 support in packages"
  84. default y
  85. help
  86. Enables IPv6 support in kernel (builtin) and packages.
  87. comment "Stripping options"
  88. choice
  89. prompt "Binary stripping method"
  90. default USE_STRIP if EXTERNAL_TOOLCHAIN
  91. default USE_STRIP if USE_GLIBC
  92. default USE_SSTRIP
  93. help
  94. Select the binary stripping method you wish to use.
  95. config NO_STRIP
  96. bool "none"
  97. help
  98. This will install unstripped binaries (useful for native
  99. compiling/debugging).
  100. config USE_STRIP
  101. bool "strip"
  102. help
  103. This will install binaries stripped using strip from binutils.
  104. config USE_SSTRIP
  105. bool "sstrip"
  106. depends on !USE_GLIBC
  107. help
  108. This will install binaries stripped using sstrip.
  109. endchoice
  110. config STRIP_ARGS
  111. string
  112. prompt "Strip arguments"
  113. depends on USE_STRIP
  114. default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
  115. default "--strip-all"
  116. help
  117. Specifies arguments passed to the strip command when stripping binaries.
  118. config STRIP_KERNEL_EXPORTS
  119. bool "Strip unnecessary exports from the kernel image"
  120. help
  121. Reduces kernel size by stripping unused kernel exports from the kernel
  122. image. Note that this might make the kernel incompatible with any kernel
  123. modules that were not selected at the time the kernel image was created.
  124. config USE_MKLIBS
  125. bool "Strip unnecessary functions from libraries"
  126. help
  127. Reduces libraries to only those functions that are necessary for using all
  128. selected packages (including those selected as <M>). Note that this will
  129. make the system libraries incompatible with most of the packages that are
  130. not selected during the build process.
  131. choice
  132. prompt "Preferred standard C++ library"
  133. default USE_LIBSTDCXX if USE_GLIBC
  134. default USE_UCLIBCXX
  135. help
  136. Select the preferred standard C++ library for all packages that support this.
  137. config USE_UCLIBCXX
  138. bool "uClibc++"
  139. config USE_LIBSTDCXX
  140. bool "libstdc++"
  141. endchoice
  142. comment "Hardening build options"
  143. config PKG_CHECK_FORMAT_SECURITY
  144. bool
  145. prompt "Enable gcc format-security"
  146. default y
  147. help
  148. Add -Wformat -Werror=format-security to the CFLAGS. You can disable
  149. this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
  150. Makefile.
  151. choice
  152. prompt "User space Stack-Smashing Protection"
  153. depends on USE_MUSL
  154. default PKG_CC_STACKPROTECTOR_REGULAR
  155. help
  156. Enable GCC Stack Smashing Protection (SSP) for userspace applications
  157. config PKG_CC_STACKPROTECTOR_NONE
  158. bool "None"
  159. config PKG_CC_STACKPROTECTOR_REGULAR
  160. bool "Regular"
  161. select SSP_SUPPORT if !USE_MUSL
  162. depends on KERNEL_CC_STACKPROTECTOR_REGULAR
  163. config PKG_CC_STACKPROTECTOR_STRONG
  164. bool "Strong"
  165. select SSP_SUPPORT if !USE_MUSL
  166. depends on !GCC_VERSION_4_8
  167. depends on KERNEL_CC_STACKPROTECTOR_STRONG
  168. endchoice
  169. choice
  170. prompt "Kernel space Stack-Smashing Protection"
  171. default KERNEL_CC_STACKPROTECTOR_REGULAR
  172. depends on USE_MUSL || !(x86_64 || i386)
  173. help
  174. Enable GCC Stack-Smashing Protection (SSP) for the kernel
  175. config KERNEL_CC_STACKPROTECTOR_NONE
  176. bool "None"
  177. config KERNEL_CC_STACKPROTECTOR_REGULAR
  178. bool "Regular"
  179. config KERNEL_CC_STACKPROTECTOR_STRONG
  180. depends on !GCC_VERSION_4_8
  181. bool "Strong"
  182. endchoice
  183. choice
  184. prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
  185. default PKG_FORTIFY_SOURCE_1
  186. help
  187. Enable the _FORTIFY_SOURCE macro which introduces additional
  188. checks to detect buffer-overflows in the following standard library
  189. functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
  190. strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
  191. gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
  192. checks that shouldn't change the behavior of conforming programs,
  193. while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
  194. added, but some conforming programs might fail.
  195. config PKG_FORTIFY_SOURCE_NONE
  196. bool "None"
  197. config PKG_FORTIFY_SOURCE_1
  198. bool "Conservative"
  199. config PKG_FORTIFY_SOURCE_2
  200. bool "Aggressive"
  201. endchoice
  202. choice
  203. prompt "Enable RELRO protection"
  204. default PKG_RELRO_FULL
  205. help
  206. Enable a link-time protection known as RELRO (Relocation Read Only)
  207. which helps to protect from certain type of exploitation techniques
  208. altering the content of some ELF sections. "Partial" RELRO makes the
  209. .dynamic section not writeable after initialization, introducing
  210. almost no performance penalty, while "full" RELRO also marks the GOT
  211. as read-only at the cost of initializing all of it at startup.
  212. config PKG_RELRO_NONE
  213. bool "None"
  214. config PKG_RELRO_PARTIAL
  215. bool "Partial"
  216. config PKG_RELRO_FULL
  217. bool "Full"
  218. endchoice
  219. endmenu