Config-build.in 6.7 KB

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