1
0

Config-build.in 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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 n
  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 libreCMC 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 IPK_FILES_CHECKSUMS
  59. bool
  60. prompt "Record files checksums in package metadata"
  61. default n
  62. help
  63. This makes file checksums part of package metadata. It increases size
  64. but provides you with pkg_check command to check for flash coruptions.
  65. config INCLUDE_CONFIG
  66. bool "Include build configuration in firmware" if DEVEL
  67. default n
  68. help
  69. If enabled, config.seed will be stored in /etc/build.config of firmware.
  70. config COLLECT_KERNEL_DEBUG
  71. bool
  72. prompt "Collect kernel debug information"
  73. select KERNEL_DEBUG_INFO
  74. default BUILDBOT
  75. help
  76. This collects debugging symbols from the kernel and all compiled modules.
  77. Useful for release builds, so that kernel issues can be debugged offline
  78. later.
  79. menu "Kernel build options"
  80. source "config/Config-kernel.in"
  81. endmenu
  82. comment "Package build options"
  83. config DEBUG
  84. bool
  85. prompt "Compile packages with debugging info"
  86. default n
  87. help
  88. Adds -g3 to the CFLAGS.
  89. config IPV6
  90. bool
  91. prompt "Enable IPv6 support in packages"
  92. default y
  93. help
  94. Enables IPv6 support in kernel (builtin) and packages.
  95. comment "Stripping options"
  96. choice
  97. prompt "Binary stripping method"
  98. default USE_STRIP if EXTERNAL_TOOLCHAIN
  99. default USE_STRIP if USE_GLIBC
  100. default USE_SSTRIP
  101. help
  102. Select the binary stripping method you wish to use.
  103. config NO_STRIP
  104. bool "none"
  105. help
  106. This will install unstripped binaries (useful for native
  107. compiling/debugging).
  108. config USE_STRIP
  109. bool "strip"
  110. help
  111. This will install binaries stripped using strip from binutils.
  112. config USE_SSTRIP
  113. bool "sstrip"
  114. depends on !USE_GLIBC
  115. help
  116. This will install binaries stripped using sstrip.
  117. endchoice
  118. config STRIP_ARGS
  119. string
  120. prompt "Strip arguments"
  121. depends on USE_STRIP
  122. default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
  123. default "--strip-all"
  124. help
  125. Specifies arguments passed to the strip command when stripping binaries.
  126. config STRIP_KERNEL_EXPORTS
  127. bool "Strip unnecessary exports from the kernel image"
  128. help
  129. Reduces kernel size by stripping unused kernel exports from the kernel
  130. image. Note that this might make the kernel incompatible with any kernel
  131. modules that were not selected at the time the kernel image was created.
  132. config USE_MKLIBS
  133. bool "Strip unnecessary functions from libraries"
  134. help
  135. Reduces libraries to only those functions that are necessary for using all
  136. selected packages (including those selected as <M>). Note that this will
  137. make the system libraries incompatible with most of the packages that are
  138. not selected during the build process.
  139. choice
  140. prompt "Preferred standard C++ library"
  141. default USE_LIBSTDCXX if USE_GLIBC
  142. default USE_UCLIBCXX
  143. help
  144. Select the preferred standard C++ library for all packages that support this.
  145. config USE_UCLIBCXX
  146. bool "uClibc++"
  147. config USE_LIBSTDCXX
  148. bool "libstdc++"
  149. endchoice
  150. comment "Hardening build options"
  151. config PKG_CHECK_FORMAT_SECURITY
  152. bool
  153. prompt "Enable gcc format-security"
  154. default y
  155. help
  156. Add -Wformat -Werror=format-security to the CFLAGS. You can disable
  157. this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
  158. Makefile.
  159. config PKG_ASLR_PIE
  160. bool
  161. prompt "User space ASLR PIE compilation"
  162. select BUSYBOX_DEFAULT_PIE
  163. default n
  164. help
  165. Add -fPIC to CFLAGS and -specs=hardened-build-ld to LDFLAGS.
  166. This enables package build as Position Independent Executables (PIE)
  167. to protect against "return-to-text" attacks. This belongs to the
  168. feature of Address Space Layout Randomisation (ASLR), which is
  169. implemented by the kernel and the ELF loader by randomising the
  170. location of memory allocations. This makes memory addresses harder
  171. to predict when an attacker is attempting a memory-corruption exploit.
  172. You can disable this per package by adding PKG_ASLR_PIE:=0 in the package
  173. Makefile.
  174. choice
  175. prompt "User space Stack-Smashing Protection"
  176. depends on USE_MUSL
  177. default PKG_CC_STACKPROTECTOR_REGULAR
  178. help
  179. Enable GCC Stack Smashing Protection (SSP) for userspace applications
  180. config PKG_CC_STACKPROTECTOR_NONE
  181. bool "None"
  182. config PKG_CC_STACKPROTECTOR_REGULAR
  183. bool "Regular"
  184. select GCC_LIBSSP if !USE_MUSL
  185. depends on KERNEL_CC_STACKPROTECTOR_REGULAR
  186. config PKG_CC_STACKPROTECTOR_STRONG
  187. bool "Strong"
  188. select GCC_LIBSSP if !USE_MUSL
  189. depends on !GCC_VERSION_4_8
  190. depends on KERNEL_CC_STACKPROTECTOR_STRONG
  191. endchoice
  192. choice
  193. prompt "Kernel space Stack-Smashing Protection"
  194. default KERNEL_CC_STACKPROTECTOR_REGULAR
  195. depends on USE_MUSL || !(x86_64 || i386)
  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_8
  204. bool "Strong"
  205. endchoice
  206. config KERNEL_STACKPROTECTOR
  207. bool
  208. default KERNEL_CC_STACKPROTECTOR_REGULAR || KERNEL_CC_STACKPROTECTOR_STRONG
  209. config KERNEL_STACKPROTECTOR_STRONG
  210. bool
  211. default KERNEL_CC_STACKPROTECTOR_STRONG
  212. choice
  213. prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
  214. default PKG_FORTIFY_SOURCE_1
  215. help
  216. Enable the _FORTIFY_SOURCE macro which introduces additional
  217. checks to detect buffer-overflows in the following standard library
  218. functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
  219. strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
  220. gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
  221. checks that shouldn't change the behavior of conforming programs,
  222. while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
  223. added, but some conforming programs might fail.
  224. config PKG_FORTIFY_SOURCE_NONE
  225. bool "None"
  226. config PKG_FORTIFY_SOURCE_1
  227. bool "Conservative"
  228. config PKG_FORTIFY_SOURCE_2
  229. bool "Aggressive"
  230. endchoice
  231. choice
  232. prompt "Enable RELRO protection"
  233. default PKG_RELRO_FULL
  234. help
  235. Enable a link-time protection known as RELRO (Relocation Read Only)
  236. which helps to protect from certain type of exploitation techniques
  237. altering the content of some ELF sections. "Partial" RELRO makes the
  238. .dynamic section not writeable after initialization, introducing
  239. almost no performance penalty, while "full" RELRO also marks the GOT
  240. as read-only at the cost of initializing all of it at startup.
  241. config PKG_RELRO_NONE
  242. bool "None"
  243. config PKG_RELRO_PARTIAL
  244. bool "Partial"
  245. config PKG_RELRO_FULL
  246. bool "Full"
  247. endchoice
  248. endmenu