Config-build.in 7.1 KB

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