1*4882a593Smuzhiyun# 2*4882a593Smuzhiyun 3*4882a593Smuzhiyunmainmenu "Buildroot $BR2_VERSION Configuration" 4*4882a593Smuzhiyun 5*4882a593Smuzhiyunconfig BR2_HAVE_DOT_CONFIG 6*4882a593Smuzhiyun bool 7*4882a593Smuzhiyun default y 8*4882a593Smuzhiyun 9*4882a593Smuzhiyunconfig BR2_VERSION 10*4882a593Smuzhiyun string 11*4882a593Smuzhiyun option env="BR2_VERSION_FULL" 12*4882a593Smuzhiyun 13*4882a593Smuzhiyunconfig BR2_HOSTARCH 14*4882a593Smuzhiyun string 15*4882a593Smuzhiyun option env="HOSTARCH" 16*4882a593Smuzhiyun 17*4882a593Smuzhiyunconfig BR2_BASE_DIR 18*4882a593Smuzhiyun string 19*4882a593Smuzhiyun option env="BASE_DIR" 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun# br2-external paths definitions 22*4882a593Smuzhiyunsource "$BR2_BASE_DIR/.br2-external.in.paths" 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun# Hidden config symbols for packages to check system gcc version 25*4882a593Smuzhiyunconfig BR2_HOST_GCC_VERSION 26*4882a593Smuzhiyun string 27*4882a593Smuzhiyun option env="HOST_GCC_VERSION" 28*4882a593Smuzhiyun 29*4882a593Smuzhiyunconfig BR2_HOST_GCC_AT_LEAST_4_9 30*4882a593Smuzhiyun bool 31*4882a593Smuzhiyun default y if BR2_HOST_GCC_VERSION = "4 9" 32*4882a593Smuzhiyun 33*4882a593Smuzhiyunconfig BR2_HOST_GCC_AT_LEAST_5 34*4882a593Smuzhiyun bool 35*4882a593Smuzhiyun default y if BR2_HOST_GCC_VERSION = "5" 36*4882a593Smuzhiyun select BR2_HOST_GCC_AT_LEAST_4_9 37*4882a593Smuzhiyun 38*4882a593Smuzhiyunconfig BR2_HOST_GCC_AT_LEAST_6 39*4882a593Smuzhiyun bool 40*4882a593Smuzhiyun default y if BR2_HOST_GCC_VERSION = "6" 41*4882a593Smuzhiyun select BR2_HOST_GCC_AT_LEAST_5 42*4882a593Smuzhiyun 43*4882a593Smuzhiyunconfig BR2_HOST_GCC_AT_LEAST_7 44*4882a593Smuzhiyun bool 45*4882a593Smuzhiyun default y if BR2_HOST_GCC_VERSION = "7" 46*4882a593Smuzhiyun select BR2_HOST_GCC_AT_LEAST_6 47*4882a593Smuzhiyun 48*4882a593Smuzhiyunconfig BR2_HOST_GCC_AT_LEAST_8 49*4882a593Smuzhiyun bool 50*4882a593Smuzhiyun default y if BR2_HOST_GCC_VERSION = "8" 51*4882a593Smuzhiyun select BR2_HOST_GCC_AT_LEAST_7 52*4882a593Smuzhiyun 53*4882a593Smuzhiyunconfig BR2_HOST_GCC_AT_LEAST_9 54*4882a593Smuzhiyun bool 55*4882a593Smuzhiyun default y if BR2_HOST_GCC_VERSION = "9" 56*4882a593Smuzhiyun select BR2_HOST_GCC_AT_LEAST_8 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun# When adding new entries above, be sure to update 59*4882a593Smuzhiyun# the HOSTCC_MAX_VERSION variable in the Makefile. 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun# Hidden boolean selected by packages in need of Java in order to build 62*4882a593Smuzhiyun# (example: kodi) 63*4882a593Smuzhiyunconfig BR2_NEEDS_HOST_JAVA 64*4882a593Smuzhiyun bool 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun# Hidden boolean selected by pre-built packages for x86, when they 67*4882a593Smuzhiyun# need to run on x86-64 machines (example: pre-built external 68*4882a593Smuzhiyun# toolchains, binary tools like SAM-BA, etc.). 69*4882a593Smuzhiyunconfig BR2_HOSTARCH_NEEDS_IA32_LIBS 70*4882a593Smuzhiyun bool 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun# Hidden boolean selected by packages that need to build 32 bits 73*4882a593Smuzhiyun# binaries with the host compiler, even on 64 bits build machines (e.g 74*4882a593Smuzhiyun# bootloaders). 75*4882a593Smuzhiyunconfig BR2_HOSTARCH_NEEDS_IA32_COMPILER 76*4882a593Smuzhiyun bool 77*4882a593Smuzhiyun 78*4882a593Smuzhiyun# Hidden boolean selected by packages that need the host to have an 79*4882a593Smuzhiyun# UTF8 locale. 80*4882a593Smuzhiyunconfig BR2_NEEDS_HOST_UTF8_LOCALE 81*4882a593Smuzhiyun bool 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun# Hidden boolean selected by packages that need the host to have 84*4882a593Smuzhiyun# support for building gcc plugins 85*4882a593Smuzhiyunconfig BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT 86*4882a593Smuzhiyun bool 87*4882a593Smuzhiyun 88*4882a593Smuzhiyunsource "arch/Config.in" 89*4882a593Smuzhiyun 90*4882a593Smuzhiyunmenu "Build options" 91*4882a593Smuzhiyun 92*4882a593Smuzhiyunmenu "Commands" 93*4882a593Smuzhiyun 94*4882a593Smuzhiyunconfig BR2_WGET 95*4882a593Smuzhiyun string "Wget command" 96*4882a593Smuzhiyun # Allow hosts with old certificates to download over https 97*4882a593Smuzhiyun default "wget --passive-ftp -nd -t 3 --no-check-certificate" 98*4882a593Smuzhiyun 99*4882a593Smuzhiyunconfig BR2_SVN 100*4882a593Smuzhiyun string "Subversion (svn) command" 101*4882a593Smuzhiyun default "svn --non-interactive" 102*4882a593Smuzhiyun 103*4882a593Smuzhiyunconfig BR2_BZR 104*4882a593Smuzhiyun string "Bazaar (bzr) command" 105*4882a593Smuzhiyun default "bzr" 106*4882a593Smuzhiyun 107*4882a593Smuzhiyunconfig BR2_GIT 108*4882a593Smuzhiyun string "Git command" 109*4882a593Smuzhiyun default "git" 110*4882a593Smuzhiyun 111*4882a593Smuzhiyunconfig BR2_CVS 112*4882a593Smuzhiyun string "CVS command" 113*4882a593Smuzhiyun default "cvs" 114*4882a593Smuzhiyun 115*4882a593Smuzhiyunconfig BR2_LOCALFILES 116*4882a593Smuzhiyun string "Local files retrieval command" 117*4882a593Smuzhiyun default "cp" 118*4882a593Smuzhiyun 119*4882a593Smuzhiyunconfig BR2_SCP 120*4882a593Smuzhiyun string "Secure copy (scp) command" 121*4882a593Smuzhiyun default "scp" 122*4882a593Smuzhiyun 123*4882a593Smuzhiyunconfig BR2_HG 124*4882a593Smuzhiyun string "Mercurial (hg) command" 125*4882a593Smuzhiyun default "hg" 126*4882a593Smuzhiyun 127*4882a593Smuzhiyunconfig BR2_ZCAT 128*4882a593Smuzhiyun string "zcat command" 129*4882a593Smuzhiyun default "gzip -d -c" 130*4882a593Smuzhiyun help 131*4882a593Smuzhiyun Command to be used to extract a gzip'ed file to stdout. zcat 132*4882a593Smuzhiyun is identical to gunzip -c except that the former may not be 133*4882a593Smuzhiyun available on your system. 134*4882a593Smuzhiyun Default is "gzip -d -c" 135*4882a593Smuzhiyun Other possible values include "gunzip -c" or "zcat". 136*4882a593Smuzhiyun 137*4882a593Smuzhiyunconfig BR2_BZCAT 138*4882a593Smuzhiyun string "bzcat command" 139*4882a593Smuzhiyun default "bzcat" 140*4882a593Smuzhiyun help 141*4882a593Smuzhiyun Command to be used to extract a bzip2'ed file to stdout. 142*4882a593Smuzhiyun bzcat is identical to bunzip2 -c except that the former may 143*4882a593Smuzhiyun not be available on your system. 144*4882a593Smuzhiyun Default is "bzcat" 145*4882a593Smuzhiyun Other possible values include "bunzip2 -c" or "bzip2 -d -c". 146*4882a593Smuzhiyun 147*4882a593Smuzhiyunconfig BR2_XZCAT 148*4882a593Smuzhiyun string "xzcat command" 149*4882a593Smuzhiyun default "xzcat" 150*4882a593Smuzhiyun help 151*4882a593Smuzhiyun Command to be used to extract a xz'ed file to stdout. 152*4882a593Smuzhiyun Default is "xzcat" 153*4882a593Smuzhiyun 154*4882a593Smuzhiyunconfig BR2_LZCAT 155*4882a593Smuzhiyun string "lzcat command" 156*4882a593Smuzhiyun default "lzip -d -c" 157*4882a593Smuzhiyun help 158*4882a593Smuzhiyun Command to be used to extract a lzip'ed file to stdout. 159*4882a593Smuzhiyun Default is "lzip -d -c" 160*4882a593Smuzhiyun 161*4882a593Smuzhiyunconfig BR2_TAR_OPTIONS 162*4882a593Smuzhiyun string "Tar options" 163*4882a593Smuzhiyun default "" 164*4882a593Smuzhiyun help 165*4882a593Smuzhiyun Options to pass to tar when extracting the sources. 166*4882a593Smuzhiyun E.g. " -v --exclude='*.svn*'" to exclude all .svn internal 167*4882a593Smuzhiyun files and to be verbose. 168*4882a593Smuzhiyun 169*4882a593Smuzhiyunendmenu 170*4882a593Smuzhiyun 171*4882a593Smuzhiyunconfig BR2_DEFCONFIG_FROM_ENV 172*4882a593Smuzhiyun string 173*4882a593Smuzhiyun option env="BR2_DEFCONFIG" 174*4882a593Smuzhiyun 175*4882a593Smuzhiyunconfig BR2_DEFCONFIG 176*4882a593Smuzhiyun string "Location to save buildroot config" 177*4882a593Smuzhiyun default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != "" 178*4882a593Smuzhiyun default "$(CONFIG_DIR)/defconfig" 179*4882a593Smuzhiyun help 180*4882a593Smuzhiyun When running 'make savedefconfig', the defconfig file will be 181*4882a593Smuzhiyun saved in this location. 182*4882a593Smuzhiyun 183*4882a593Smuzhiyunconfig BR2_DL_DIR 184*4882a593Smuzhiyun string "Download dir" 185*4882a593Smuzhiyun default "$(TOPDIR)/dl" 186*4882a593Smuzhiyun help 187*4882a593Smuzhiyun Directory to store all the source files that we need to fetch. 188*4882a593Smuzhiyun If the Linux shell environment has defined the BR2_DL_DIR 189*4882a593Smuzhiyun environment variable, then this overrides this configuration 190*4882a593Smuzhiyun item. 191*4882a593Smuzhiyun The directory is organized with a subdirectory for each 192*4882a593Smuzhiyun package. Each package has its own $(LIBFOO_DL_DIR) variable 193*4882a593Smuzhiyun that can be used to find the correct path. 194*4882a593Smuzhiyun 195*4882a593Smuzhiyun The default is $(TOPDIR)/dl 196*4882a593Smuzhiyun 197*4882a593Smuzhiyunconfig BR2_HOST_DIR 198*4882a593Smuzhiyun string "Host dir" 199*4882a593Smuzhiyun default "$(BASE_DIR)/host" 200*4882a593Smuzhiyun help 201*4882a593Smuzhiyun Directory to store all the binary files that are built for the 202*4882a593Smuzhiyun host. This includes the cross compilation toolchain when 203*4882a593Smuzhiyun building the internal buildroot toolchain. 204*4882a593Smuzhiyun 205*4882a593Smuzhiyun The default is $(BASE_DIR)/host 206*4882a593Smuzhiyun 207*4882a593Smuzhiyunmenu "Mirrors and Download locations" 208*4882a593Smuzhiyun 209*4882a593Smuzhiyunconfig BR2_PRIMARY_SITE 210*4882a593Smuzhiyun string "Primary download site" 211*4882a593Smuzhiyun default "" 212*4882a593Smuzhiyun help 213*4882a593Smuzhiyun Primary site to download from. If this option is set then 214*4882a593Smuzhiyun buildroot will try to download package source first from this 215*4882a593Smuzhiyun site and try the default if the file is not found. 216*4882a593Smuzhiyun Valid URIs are: 217*4882a593Smuzhiyun - URIs recognized by $(WGET) 218*4882a593Smuzhiyun - local URIs of the form file://absolutepath 219*4882a593Smuzhiyun - scp URIs of the form scp://[user@]host:path. 220*4882a593Smuzhiyun 221*4882a593Smuzhiyunconfig BR2_PRIMARY_SITE_ONLY 222*4882a593Smuzhiyun bool "Only allow downloads from primary download site" 223*4882a593Smuzhiyun depends on BR2_PRIMARY_SITE != "" 224*4882a593Smuzhiyun help 225*4882a593Smuzhiyun If this option is enabled, downloads will only be attempted 226*4882a593Smuzhiyun from the primary download site. Other locations, like the 227*4882a593Smuzhiyun package's official download location or the backup download 228*4882a593Smuzhiyun site, will not be considered. Therefore, if the package is not 229*4882a593Smuzhiyun present on the primary site, the download fails. 230*4882a593Smuzhiyun 231*4882a593Smuzhiyun This is useful for project developers who want to ensure that 232*4882a593Smuzhiyun the project can be built even if the upstream tarball 233*4882a593Smuzhiyun locations disappear. 234*4882a593Smuzhiyun 235*4882a593Smuzhiyunif !BR2_PRIMARY_SITE_ONLY 236*4882a593Smuzhiyun 237*4882a593Smuzhiyunconfig BR2_BACKUP_SITE 238*4882a593Smuzhiyun string "Backup download site" 239*4882a593Smuzhiyun default "http://sources.buildroot.net" 240*4882a593Smuzhiyun help 241*4882a593Smuzhiyun Backup site to download from. If this option is set then 242*4882a593Smuzhiyun buildroot will fall back to download package sources from here 243*4882a593Smuzhiyun if the normal location fails. 244*4882a593Smuzhiyun 245*4882a593Smuzhiyunconfig BR2_KERNEL_MIRROR 246*4882a593Smuzhiyun string "Kernel.org mirror" 247*4882a593Smuzhiyun default "https://cdn.kernel.org/pub" 248*4882a593Smuzhiyun help 249*4882a593Smuzhiyun kernel.org is mirrored on a number of servers around the 250*4882a593Smuzhiyun world. The following allows you to select your preferred 251*4882a593Smuzhiyun mirror. By default, a CDN is used, which automatically 252*4882a593Smuzhiyun redirects to a mirror geographically close to you. 253*4882a593Smuzhiyun 254*4882a593Smuzhiyun Have a look on the kernel.org site for a list of mirrors, then 255*4882a593Smuzhiyun enter the URL to the base directory. Examples: 256*4882a593Smuzhiyun 257*4882a593Smuzhiyun http://www.XX.kernel.org/pub (XX = country code) 258*4882a593Smuzhiyun http://mirror.aarnet.edu.au/pub/ftp.kernel.org 259*4882a593Smuzhiyun 260*4882a593Smuzhiyunconfig BR2_GNU_MIRROR 261*4882a593Smuzhiyun string "GNU Software mirror" 262*4882a593Smuzhiyun default "http://ftpmirror.gnu.org" 263*4882a593Smuzhiyun help 264*4882a593Smuzhiyun GNU has multiple software mirrors scattered around the 265*4882a593Smuzhiyun world. The following allows you to select your preferred 266*4882a593Smuzhiyun mirror. By default, a generic address is used, which 267*4882a593Smuzhiyun automatically selects an up-to-date and local mirror. 268*4882a593Smuzhiyun 269*4882a593Smuzhiyun Have a look on the gnu.org site for a list of mirrors, then 270*4882a593Smuzhiyun enter the URL to the base directory. Examples: 271*4882a593Smuzhiyun 272*4882a593Smuzhiyun http://ftp.gnu.org/pub/gnu 273*4882a593Smuzhiyun http://mirror.aarnet.edu.au/pub/gnu 274*4882a593Smuzhiyun 275*4882a593Smuzhiyunconfig BR2_LUAROCKS_MIRROR 276*4882a593Smuzhiyun string "LuaRocks mirror" 277*4882a593Smuzhiyun default "http://rocks.moonscript.org" 278*4882a593Smuzhiyun help 279*4882a593Smuzhiyun LuaRocks repository. 280*4882a593Smuzhiyun 281*4882a593Smuzhiyun See http://luarocks.org 282*4882a593Smuzhiyun 283*4882a593Smuzhiyunconfig BR2_CPAN_MIRROR 284*4882a593Smuzhiyun string "CPAN mirror (Perl packages)" 285*4882a593Smuzhiyun default "http://cpan.metacpan.org" 286*4882a593Smuzhiyun help 287*4882a593Smuzhiyun CPAN (Comprehensive Perl Archive Network) is a repository of 288*4882a593Smuzhiyun Perl packages. It has multiple software mirrors scattered 289*4882a593Smuzhiyun around the world. This option allows you to select a mirror. 290*4882a593Smuzhiyun 291*4882a593Smuzhiyun The list of mirrors is available at: 292*4882a593Smuzhiyun http://search.cpan.org/mirror 293*4882a593Smuzhiyun 294*4882a593Smuzhiyunendif 295*4882a593Smuzhiyun 296*4882a593Smuzhiyunendmenu 297*4882a593Smuzhiyun 298*4882a593Smuzhiyunconfig BR2_JLEVEL 299*4882a593Smuzhiyun int "Number of jobs to run simultaneously (0 for auto)" 300*4882a593Smuzhiyun default "0" 301*4882a593Smuzhiyun help 302*4882a593Smuzhiyun Number of jobs to run simultaneously. If 0, determine 303*4882a593Smuzhiyun automatically according to number of CPUs on the host system. 304*4882a593Smuzhiyun 305*4882a593Smuzhiyunconfig BR2_CCACHE 306*4882a593Smuzhiyun bool "Enable compiler cache" 307*4882a593Smuzhiyun help 308*4882a593Smuzhiyun This option will enable the use of ccache, a compiler cache. 309*4882a593Smuzhiyun It will cache the result of previous builds to speed up future 310*4882a593Smuzhiyun builds. By default, the cache is stored in 311*4882a593Smuzhiyun $HOME/.buildroot-ccache. 312*4882a593Smuzhiyun 313*4882a593Smuzhiyun Note that Buildroot does not try to invalidate the cache 314*4882a593Smuzhiyun contents when the compiler changes in an incompatible way. 315*4882a593Smuzhiyun Therefore, if you make a change to the compiler version and/or 316*4882a593Smuzhiyun configuration, you are responsible for purging the ccache 317*4882a593Smuzhiyun cache by removing the $HOME/.buildroot-ccache directory. 318*4882a593Smuzhiyun 319*4882a593Smuzhiyunif BR2_CCACHE 320*4882a593Smuzhiyun 321*4882a593Smuzhiyunconfig BR2_CCACHE_DIR 322*4882a593Smuzhiyun string "Compiler cache location" 323*4882a593Smuzhiyun default "$(HOME)/.buildroot-ccache" 324*4882a593Smuzhiyun help 325*4882a593Smuzhiyun Where ccache should store cached files. 326*4882a593Smuzhiyun If the Linux shell environment has defined the BR2_CCACHE_DIR 327*4882a593Smuzhiyun environment variable, then this overrides this configuration 328*4882a593Smuzhiyun item. 329*4882a593Smuzhiyun 330*4882a593Smuzhiyunconfig BR2_CCACHE_INITIAL_SETUP 331*4882a593Smuzhiyun string "Compiler cache initial setup" 332*4882a593Smuzhiyun help 333*4882a593Smuzhiyun Initial ccache settings to apply, such as --max-files or 334*4882a593Smuzhiyun --max-size. 335*4882a593Smuzhiyun 336*4882a593Smuzhiyun For example, if your project is known to require more space 337*4882a593Smuzhiyun than the default max cache size, then you might want to 338*4882a593Smuzhiyun increase the cache size to a suitable amount using the -M 339*4882a593Smuzhiyun (--max-size) option. 340*4882a593Smuzhiyun 341*4882a593Smuzhiyun The string you specify here is passed verbatim to ccache. 342*4882a593Smuzhiyun Refer to ccache documentation for more details. 343*4882a593Smuzhiyun 344*4882a593Smuzhiyun These initial settings are applied after ccache has been 345*4882a593Smuzhiyun compiled. 346*4882a593Smuzhiyun 347*4882a593Smuzhiyunconfig BR2_CCACHE_USE_BASEDIR 348*4882a593Smuzhiyun bool "Use relative paths" 349*4882a593Smuzhiyun default y 350*4882a593Smuzhiyun help 351*4882a593Smuzhiyun Allow ccache to convert absolute paths within the output 352*4882a593Smuzhiyun directory into relative paths. 353*4882a593Smuzhiyun 354*4882a593Smuzhiyun During the build, many -I include directives are given with an 355*4882a593Smuzhiyun absolute path. These absolute paths end up in the hashes that 356*4882a593Smuzhiyun are computed by ccache. Therefore, when you build from a 357*4882a593Smuzhiyun different directory, the hash will be different and the cached 358*4882a593Smuzhiyun object will not be used. 359*4882a593Smuzhiyun 360*4882a593Smuzhiyun To improve cache performance, set this option to y. This 361*4882a593Smuzhiyun allows ccache to rewrite absolute paths within the output 362*4882a593Smuzhiyun directory into relative paths. Note that only paths within the 363*4882a593Smuzhiyun output directory will be rewritten; therefore, if you change 364*4882a593Smuzhiyun BR2_HOST_DIR to point outside the output directory and 365*4882a593Smuzhiyun subsequently move it to a different location, this will lead 366*4882a593Smuzhiyun to cache misses. 367*4882a593Smuzhiyun 368*4882a593Smuzhiyun This option has as a result that the debug information in the 369*4882a593Smuzhiyun object files also has only relative paths. Therefore, make 370*4882a593Smuzhiyun sure you cd to the build directory before starting gdb. See 371*4882a593Smuzhiyun the section "COMPILING IN DIFFERENT DIRECTORIES" in the ccache 372*4882a593Smuzhiyun manual for more information. 373*4882a593Smuzhiyun 374*4882a593Smuzhiyunendif 375*4882a593Smuzhiyun 376*4882a593Smuzhiyunconfig BR2_ENABLE_DEBUG 377*4882a593Smuzhiyun bool "build packages with debugging symbols" 378*4882a593Smuzhiyun help 379*4882a593Smuzhiyun Build packages with debugging symbols enabled. All libraries 380*4882a593Smuzhiyun and binaries in the 'staging' directory will have debugging 381*4882a593Smuzhiyun symbols, which allows remote debugging even if libraries and 382*4882a593Smuzhiyun binaries are stripped on the target. Whether libraries and 383*4882a593Smuzhiyun binaries are stripped on the target is controlled by the 384*4882a593Smuzhiyun BR2_STRIP_* options below. 385*4882a593Smuzhiyun 386*4882a593Smuzhiyunif BR2_ENABLE_DEBUG 387*4882a593Smuzhiyunchoice 388*4882a593Smuzhiyun prompt "gcc debug level" 389*4882a593Smuzhiyun default BR2_DEBUG_2 390*4882a593Smuzhiyun help 391*4882a593Smuzhiyun Set the debug level for gcc 392*4882a593Smuzhiyun 393*4882a593Smuzhiyunconfig BR2_DEBUG_1 394*4882a593Smuzhiyun bool "debug level 1" 395*4882a593Smuzhiyun help 396*4882a593Smuzhiyun Debug level 1 produces minimal information, enough for making 397*4882a593Smuzhiyun backtraces in parts of the program that you don't plan to 398*4882a593Smuzhiyun debug. This includes descriptions of functions and external 399*4882a593Smuzhiyun variables, but no information about local variables and no 400*4882a593Smuzhiyun line numbers. 401*4882a593Smuzhiyun 402*4882a593Smuzhiyunconfig BR2_DEBUG_2 403*4882a593Smuzhiyun bool "debug level 2" 404*4882a593Smuzhiyun help 405*4882a593Smuzhiyun The default gcc debug level is 2 406*4882a593Smuzhiyun 407*4882a593Smuzhiyunconfig BR2_DEBUG_3 408*4882a593Smuzhiyun bool "debug level 3" 409*4882a593Smuzhiyun help 410*4882a593Smuzhiyun Level 3 includes extra information, such as all the macro 411*4882a593Smuzhiyun definitions present in the program. Some debuggers support 412*4882a593Smuzhiyun macro expansion when you use -g3. 413*4882a593Smuzhiyunendchoice 414*4882a593Smuzhiyunendif 415*4882a593Smuzhiyun 416*4882a593Smuzhiyunconfig BR2_ENABLE_RUNTIME_DEBUG 417*4882a593Smuzhiyun bool "build packages with runtime debugging info" 418*4882a593Smuzhiyun help 419*4882a593Smuzhiyun Some packages may have runtime assertions, extra traces, and 420*4882a593Smuzhiyun similar runtime elements that can help debugging. However, 421*4882a593Smuzhiyun these elements may negatively influence performance so should 422*4882a593Smuzhiyun normally not be enabled on production systems. 423*4882a593Smuzhiyun 424*4882a593Smuzhiyun Enable this option to enable such runtime debugging. 425*4882a593Smuzhiyun 426*4882a593Smuzhiyun Note: disabling this option is not a guarantee that all 427*4882a593Smuzhiyun packages effectively removed these runtime debugging elements. 428*4882a593Smuzhiyun 429*4882a593Smuzhiyunconfig BR2_STRIP_strip 430*4882a593Smuzhiyun bool "strip target binaries" 431*4882a593Smuzhiyun default y 432*4882a593Smuzhiyun depends on !BR2_PACKAGE_HOST_ELF2FLT 433*4882a593Smuzhiyun help 434*4882a593Smuzhiyun Binaries and libraries in the target filesystem will be 435*4882a593Smuzhiyun stripped using the normal 'strip' command. This allows to save 436*4882a593Smuzhiyun space, mainly by removing debugging symbols. Debugging symbols 437*4882a593Smuzhiyun on the target are needed for native debugging, but not when 438*4882a593Smuzhiyun remote debugging is used. 439*4882a593Smuzhiyun 440*4882a593Smuzhiyunconfig BR2_STRIP_EXCLUDE_FILES 441*4882a593Smuzhiyun string "executables that should not be stripped" 442*4882a593Smuzhiyun default "" 443*4882a593Smuzhiyun depends on BR2_STRIP_strip 444*4882a593Smuzhiyun help 445*4882a593Smuzhiyun You may specify a space-separated list of binaries and 446*4882a593Smuzhiyun libraries here that should not be stripped on the target. 447*4882a593Smuzhiyun 448*4882a593Smuzhiyunconfig BR2_STRIP_EXCLUDE_DIRS 449*4882a593Smuzhiyun string "directories that should be skipped when stripping" 450*4882a593Smuzhiyun default "" 451*4882a593Smuzhiyun depends on BR2_STRIP_strip 452*4882a593Smuzhiyun help 453*4882a593Smuzhiyun You may specify a space-separated list of directories that 454*4882a593Smuzhiyun should be skipped when stripping. Binaries and libraries in 455*4882a593Smuzhiyun these directories will not be touched. The directories should 456*4882a593Smuzhiyun be specified relative to the target directory, without leading 457*4882a593Smuzhiyun slash. 458*4882a593Smuzhiyun 459*4882a593Smuzhiyunchoice 460*4882a593Smuzhiyun prompt "gcc optimization level" 461*4882a593Smuzhiyun default BR2_OPTIMIZE_S 462*4882a593Smuzhiyun help 463*4882a593Smuzhiyun Set the optimization level for gcc 464*4882a593Smuzhiyun 465*4882a593Smuzhiyunconfig BR2_OPTIMIZE_0 466*4882a593Smuzhiyun bool "optimization level 0" 467*4882a593Smuzhiyun help 468*4882a593Smuzhiyun Do not optimize. 469*4882a593Smuzhiyun 470*4882a593Smuzhiyunconfig BR2_OPTIMIZE_1 471*4882a593Smuzhiyun bool "optimization level 1" 472*4882a593Smuzhiyun help 473*4882a593Smuzhiyun Optimize. Optimizing compilation takes somewhat more time, and 474*4882a593Smuzhiyun a lot more memory for a large function. With -O, the compiler 475*4882a593Smuzhiyun tries to reduce code size and execution time, without 476*4882a593Smuzhiyun performing any optimizations that take a great deal of 477*4882a593Smuzhiyun compilation time. -O turns on the following optimization 478*4882a593Smuzhiyun flags: -fdefer-pop -fdelayed-branch -fguess-branch-probability 479*4882a593Smuzhiyun -fcprop-registers -floop-optimize -fif-conversion 480*4882a593Smuzhiyun -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts 481*4882a593Smuzhiyun -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename 482*4882a593Smuzhiyun -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants. -O 483*4882a593Smuzhiyun also turns on -fomit-frame-pointer on machines where doing so 484*4882a593Smuzhiyun does not interfere with debugging. 485*4882a593Smuzhiyun 486*4882a593Smuzhiyunconfig BR2_OPTIMIZE_2 487*4882a593Smuzhiyun bool "optimization level 2" 488*4882a593Smuzhiyun help 489*4882a593Smuzhiyun Optimize even more. GCC performs nearly all supported 490*4882a593Smuzhiyun optimizations that do not involve a space-speed tradeoff. The 491*4882a593Smuzhiyun compiler does not perform loop unrolling or function inlining 492*4882a593Smuzhiyun when you specify -O2. As compared to -O, this option increases 493*4882a593Smuzhiyun both compilation time and the performance of the generated 494*4882a593Smuzhiyun code. -O2 turns on all optimization flags specified by -O. It 495*4882a593Smuzhiyun also turns on the following optimization flags: 496*4882a593Smuzhiyun -fthread-jumps -fcrossjumping -foptimize-sibling-calls 497*4882a593Smuzhiyun -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm 498*4882a593Smuzhiyun -fexpensive-optimizations -fstrength-reduce 499*4882a593Smuzhiyun -frerun-cse-after-loop -frerun-loop-opt -fcaller-saves 500*4882a593Smuzhiyun -fpeephole2 -fschedule-insns -fschedule-insns2 501*4882a593Smuzhiyun -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing 502*4882a593Smuzhiyun -fdelete-null-pointer-checks -freorder-blocks 503*4882a593Smuzhiyun -freorder-functions -falign-functions -falign-jumps 504*4882a593Smuzhiyun -falign-loops -falign-labels -ftree-vrp -ftree-pre. Please 505*4882a593Smuzhiyun note the warning under -fgcse about invoking -O2 on programs 506*4882a593Smuzhiyun that use computed gotos. 507*4882a593Smuzhiyun 508*4882a593Smuzhiyunconfig BR2_OPTIMIZE_3 509*4882a593Smuzhiyun bool "optimization level 3" 510*4882a593Smuzhiyun help 511*4882a593Smuzhiyun Optimize yet more. -O3 turns on all optimizations specified by 512*4882a593Smuzhiyun -O2 and also turns on the -finline-functions, -funswitch-loops 513*4882a593Smuzhiyun and -fgcse-after-reload options. 514*4882a593Smuzhiyun 515*4882a593Smuzhiyunconfig BR2_OPTIMIZE_G 516*4882a593Smuzhiyun bool "optimize for debugging" 517*4882a593Smuzhiyun depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 518*4882a593Smuzhiyun help 519*4882a593Smuzhiyun Optimize for debugging. This enables optimizations that do not 520*4882a593Smuzhiyun interfere with debugging. It should be the optimization level 521*4882a593Smuzhiyun of choice for the standard edit-compile-debug cycle, offering 522*4882a593Smuzhiyun a reasonable level of optimization while maintaining fast 523*4882a593Smuzhiyun compilation and a good debugging experience. 524*4882a593Smuzhiyun 525*4882a593Smuzhiyunconfig BR2_OPTIMIZE_S 526*4882a593Smuzhiyun bool "optimize for size" 527*4882a593Smuzhiyun help 528*4882a593Smuzhiyun Optimize for size. -Os enables all -O2 optimizations that do 529*4882a593Smuzhiyun not typically increase code size. It also performs further 530*4882a593Smuzhiyun optimizations designed to reduce code size. -Os disables the 531*4882a593Smuzhiyun following optimization flags: -falign-functions -falign-jumps 532*4882a593Smuzhiyun -falign-loops -falign-labels -freorder-blocks 533*4882a593Smuzhiyun -freorder-blocks-and-partition -fprefetch-loop-arrays 534*4882a593Smuzhiyun -ftree-vect-loop-version 535*4882a593Smuzhiyun This is the default. 536*4882a593Smuzhiyun 537*4882a593Smuzhiyunconfig BR2_OPTIMIZE_FAST 538*4882a593Smuzhiyun bool "optimize for fast (may break packages!)" 539*4882a593Smuzhiyun depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 540*4882a593Smuzhiyun help 541*4882a593Smuzhiyun Optimize for fast. Disregard strict standards 542*4882a593Smuzhiyun compliance. -Ofast enables all -O3 optimizations. It also 543*4882a593Smuzhiyun enables optimizations that are not valid for all 544*4882a593Smuzhiyun standard-compliant programs, so be careful, as it may break 545*4882a593Smuzhiyun some packages. It turns on -ffast-math and the 546*4882a593Smuzhiyun Fortran-specific -fstack-arrays, unless -fmax-stack-var-size 547*4882a593Smuzhiyun is specified, and -fno-protect-parens. 548*4882a593Smuzhiyun 549*4882a593Smuzhiyunendchoice 550*4882a593Smuzhiyun 551*4882a593Smuzhiyunconfig BR2_GOOGLE_BREAKPAD_ENABLE 552*4882a593Smuzhiyun bool "Enable google-breakpad support" 553*4882a593Smuzhiyun depends on BR2_INSTALL_LIBSTDCPP 554*4882a593Smuzhiyun depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 555*4882a593Smuzhiyun depends on BR2_USE_WCHAR 556*4882a593Smuzhiyun depends on BR2_TOOLCHAIN_HAS_THREADS 557*4882a593Smuzhiyun depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC) 558*4882a593Smuzhiyun depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS 559*4882a593Smuzhiyun depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS 560*4882a593Smuzhiyun select BR2_PACKAGE_GOOGLE_BREAKPAD 561*4882a593Smuzhiyun help 562*4882a593Smuzhiyun This option will enable the use of google breakpad, a library 563*4882a593Smuzhiyun and tool suite that allows you to distribute an application to 564*4882a593Smuzhiyun users with compiler-provided debugging information removed, 565*4882a593Smuzhiyun record crashes in compact "minidump" files, send them back to 566*4882a593Smuzhiyun your server and produce C and C++ stack traces from these 567*4882a593Smuzhiyun minidumps. Breakpad can also write minidumps on request for 568*4882a593Smuzhiyun programs that have not crashed. 569*4882a593Smuzhiyun 570*4882a593Smuzhiyunif BR2_GOOGLE_BREAKPAD_ENABLE 571*4882a593Smuzhiyun 572*4882a593Smuzhiyunconfig BR2_GOOGLE_BREAKPAD_INCLUDE_FILES 573*4882a593Smuzhiyun string "List of executables and libraries to extract symbols from" 574*4882a593Smuzhiyun default "" 575*4882a593Smuzhiyun help 576*4882a593Smuzhiyun You may specify a space-separated list of binaries and 577*4882a593Smuzhiyun libraries with full paths relative to $(TARGET_DIR) of which 578*4882a593Smuzhiyun debug symbols will be dumped for further use with google 579*4882a593Smuzhiyun breakpad. 580*4882a593Smuzhiyun 581*4882a593Smuzhiyun A directory structure that can be used by minidump-stackwalk 582*4882a593Smuzhiyun will be created at: 583*4882a593Smuzhiyun 584*4882a593Smuzhiyun $(STAGING_DIR)/usr/share/google-breakpad-symbols 585*4882a593Smuzhiyun 586*4882a593Smuzhiyunendif 587*4882a593Smuzhiyun 588*4882a593Smuzhiyunchoice 589*4882a593Smuzhiyun bool "libraries" 590*4882a593Smuzhiyun default BR2_SHARED_LIBS if BR2_BINFMT_SUPPORTS_SHARED 591*4882a593Smuzhiyun default BR2_STATIC_LIBS if !BR2_BINFMT_SUPPORTS_SHARED 592*4882a593Smuzhiyun help 593*4882a593Smuzhiyun Select the type of libraries you want to use on the target. 594*4882a593Smuzhiyun 595*4882a593Smuzhiyun The default is to build dynamic libraries and use those on the 596*4882a593Smuzhiyun target filesystem, except when the architecture and/or the 597*4882a593Smuzhiyun selected binary format does not support shared libraries. 598*4882a593Smuzhiyun 599*4882a593Smuzhiyunconfig BR2_STATIC_LIBS 600*4882a593Smuzhiyun bool "static only" 601*4882a593Smuzhiyun help 602*4882a593Smuzhiyun Build and use only static libraries. No shared libraries will 603*4882a593Smuzhiyun be installed on the target. This potentially increases your 604*4882a593Smuzhiyun code size and should only be used if you know what you are 605*4882a593Smuzhiyun doing. Note that some packages may not be available when this 606*4882a593Smuzhiyun option is enabled, due to their need for dynamic library 607*4882a593Smuzhiyun support. 608*4882a593Smuzhiyun 609*4882a593Smuzhiyunconfig BR2_SHARED_LIBS 610*4882a593Smuzhiyun bool "shared only" 611*4882a593Smuzhiyun depends on BR2_BINFMT_SUPPORTS_SHARED 612*4882a593Smuzhiyun help 613*4882a593Smuzhiyun Build and use only shared libraries. This is the recommended 614*4882a593Smuzhiyun solution as it saves space and build time. 615*4882a593Smuzhiyun 616*4882a593Smuzhiyunconfig BR2_SHARED_STATIC_LIBS 617*4882a593Smuzhiyun bool "both static and shared" 618*4882a593Smuzhiyun depends on BR2_BINFMT_SUPPORTS_SHARED 619*4882a593Smuzhiyun help 620*4882a593Smuzhiyun Build both shared and static libraries, but link executables 621*4882a593Smuzhiyun dynamically. While building both shared and static libraries 622*4882a593Smuzhiyun take more time and more disk space, having static libraries 623*4882a593Smuzhiyun may be useful to link some of the applications statically. 624*4882a593Smuzhiyun 625*4882a593Smuzhiyunendchoice 626*4882a593Smuzhiyun 627*4882a593Smuzhiyunconfig BR2_PACKAGE_OVERRIDE_FILE 628*4882a593Smuzhiyun string "location of a package override file" 629*4882a593Smuzhiyun default "$(CONFIG_DIR)/local.mk" 630*4882a593Smuzhiyun help 631*4882a593Smuzhiyun A package override file is a short makefile that contains 632*4882a593Smuzhiyun variable definitions of the form <pkg>_OVERRIDE_SRCDIR, which 633*4882a593Smuzhiyun allows to tell Buildroot to use an existing directory as the 634*4882a593Smuzhiyun source directory for a particular package. See the Buildroot 635*4882a593Smuzhiyun documentation for more details on this feature. 636*4882a593Smuzhiyun 637*4882a593Smuzhiyunconfig BR2_GLOBAL_PATCH_DIR 638*4882a593Smuzhiyun string "global patch directories" 639*4882a593Smuzhiyun help 640*4882a593Smuzhiyun You may specify a space separated list of one or more 641*4882a593Smuzhiyun directories containing global package patches. For a specific 642*4882a593Smuzhiyun version <packageversion> of a specific package <packagename>, 643*4882a593Smuzhiyun patches are applied as follows: 644*4882a593Smuzhiyun 645*4882a593Smuzhiyun First, the default Buildroot patch set for the package is 646*4882a593Smuzhiyun applied from the package's directory in Buildroot. 647*4882a593Smuzhiyun 648*4882a593Smuzhiyun Then for every directory - <global-patch-dir> - that exists in 649*4882a593Smuzhiyun BR2_GLOBAL_PATCH_DIR, if the directory 650*4882a593Smuzhiyun <global-patch-dir>/<packagename>/<packageversion>/ exists, 651*4882a593Smuzhiyun then all *.patch files in this directory will be applied. 652*4882a593Smuzhiyun 653*4882a593Smuzhiyun Otherwise, if the directory <global-patch-dir>/<packagename> 654*4882a593Smuzhiyun exists, then all *.patch files in the directory will be 655*4882a593Smuzhiyun applied. 656*4882a593Smuzhiyun 657*4882a593Smuzhiyunmenu "Advanced" 658*4882a593Smuzhiyun 659*4882a593Smuzhiyunconfig BR2_COMPILER_PARANOID_UNSAFE_PATH 660*4882a593Smuzhiyun bool "paranoid check of library/header paths" 661*4882a593Smuzhiyun default y 662*4882a593Smuzhiyun help 663*4882a593Smuzhiyun By default, when this option is disabled, when the Buildroot 664*4882a593Smuzhiyun cross-compiler will encounter an unsafe library or header path 665*4882a593Smuzhiyun (such as /usr/include, or /usr/lib), the compiler will display 666*4882a593Smuzhiyun a warning. 667*4882a593Smuzhiyun 668*4882a593Smuzhiyun By enabling this option, this warning is turned into an error, 669*4882a593Smuzhiyun which will completely abort the build when such unsafe paths 670*4882a593Smuzhiyun are encountered. 671*4882a593Smuzhiyun 672*4882a593Smuzhiyun Note that this mechanism is available for both the internal 673*4882a593Smuzhiyun toolchain (through the toolchain wrapper and binutils patches) 674*4882a593Smuzhiyun and external toolchain backends (through the toolchain 675*4882a593Smuzhiyun wrapper). 676*4882a593Smuzhiyun 677*4882a593Smuzhiyunconfig BR2_FORCE_HOST_BUILD 678*4882a593Smuzhiyun bool "Force the building of host dependencies" 679*4882a593Smuzhiyun help 680*4882a593Smuzhiyun Build all available host dependencies, even if they are 681*4882a593Smuzhiyun already installed on the system. 682*4882a593Smuzhiyun 683*4882a593Smuzhiyun This option can be used to ensure that the download cache of 684*4882a593Smuzhiyun source archives for packages remain consistent between 685*4882a593Smuzhiyun different build hosts. 686*4882a593Smuzhiyun 687*4882a593Smuzhiyun This option will increase build time. 688*4882a593Smuzhiyun 689*4882a593Smuzhiyunconfig BR2_REPRODUCIBLE 690*4882a593Smuzhiyun bool "Make the build reproducible (experimental)" 691*4882a593Smuzhiyun # SOURCE_DATE_EPOCH support in toolchain-wrapper requires GCC 4.4 692*4882a593Smuzhiyun depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 693*4882a593Smuzhiyun help 694*4882a593Smuzhiyun This option will remove all sources of non-reproducibility 695*4882a593Smuzhiyun from the build process. For a given Buildroot configuration, 696*4882a593Smuzhiyun this allows to generate exactly identical binaries from one 697*4882a593Smuzhiyun build to the other, including on different machines. 698*4882a593Smuzhiyun 699*4882a593Smuzhiyun The current implementation is restricted to builds with the 700*4882a593Smuzhiyun same output directory. Many (absolute) paths are recorded in 701*4882a593Smuzhiyun intermediary files, and it is very likely that some of these 702*4882a593Smuzhiyun paths leak into the target rootfs. If you build with the 703*4882a593Smuzhiyun same O=... path, however, the result is identical. 704*4882a593Smuzhiyun 705*4882a593Smuzhiyun This is labeled as an experimental feature, as not all 706*4882a593Smuzhiyun packages behave properly to ensure reproducibility. 707*4882a593Smuzhiyun 708*4882a593Smuzhiyunconfig BR2_PER_PACKAGE_DIRECTORIES 709*4882a593Smuzhiyun bool "Use per-package directories (experimental)" 710*4882a593Smuzhiyun help 711*4882a593Smuzhiyun This option will change the build process of Buildroot 712*4882a593Smuzhiyun package to use per-package target and host directories. 713*4882a593Smuzhiyun 714*4882a593Smuzhiyun This is useful for two related purposes: 715*4882a593Smuzhiyun 716*4882a593Smuzhiyun - Cleanly isolate the build of each package, so that a 717*4882a593Smuzhiyun given package only "sees" the dependencies it has 718*4882a593Smuzhiyun explicitly expressed, and not other packages that may 719*4882a593Smuzhiyun have by chance been built before. 720*4882a593Smuzhiyun 721*4882a593Smuzhiyun - Enable top-level parallel build. 722*4882a593Smuzhiyun 723*4882a593Smuzhiyun This is labeled as an experimental feature, as not all 724*4882a593Smuzhiyun packages behave properly with per-package directories. 725*4882a593Smuzhiyun 726*4882a593Smuzhiyunendmenu 727*4882a593Smuzhiyun 728*4882a593Smuzhiyuncomment "Security Hardening Options" 729*4882a593Smuzhiyun 730*4882a593Smuzhiyunconfig BR2_PIC_PIE_ARCH_SUPPORTS 731*4882a593Smuzhiyun bool 732*4882a593Smuzhiyun default y 733*4882a593Smuzhiyun # Microblaze glibc toolchains don't work with PIC/PIE enabled 734*4882a593Smuzhiyun depends on !BR2_microblaze 735*4882a593Smuzhiyun # Nios2 toolchains produce non working binaries with -fPIC 736*4882a593Smuzhiyun depends on !BR2_nios2 737*4882a593Smuzhiyun 738*4882a593Smuzhiyunconfig BR2_PIC_PIE 739*4882a593Smuzhiyun bool "Build code with PIC/PIE" 740*4882a593Smuzhiyun default y 741*4882a593Smuzhiyun depends on BR2_PIC_PIE_ARCH_SUPPORTS 742*4882a593Smuzhiyun depends on BR2_SHARED_LIBS 743*4882a593Smuzhiyun depends on BR2_TOOLCHAIN_SUPPORTS_PIE 744*4882a593Smuzhiyun help 745*4882a593Smuzhiyun Generate Position-Independent Code (PIC) and link 746*4882a593Smuzhiyun Position-Independent Executables (PIE). 747*4882a593Smuzhiyun 748*4882a593Smuzhiyuncomment "PIC/PIE needs a toolchain w/ PIE" 749*4882a593Smuzhiyun depends on BR2_PIC_PIE_ARCH_SUPPORTS 750*4882a593Smuzhiyun depends on BR2_SHARED_LIBS 751*4882a593Smuzhiyun depends on !BR2_TOOLCHAIN_SUPPORTS_PIE 752*4882a593Smuzhiyun 753*4882a593Smuzhiyunchoice 754*4882a593Smuzhiyun bool "Stack Smashing Protection" 755*4882a593Smuzhiyun default BR2_SSP_ALL if BR2_ENABLE_SSP # legacy 756*4882a593Smuzhiyun default BR2_SSP_STRONG if BR2_TOOLCHAIN_HAS_SSP_STRONG 757*4882a593Smuzhiyun default BR2_SSP_REGULAR 758*4882a593Smuzhiyun depends on BR2_TOOLCHAIN_HAS_SSP 759*4882a593Smuzhiyun help 760*4882a593Smuzhiyun Enable stack smashing protection support using GCC's 761*4882a593Smuzhiyun -fstack-protector option family. 762*4882a593Smuzhiyun 763*4882a593Smuzhiyun See 764*4882a593Smuzhiyun http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt 765*4882a593Smuzhiyun for details. 766*4882a593Smuzhiyun 767*4882a593Smuzhiyun Note that this requires the toolchain to have SSP support. 768*4882a593Smuzhiyun This is always the case for glibc and eglibc toolchain, but is 769*4882a593Smuzhiyun optional in uClibc toolchains. 770*4882a593Smuzhiyun 771*4882a593Smuzhiyunconfig BR2_SSP_NONE 772*4882a593Smuzhiyun bool "None" 773*4882a593Smuzhiyun help 774*4882a593Smuzhiyun Disable stack-smashing protection. 775*4882a593Smuzhiyun 776*4882a593Smuzhiyunconfig BR2_SSP_REGULAR 777*4882a593Smuzhiyun bool "-fstack-protector" 778*4882a593Smuzhiyun help 779*4882a593Smuzhiyun Emit extra code to check for buffer overflows, such as stack 780*4882a593Smuzhiyun smashing attacks. This is done by adding a guard variable to 781*4882a593Smuzhiyun functions with vulnerable objects. This includes functions 782*4882a593Smuzhiyun that call alloca, and functions with buffers larger than 8 783*4882a593Smuzhiyun bytes. The guards are initialized when a function is entered 784*4882a593Smuzhiyun and then checked when the function exits. If a guard check 785*4882a593Smuzhiyun fails, an error message is printed and the program exits. 786*4882a593Smuzhiyun 787*4882a593Smuzhiyunconfig BR2_SSP_STRONG 788*4882a593Smuzhiyun bool "-fstack-protector-strong" 789*4882a593Smuzhiyun depends on BR2_TOOLCHAIN_HAS_SSP_STRONG 790*4882a593Smuzhiyun help 791*4882a593Smuzhiyun Like -fstack-protector but includes additional functions to be 792*4882a593Smuzhiyun protected - those that have local array definitions, or have 793*4882a593Smuzhiyun references to local frame addresses. 794*4882a593Smuzhiyun 795*4882a593Smuzhiyun -fstack-protector-strong officially appeared in gcc 4.9, but 796*4882a593Smuzhiyun some vendors have backported -fstack-protector-strong to older 797*4882a593Smuzhiyun versions of gcc. 798*4882a593Smuzhiyun 799*4882a593Smuzhiyunconfig BR2_SSP_ALL 800*4882a593Smuzhiyun bool "-fstack-protector-all" 801*4882a593Smuzhiyun help 802*4882a593Smuzhiyun Like -fstack-protector except that all functions are 803*4882a593Smuzhiyun protected. This option might have a significant performance 804*4882a593Smuzhiyun impact on the compiled binaries. 805*4882a593Smuzhiyun 806*4882a593Smuzhiyunendchoice 807*4882a593Smuzhiyun 808*4882a593Smuzhiyunconfig BR2_SSP_OPTION 809*4882a593Smuzhiyun string 810*4882a593Smuzhiyun default "-fstack-protector" if BR2_SSP_REGULAR 811*4882a593Smuzhiyun default "-fstack-protector-strong" if BR2_SSP_STRONG 812*4882a593Smuzhiyun default "-fstack-protector-all" if BR2_SSP_ALL 813*4882a593Smuzhiyun 814*4882a593Smuzhiyuncomment "Stack Smashing Protection needs a toolchain w/ SSP" 815*4882a593Smuzhiyun depends on !BR2_TOOLCHAIN_HAS_SSP 816*4882a593Smuzhiyun 817*4882a593Smuzhiyunchoice 818*4882a593Smuzhiyun bool "RELRO Protection" 819*4882a593Smuzhiyun default BR2_RELRO_FULL if BR2_TOOLCHAIN_SUPPORTS_PIE 820*4882a593Smuzhiyun default BR2_RELRO_PARTIAL 821*4882a593Smuzhiyun depends on BR2_SHARED_LIBS 822*4882a593Smuzhiyun help 823*4882a593Smuzhiyun Enable a link-time protection know as RELRO (RELocation Read 824*4882a593Smuzhiyun Only) which helps to protect from certain type of exploitation 825*4882a593Smuzhiyun techniques altering the content of some ELF sections. 826*4882a593Smuzhiyun 827*4882a593Smuzhiyunconfig BR2_RELRO_NONE 828*4882a593Smuzhiyun bool "None" 829*4882a593Smuzhiyun help 830*4882a593Smuzhiyun Disables Relocation link-time protections. 831*4882a593Smuzhiyun 832*4882a593Smuzhiyunconfig BR2_RELRO_PARTIAL 833*4882a593Smuzhiyun bool "Partial" 834*4882a593Smuzhiyun help 835*4882a593Smuzhiyun This option makes the dynamic section not writeable after 836*4882a593Smuzhiyun initialization (with almost no performance penalty). 837*4882a593Smuzhiyun 838*4882a593Smuzhiyunconfig BR2_RELRO_FULL 839*4882a593Smuzhiyun bool "Full" 840*4882a593Smuzhiyun depends on BR2_PIC_PIE_ARCH_SUPPORTS 841*4882a593Smuzhiyun depends on BR2_TOOLCHAIN_SUPPORTS_PIE 842*4882a593Smuzhiyun select BR2_PIC_PIE 843*4882a593Smuzhiyun help 844*4882a593Smuzhiyun This option includes the partial configuration, but also marks 845*4882a593Smuzhiyun the GOT as read-only at the cost of initialization time during 846*4882a593Smuzhiyun program loading, i.e every time an executable is started. 847*4882a593Smuzhiyun 848*4882a593Smuzhiyuncomment "RELRO Full needs a toolchain w/ PIE" 849*4882a593Smuzhiyun depends on BR2_PIC_PIE_ARCH_SUPPORTS 850*4882a593Smuzhiyun depends on !BR2_TOOLCHAIN_SUPPORTS_PIE 851*4882a593Smuzhiyun 852*4882a593Smuzhiyunendchoice 853*4882a593Smuzhiyun 854*4882a593Smuzhiyuncomment "RELocation Read Only (RELRO) needs shared libraries" 855*4882a593Smuzhiyun depends on !BR2_SHARED_LIBS 856*4882a593Smuzhiyun 857*4882a593Smuzhiyunconfig BR2_FORTIFY_SOURCE_ARCH_SUPPORTS 858*4882a593Smuzhiyun bool 859*4882a593Smuzhiyun default y 860*4882a593Smuzhiyun # Microblaze glibc toolchains don't work with Fortify Source enabled 861*4882a593Smuzhiyun depends on !BR2_microblaze 862*4882a593Smuzhiyun 863*4882a593Smuzhiyunchoice 864*4882a593Smuzhiyun bool "Buffer-overflow Detection (FORTIFY_SOURCE)" 865*4882a593Smuzhiyun default BR2_FORTIFY_SOURCE_1 866*4882a593Smuzhiyun depends on BR2_FORTIFY_SOURCE_ARCH_SUPPORTS 867*4882a593Smuzhiyun depends on BR2_TOOLCHAIN_USES_GLIBC 868*4882a593Smuzhiyun depends on !BR2_OPTIMIZE_0 869*4882a593Smuzhiyun help 870*4882a593Smuzhiyun Enable the _FORTIFY_SOURCE macro which introduces additional 871*4882a593Smuzhiyun checks to detect buffer-overflows in the following standard 872*4882a593Smuzhiyun library functions: memcpy, mempcpy, memmove, memset, strcpy, 873*4882a593Smuzhiyun stpcpy, strncpy, strcat, strncat, sprintf, vsprintf, snprintf, 874*4882a593Smuzhiyun vsnprintf, gets. 875*4882a593Smuzhiyun 876*4882a593Smuzhiyun NOTE: This feature requires an optimization level of s/1/2/3/g 877*4882a593Smuzhiyun 878*4882a593Smuzhiyun Support for this feature has been present since GCC 4.x. 879*4882a593Smuzhiyun 880*4882a593Smuzhiyunconfig BR2_FORTIFY_SOURCE_NONE 881*4882a593Smuzhiyun bool "None" 882*4882a593Smuzhiyun help 883*4882a593Smuzhiyun Disables additional checks to detect buffer-overflows. 884*4882a593Smuzhiyun 885*4882a593Smuzhiyunconfig BR2_FORTIFY_SOURCE_1 886*4882a593Smuzhiyun bool "Conservative" 887*4882a593Smuzhiyun # gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61164 888*4882a593Smuzhiyun depends on !BR2_TOOLCHAIN_BUILDROOT || BR2_TOOLCHAIN_GCC_AT_LEAST_6 889*4882a593Smuzhiyun help 890*4882a593Smuzhiyun This option sets _FORTIFY_SOURCE to 1 and only introduces 891*4882a593Smuzhiyun checks that shouldn't change the behavior of conforming 892*4882a593Smuzhiyun programs. Adds checks at compile-time only. 893*4882a593Smuzhiyun 894*4882a593Smuzhiyunconfig BR2_FORTIFY_SOURCE_2 895*4882a593Smuzhiyun bool "Aggressive" 896*4882a593Smuzhiyun # gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61164 897*4882a593Smuzhiyun depends on !BR2_TOOLCHAIN_BUILDROOT || BR2_TOOLCHAIN_GCC_AT_LEAST_6 898*4882a593Smuzhiyun help 899*4882a593Smuzhiyun This option sets _FORTIFY_SOURCES to 2 and some more 900*4882a593Smuzhiyun checking is added, but some conforming programs might fail. 901*4882a593Smuzhiyun Also adds checks at run-time (detected buffer overflow 902*4882a593Smuzhiyun terminates the program) 903*4882a593Smuzhiyun 904*4882a593Smuzhiyunendchoice 905*4882a593Smuzhiyun 906*4882a593Smuzhiyuncomment "Fortify Source needs a glibc toolchain and optimization" 907*4882a593Smuzhiyun depends on BR2_FORTIFY_SOURCE_ARCH_SUPPORTS 908*4882a593Smuzhiyun depends on (!BR2_TOOLCHAIN_USES_GLIBC || BR2_OPTIMIZE_0) 909*4882a593Smuzhiyunendmenu 910*4882a593Smuzhiyun 911*4882a593Smuzhiyunsource "toolchain/Config.in" 912*4882a593Smuzhiyun 913*4882a593Smuzhiyunsource "system/Config.in" 914*4882a593Smuzhiyun 915*4882a593Smuzhiyunsource "linux/Config.in" 916*4882a593Smuzhiyun 917*4882a593Smuzhiyunsource "package/Config.in" 918*4882a593Smuzhiyun 919*4882a593Smuzhiyunsource "fs/Config.in" 920*4882a593Smuzhiyun 921*4882a593Smuzhiyunsource "boot/Config.in" 922*4882a593Smuzhiyun 923*4882a593Smuzhiyunsource "package/Config.in.host" 924*4882a593Smuzhiyun 925*4882a593Smuzhiyunsource "Config.in.legacy" 926*4882a593Smuzhiyun 927*4882a593Smuzhiyun# br2-external menus definitions 928*4882a593Smuzhiyunsource "$BR2_BASE_DIR/.br2-external.in.menus" 929