Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 1 | # |
| 2 | |
Peter Korsgaard | 6a53b72 | 2011-02-02 14:53:23 +0100 | [diff] [blame] | 3 | mainmenu "Buildroot $BR2_VERSION Configuration" |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 4 | |
| 5 | config BR2_HAVE_DOT_CONFIG |
| 6 | bool |
| 7 | default y |
| 8 | |
Bernhard Reutner-Fischer | f5b8cd4 | 2007-09-25 11:37:31 +0000 | [diff] [blame] | 9 | config BR2_VERSION |
| 10 | string |
Yann E. MORIN | 56c68bc | 2010-10-31 17:35:14 +0100 | [diff] [blame] | 11 | option env="BR2_VERSION_FULL" |
Bernhard Reutner-Fischer | f5b8cd4 | 2007-09-25 11:37:31 +0000 | [diff] [blame] | 12 | |
Francois Perrad | 1d4104f | 2012-07-18 15:59:09 +0200 | [diff] [blame] | 13 | config BR2_HOSTARCH |
| 14 | string |
| 15 | option env="HOSTARCH" |
| 16 | |
Yann E. MORIN | 54af055 | 2019-07-29 22:19:53 +0200 | [diff] [blame] | 17 | config BR2_BASE_DIR |
Yann E. MORIN | 4802db3 | 2016-07-17 12:34:26 +0200 | [diff] [blame] | 18 | string |
Yann E. MORIN | 54af055 | 2019-07-29 22:19:53 +0200 | [diff] [blame] | 19 | option env="BASE_DIR" |
Yann E. MORIN | 4802db3 | 2016-07-17 12:34:26 +0200 | [diff] [blame] | 20 | |
Yann E. MORIN | edf32b0 | 2019-07-29 22:19:59 +0200 | [diff] [blame] | 21 | # br2-external paths definitions |
| 22 | source "$BR2_BASE_DIR/.br2-external.in.paths" |
| 23 | |
Arnout Vandecappelle | 12825f7 | 2015-12-31 01:34:13 +0100 | [diff] [blame] | 24 | # Hidden config symbols for packages to check system gcc version |
| 25 | config BR2_HOST_GCC_VERSION |
| 26 | string |
| 27 | option env="HOST_GCC_VERSION" |
| 28 | |
Arnout Vandecappelle | 12825f7 | 2015-12-31 01:34:13 +0100 | [diff] [blame] | 29 | config BR2_HOST_GCC_AT_LEAST_4_9 |
| 30 | bool |
| 31 | default y if BR2_HOST_GCC_VERSION = "4 9" |
Arnout Vandecappelle | 12825f7 | 2015-12-31 01:34:13 +0100 | [diff] [blame] | 32 | |
| 33 | config BR2_HOST_GCC_AT_LEAST_5 |
| 34 | bool |
| 35 | default y if BR2_HOST_GCC_VERSION = "5" |
| 36 | select BR2_HOST_GCC_AT_LEAST_4_9 |
| 37 | |
Martin Bark | 3d21757 | 2016-06-06 11:18:14 +0100 | [diff] [blame] | 38 | config BR2_HOST_GCC_AT_LEAST_6 |
| 39 | bool |
| 40 | default y if BR2_HOST_GCC_VERSION = "6" |
| 41 | select BR2_HOST_GCC_AT_LEAST_5 |
| 42 | |
Adrián Pérez de Castro | 435b4cc | 2017-07-05 16:06:33 +0300 | [diff] [blame] | 43 | config BR2_HOST_GCC_AT_LEAST_7 |
| 44 | bool |
| 45 | default y if BR2_HOST_GCC_VERSION = "7" |
| 46 | select BR2_HOST_GCC_AT_LEAST_6 |
| 47 | |
Stefan Becker | e13ab2e | 2018-05-02 13:09:04 +0300 | [diff] [blame] | 48 | config BR2_HOST_GCC_AT_LEAST_8 |
| 49 | bool |
| 50 | default y if BR2_HOST_GCC_VERSION = "8" |
| 51 | select BR2_HOST_GCC_AT_LEAST_7 |
| 52 | |
Romain Naour | 1776190 | 2020-02-25 22:22:13 +0100 | [diff] [blame] | 53 | config BR2_HOST_GCC_AT_LEAST_9 |
| 54 | bool |
| 55 | default y if BR2_HOST_GCC_VERSION = "9" |
| 56 | select BR2_HOST_GCC_AT_LEAST_8 |
| 57 | |
Adam Duskett | da88933 | 2023-11-02 18:06:49 -0600 | [diff] [blame] | 58 | config BR2_HOST_GCC_AT_LEAST_10 |
| 59 | bool |
| 60 | default y if BR2_HOST_GCC_VERSION = "10" |
| 61 | select BR2_HOST_GCC_AT_LEAST_9 |
| 62 | |
| 63 | config BR2_HOST_GCC_AT_LEAST_11 |
| 64 | bool |
| 65 | default y if BR2_HOST_GCC_VERSION = "11" |
| 66 | select BR2_HOST_GCC_AT_LEAST_10 |
| 67 | |
Yann E. MORIN | 3950e69 | 2018-10-23 11:08:40 +0200 | [diff] [blame] | 68 | # When adding new entries above, be sure to update |
| 69 | # the HOSTCC_MAX_VERSION variable in the Makefile. |
| 70 | |
Maxime Hadjinlian | aac3d2b | 2014-02-18 00:37:12 +0100 | [diff] [blame] | 71 | # Hidden boolean selected by packages in need of Java in order to build |
Bernd Kuhls | 4f3fdf1 | 2017-10-01 21:04:30 +0200 | [diff] [blame] | 72 | # (example: kodi) |
Maxime Hadjinlian | 0721c71 | 2014-02-19 16:33:50 +0100 | [diff] [blame] | 73 | config BR2_NEEDS_HOST_JAVA |
Maxime Hadjinlian | aac3d2b | 2014-02-18 00:37:12 +0100 | [diff] [blame] | 74 | bool |
| 75 | |
Thomas Petazzoni | 70d6037 | 2012-12-29 06:14:49 +0000 | [diff] [blame] | 76 | # Hidden boolean selected by pre-built packages for x86, when they |
| 77 | # need to run on x86-64 machines (example: pre-built external |
Lang Daniel | 71b5ea4 | 2023-03-15 16:21:11 +0000 | [diff] [blame] | 78 | # toolchains, binary tools, etc.). |
Thomas Petazzoni | 70d6037 | 2012-12-29 06:14:49 +0000 | [diff] [blame] | 79 | config BR2_HOSTARCH_NEEDS_IA32_LIBS |
| 80 | bool |
| 81 | |
Thomas Petazzoni | 0e4bc50 | 2013-11-11 17:47:25 +0100 | [diff] [blame] | 82 | # Hidden boolean selected by packages that need to build 32 bits |
| 83 | # binaries with the host compiler, even on 64 bits build machines (e.g |
| 84 | # bootloaders). |
| 85 | config BR2_HOSTARCH_NEEDS_IA32_COMPILER |
| 86 | bool |
| 87 | |
Yann E. MORIN | de0df99 | 2016-12-04 10:43:04 +0100 | [diff] [blame] | 88 | # Hidden boolean selected by packages that need the host to have an |
| 89 | # UTF8 locale. |
| 90 | config BR2_NEEDS_HOST_UTF8_LOCALE |
| 91 | bool |
| 92 | |
Kamel Bouhara | e068f33 | 2020-07-06 17:30:35 +0200 | [diff] [blame] | 93 | # Hidden boolean selected by packages that need the host to have |
| 94 | # support for building gcc plugins |
| 95 | config BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT |
| 96 | bool |
| 97 | |
Thomas Petazzoni | 79ee3c1 | 2012-11-03 08:27:59 +0000 | [diff] [blame] | 98 | source "arch/Config.in" |
Bernhard Reutner-Fischer | 7d8a59b | 2007-07-08 16:28:54 +0000 | [diff] [blame] | 99 | |
Arnout Vandecappelle (Essensium/Mind) | 5e050a8 | 2021-10-06 22:41:33 +0200 | [diff] [blame] | 100 | source "toolchain/Config.in" |
| 101 | |
Eric Andersen | 8e5fb3f | 2004-12-11 13:01:10 +0000 | [diff] [blame] | 102 | menu "Build options" |
| 103 | |
Thomas Petazzoni | 1592926 | 2010-04-10 22:55:01 +0200 | [diff] [blame] | 104 | menu "Commands" |
| 105 | |
Yann E. MORIN | afece24 | 2024-06-02 20:23:07 +0200 | [diff] [blame] | 106 | config BR2_CURL |
| 107 | string "Curl command" |
| 108 | default "curl -q --ftp-pasv --retry 3" |
| 109 | |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 110 | config BR2_WGET |
Eric Andersen | 8e5fb3f | 2004-12-11 13:01:10 +0000 | [diff] [blame] | 111 | string "Wget command" |
Peter Korsgaard | 1a61c1d | 2024-06-03 09:28:28 +0200 | [diff] [blame] | 112 | default "wget -nd -t 3" |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 113 | |
Maxime Petazzoni | cf71111 | 2010-09-02 12:09:45 +0200 | [diff] [blame] | 114 | config BR2_SVN |
| 115 | string "Subversion (svn) command" |
Sam Voss | ad477b0 | 2017-11-17 12:50:34 -0600 | [diff] [blame] | 116 | default "svn --non-interactive" |
Eric Andersen | e30cf26 | 2005-01-23 11:20:30 +0000 | [diff] [blame] | 117 | |
Maxime Petazzoni | cf71111 | 2010-09-02 12:09:45 +0200 | [diff] [blame] | 118 | config BR2_BZR |
| 119 | string "Bazaar (bzr) command" |
| 120 | default "bzr" |
Sven Neumann | df03cda | 2009-08-07 11:57:54 +0200 | [diff] [blame] | 121 | |
Ulf Samuelsson | 85f54fb | 2007-08-24 05:31:07 +0000 | [diff] [blame] | 122 | config BR2_GIT |
Maxime Petazzoni | cf71111 | 2010-09-02 12:09:45 +0200 | [diff] [blame] | 123 | string "Git command" |
| 124 | default "git" |
Ulf Samuelsson | 85f54fb | 2007-08-24 05:31:07 +0000 | [diff] [blame] | 125 | |
Gustavo Zacarias | 15eb1fa | 2013-09-11 09:12:04 -0300 | [diff] [blame] | 126 | config BR2_CVS |
| 127 | string "CVS command" |
| 128 | default "cvs" |
| 129 | |
David Wagner | 2690e76 | 2011-09-29 21:57:46 +0200 | [diff] [blame] | 130 | config BR2_LOCALFILES |
| 131 | string "Local files retrieval command" |
| 132 | default "cp" |
| 133 | |
Thomas De Schampheleire | c61788f | 2011-10-19 09:25:40 +0200 | [diff] [blame] | 134 | config BR2_SCP |
| 135 | string "Secure copy (scp) command" |
| 136 | default "scp" |
| 137 | |
Thomas Preston | 16f660f | 2020-04-15 17:48:45 +0100 | [diff] [blame] | 138 | config BR2_SFTP |
| 139 | string "Secure file transfer (sftp) command" |
| 140 | default "sftp" |
| 141 | |
Thomas De Schampheleire | f694c07 | 2011-10-19 09:25:47 +0200 | [diff] [blame] | 142 | config BR2_HG |
| 143 | string "Mercurial (hg) command" |
| 144 | default "hg" |
| 145 | |
Bernhard Reutner-Fischer | 859b913 | 2006-10-01 15:07:45 +0000 | [diff] [blame] | 146 | config BR2_ZCAT |
| 147 | string "zcat command" |
Bernhard Reutner-Fischer | a9612bf | 2007-03-09 08:26:10 +0000 | [diff] [blame] | 148 | default "gzip -d -c" |
Bernhard Reutner-Fischer | 859b913 | 2006-10-01 15:07:45 +0000 | [diff] [blame] | 149 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 150 | Command to be used to extract a gzip'ed file to stdout. zcat |
| 151 | is identical to gunzip -c except that the former may not be |
| 152 | available on your system. |
Bernhard Reutner-Fischer | a9612bf | 2007-03-09 08:26:10 +0000 | [diff] [blame] | 153 | Default is "gzip -d -c" |
| 154 | Other possible values include "gunzip -c" or "zcat". |
Bernhard Reutner-Fischer | 6e2823c | 2006-11-17 15:43:51 +0000 | [diff] [blame] | 155 | |
| 156 | config BR2_BZCAT |
| 157 | string "bzcat command" |
| 158 | default "bzcat" |
| 159 | help |
| 160 | Command to be used to extract a bzip2'ed file to stdout. |
| 161 | bzcat is identical to bunzip2 -c except that the former may |
| 162 | not be available on your system. |
| 163 | Default is "bzcat" |
| 164 | Other possible values include "bunzip2 -c" or "bzip2 -d -c". |
Bernhard Reutner-Fischer | 859b913 | 2006-10-01 15:07:45 +0000 | [diff] [blame] | 165 | |
Allan W. Nielsen | 177b4b4 | 2011-05-10 08:17:05 +0200 | [diff] [blame] | 166 | config BR2_XZCAT |
| 167 | string "xzcat command" |
| 168 | default "xzcat" |
| 169 | help |
| 170 | Command to be used to extract a xz'ed file to stdout. |
| 171 | Default is "xzcat" |
| 172 | |
Baruch Siach | f165032 | 2017-02-12 22:15:39 +0200 | [diff] [blame] | 173 | config BR2_LZCAT |
| 174 | string "lzcat command" |
| 175 | default "lzip -d -c" |
| 176 | help |
| 177 | Command to be used to extract a lzip'ed file to stdout. |
| 178 | Default is "lzip -d -c" |
| 179 | |
Matt Staveley-Taylor | 7d0707c | 2024-04-08 02:38:44 +0100 | [diff] [blame] | 180 | config BR2_ZSTDCAT |
| 181 | string "zstdcat command" |
| 182 | default "zstdcat" |
| 183 | help |
| 184 | Command to be used to extract a zstd'ed file to stdout. |
| 185 | Default is "zstdcat" |
| 186 | |
Bernhard Reutner-Fischer | ce90aae | 2005-12-10 14:59:02 +0000 | [diff] [blame] | 187 | config BR2_TAR_OPTIONS |
| 188 | string "Tar options" |
Bernhard Reutner-Fischer | 7df4de6 | 2005-12-10 15:36:43 +0000 | [diff] [blame] | 189 | default "" |
| 190 | help |
| 191 | Options to pass to tar when extracting the sources. |
Ricardo Martincoski | d610917 | 2018-04-01 02:08:39 -0300 | [diff] [blame] | 192 | E.g. " -v --exclude='*.svn*'" to exclude all .svn internal |
| 193 | files and to be verbose. |
Bernhard Reutner-Fischer | ce90aae | 2005-12-10 14:59:02 +0000 | [diff] [blame] | 194 | |
Thomas Petazzoni | 1592926 | 2010-04-10 22:55:01 +0200 | [diff] [blame] | 195 | endmenu |
| 196 | |
Arnout Vandecappelle (Essensium/Mind) | 4e0170d | 2013-02-06 21:50:57 +0000 | [diff] [blame] | 197 | config BR2_DEFCONFIG_FROM_ENV |
| 198 | string |
| 199 | option env="BR2_DEFCONFIG" |
| 200 | |
| 201 | config BR2_DEFCONFIG |
| 202 | string "Location to save buildroot config" |
| 203 | default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != "" |
| 204 | default "$(CONFIG_DIR)/defconfig" |
| 205 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 206 | When running 'make savedefconfig', the defconfig file will be |
| 207 | saved in this location. |
Arnout Vandecappelle (Essensium/Mind) | 4e0170d | 2013-02-06 21:50:57 +0000 | [diff] [blame] | 208 | |
Mike Frysinger | 59a63a9 | 2005-10-01 00:35:24 +0000 | [diff] [blame] | 209 | config BR2_DL_DIR |
| 210 | string "Download dir" |
H Hartley Sweeten | be695dc | 2009-09-23 08:46:52 +0200 | [diff] [blame] | 211 | default "$(TOPDIR)/dl" |
Mike Frysinger | 59a63a9 | 2005-10-01 00:35:24 +0000 | [diff] [blame] | 212 | help |
| 213 | Directory to store all the source files that we need to fetch. |
Arnout Vandecappelle | 6768021 | 2014-02-04 16:18:51 +0100 | [diff] [blame] | 214 | If the Linux shell environment has defined the BR2_DL_DIR |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 215 | environment variable, then this overrides this configuration |
| 216 | item. |
Thomas Petazzoni | 7e58fdc | 2018-04-17 14:54:45 +0200 | [diff] [blame] | 217 | The directory is organized with a subdirectory for each |
| 218 | package. Each package has its own $(LIBFOO_DL_DIR) variable |
| 219 | that can be used to find the correct path. |
Mike Frysinger | 59a63a9 | 2005-10-01 00:35:24 +0000 | [diff] [blame] | 220 | |
H Hartley Sweeten | be695dc | 2009-09-23 08:46:52 +0200 | [diff] [blame] | 221 | The default is $(TOPDIR)/dl |
Bernhard Reutner-Fischer | 4b0d5a8 | 2007-09-26 21:12:38 +0000 | [diff] [blame] | 222 | |
Gustavo Zacarias | a2b4f7f | 2011-02-02 10:05:56 -0300 | [diff] [blame] | 223 | config BR2_HOST_DIR |
| 224 | string "Host dir" |
| 225 | default "$(BASE_DIR)/host" |
| 226 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 227 | Directory to store all the binary files that are built for the |
| 228 | host. This includes the cross compilation toolchain when |
| 229 | building the internal buildroot toolchain. |
Gustavo Zacarias | a2b4f7f | 2011-02-02 10:05:56 -0300 | [diff] [blame] | 230 | |
| 231 | The default is $(BASE_DIR)/host |
| 232 | |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 233 | menu "Mirrors and Download locations" |
| 234 | |
| 235 | config BR2_PRIMARY_SITE |
| 236 | string "Primary download site" |
| 237 | default "" |
| 238 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 239 | Primary site to download from. If this option is set then |
| 240 | buildroot will try to download package source first from this |
| 241 | site and try the default if the file is not found. |
Jérôme Pouiller | 4a9d980 | 2015-11-18 10:03:25 +0100 | [diff] [blame] | 242 | Valid URIs are: |
| 243 | - URIs recognized by $(WGET) |
| 244 | - local URIs of the form file://absolutepath |
| 245 | - scp URIs of the form scp://[user@]host:path. |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 246 | |
Thomas De Schampheleire | 5a83e08 | 2012-06-22 07:37:03 +0200 | [diff] [blame] | 247 | config BR2_PRIMARY_SITE_ONLY |
| 248 | bool "Only allow downloads from primary download site" |
| 249 | depends on BR2_PRIMARY_SITE != "" |
| 250 | help |
| 251 | If this option is enabled, downloads will only be attempted |
| 252 | from the primary download site. Other locations, like the |
| 253 | package's official download location or the backup download |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 254 | site, will not be considered. Therefore, if the package is not |
| 255 | present on the primary site, the download fails. |
Thomas De Schampheleire | 5a83e08 | 2012-06-22 07:37:03 +0200 | [diff] [blame] | 256 | |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 257 | This is useful for project developers who want to ensure that |
| 258 | the project can be built even if the upstream tarball |
Thomas De Schampheleire | 5a83e08 | 2012-06-22 07:37:03 +0200 | [diff] [blame] | 259 | locations disappear. |
| 260 | |
| 261 | if !BR2_PRIMARY_SITE_ONLY |
| 262 | |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 263 | config BR2_BACKUP_SITE |
| 264 | string "Backup download site" |
Peter Korsgaard | 05296ce | 2023-10-27 14:12:51 +0200 | [diff] [blame] | 265 | default "https://sources.buildroot.net" |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 266 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 267 | Backup site to download from. If this option is set then |
| 268 | buildroot will fall back to download package sources from here |
| 269 | if the normal location fails. |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 270 | |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 271 | config BR2_KERNEL_MIRROR |
| 272 | string "Kernel.org mirror" |
Alexey Brodkin | de76cb7 | 2016-05-23 18:36:53 +0300 | [diff] [blame] | 273 | default "https://cdn.kernel.org/pub" |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 274 | help |
Alexey Brodkin | de76cb7 | 2016-05-23 18:36:53 +0300 | [diff] [blame] | 275 | kernel.org is mirrored on a number of servers around the |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 276 | world. The following allows you to select your preferred |
Alexey Brodkin | de76cb7 | 2016-05-23 18:36:53 +0300 | [diff] [blame] | 277 | mirror. By default, a CDN is used, which automatically |
| 278 | redirects to a mirror geographically close to you. |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 279 | |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 280 | Have a look on the kernel.org site for a list of mirrors, then |
| 281 | enter the URL to the base directory. Examples: |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 282 | |
| 283 | http://www.XX.kernel.org/pub (XX = country code) |
| 284 | http://mirror.aarnet.edu.au/pub/ftp.kernel.org |
| 285 | |
| 286 | config BR2_GNU_MIRROR |
| 287 | string "GNU Software mirror" |
Thomas Petazzoni | 3999f0a | 2016-05-24 20:48:26 +0200 | [diff] [blame] | 288 | default "http://ftpmirror.gnu.org" |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 289 | help |
Thomas Petazzoni | 3999f0a | 2016-05-24 20:48:26 +0200 | [diff] [blame] | 290 | GNU has multiple software mirrors scattered around the |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 291 | world. The following allows you to select your preferred |
Thomas Petazzoni | 3999f0a | 2016-05-24 20:48:26 +0200 | [diff] [blame] | 292 | mirror. By default, a generic address is used, which |
| 293 | automatically selects an up-to-date and local mirror. |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 294 | |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 295 | Have a look on the gnu.org site for a list of mirrors, then |
| 296 | enter the URL to the base directory. Examples: |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 297 | |
| 298 | http://ftp.gnu.org/pub/gnu |
| 299 | http://mirror.aarnet.edu.au/pub/gnu |
| 300 | |
Francois Perrad | 72afb29 | 2014-01-11 16:42:07 +0100 | [diff] [blame] | 301 | config BR2_LUAROCKS_MIRROR |
| 302 | string "LuaRocks mirror" |
Francois Perrad | 0b8411a | 2014-07-25 20:21:24 +0200 | [diff] [blame] | 303 | default "http://rocks.moonscript.org" |
Francois Perrad | 72afb29 | 2014-01-11 16:42:07 +0100 | [diff] [blame] | 304 | help |
| 305 | LuaRocks repository. |
| 306 | |
| 307 | See http://luarocks.org |
| 308 | |
Francois Perrad | 9fbb169 | 2014-02-23 15:17:16 +0100 | [diff] [blame] | 309 | config BR2_CPAN_MIRROR |
| 310 | string "CPAN mirror (Perl packages)" |
Peter Seiderer | add21fd | 2022-12-20 19:03:06 +0100 | [diff] [blame] | 311 | default "https://cpan.metacpan.org" |
Francois Perrad | 9fbb169 | 2014-02-23 15:17:16 +0100 | [diff] [blame] | 312 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 313 | CPAN (Comprehensive Perl Archive Network) is a repository of |
| 314 | Perl packages. It has multiple software mirrors scattered |
Francois Perrad | 9fbb169 | 2014-02-23 15:17:16 +0100 | [diff] [blame] | 315 | around the world. This option allows you to select a mirror. |
| 316 | |
| 317 | The list of mirrors is available at: |
Peter Seiderer | add21fd | 2022-12-20 19:03:06 +0100 | [diff] [blame] | 318 | http://mirrors.cpan.org/ (tabular) |
| 319 | http://mirrors.cpan.org/map.html (clickable world map) |
Francois Perrad | 9fbb169 | 2014-02-23 15:17:16 +0100 | [diff] [blame] | 320 | |
Yann E. MORIN | 3318a5a | 2015-07-14 09:42:40 +0200 | [diff] [blame] | 321 | endif |
| 322 | |
Thomas Petazzoni | 8008007 | 2010-12-05 21:52:37 +0100 | [diff] [blame] | 323 | endmenu |
Thomas Petazzoni | aa41d37 | 2010-04-10 22:55:38 +0200 | [diff] [blame] | 324 | |
Eric Andersen | 8e5fb3f | 2004-12-11 13:01:10 +0000 | [diff] [blame] | 325 | config BR2_JLEVEL |
Nathan Lynch | 5016aa0 | 2012-06-16 09:37:17 +0000 | [diff] [blame] | 326 | int "Number of jobs to run simultaneously (0 for auto)" |
| 327 | default "0" |
Eric Andersen | 8e5fb3f | 2004-12-11 13:01:10 +0000 | [diff] [blame] | 328 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 329 | Number of jobs to run simultaneously. If 0, determine |
| 330 | automatically according to number of CPUs on the host system. |
Bernhard Reutner-Fischer | 93ab6d3 | 2007-01-28 12:03:58 +0000 | [diff] [blame] | 331 | |
Brandon Maier | 3c8cc1d | 2024-03-08 18:26:37 +0000 | [diff] [blame] | 332 | comment "ccache needs a host gcc >= 8" |
| 333 | depends on !BR2_HOST_GCC_AT_LEAST_8 |
| 334 | |
Thomas Petazzoni | 17b66af | 2010-12-07 21:09:56 +0100 | [diff] [blame] | 335 | config BR2_CCACHE |
| 336 | bool "Enable compiler cache" |
Brandon Maier | 3c8cc1d | 2024-03-08 18:26:37 +0000 | [diff] [blame] | 337 | depends on BR2_HOST_GCC_AT_LEAST_8 |
Thomas Petazzoni | 17b66af | 2010-12-07 21:09:56 +0100 | [diff] [blame] | 338 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 339 | This option will enable the use of ccache, a compiler cache. |
| 340 | It will cache the result of previous builds to speed up future |
| 341 | builds. By default, the cache is stored in |
Thomas Petazzoni | 17b66af | 2010-12-07 21:09:56 +0100 | [diff] [blame] | 342 | $HOME/.buildroot-ccache. |
| 343 | |
Thomas Petazzoni | f044e03 | 2012-03-07 20:26:50 +0100 | [diff] [blame] | 344 | Note that Buildroot does not try to invalidate the cache |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 345 | contents when the compiler changes in an incompatible way. |
| 346 | Therefore, if you make a change to the compiler version and/or |
| 347 | configuration, you are responsible for purging the ccache |
| 348 | cache by removing the $HOME/.buildroot-ccache directory. |
Thomas Petazzoni | f044e03 | 2012-03-07 20:26:50 +0100 | [diff] [blame] | 349 | |
Danomi Manchego | dd79f2d | 2014-04-30 22:05:07 -0400 | [diff] [blame] | 350 | if BR2_CCACHE |
| 351 | |
Thomas De Schampheleire | 4332907 | 2012-05-16 21:39:28 +0200 | [diff] [blame] | 352 | config BR2_CCACHE_DIR |
| 353 | string "Compiler cache location" |
Thomas De Schampheleire | 4332907 | 2012-05-16 21:39:28 +0200 | [diff] [blame] | 354 | default "$(HOME)/.buildroot-ccache" |
| 355 | help |
| 356 | Where ccache should store cached files. |
Trent Piepho | ad980cc | 2018-03-15 14:47:33 -0700 | [diff] [blame] | 357 | If the Linux shell environment has defined the BR2_CCACHE_DIR |
| 358 | environment variable, then this overrides this configuration |
| 359 | item. |
Thomas De Schampheleire | 4332907 | 2012-05-16 21:39:28 +0200 | [diff] [blame] | 360 | |
Danomi Manchego | dd79f2d | 2014-04-30 22:05:07 -0400 | [diff] [blame] | 361 | config BR2_CCACHE_INITIAL_SETUP |
| 362 | string "Compiler cache initial setup" |
| 363 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 364 | Initial ccache settings to apply, such as --max-files or |
| 365 | --max-size. |
Danomi Manchego | dd79f2d | 2014-04-30 22:05:07 -0400 | [diff] [blame] | 366 | |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 367 | For example, if your project is known to require more space |
| 368 | than the default max cache size, then you might want to |
| 369 | increase the cache size to a suitable amount using the -M |
| 370 | (--max-size) option. |
Danomi Manchego | dd79f2d | 2014-04-30 22:05:07 -0400 | [diff] [blame] | 371 | |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 372 | The string you specify here is passed verbatim to ccache. |
| 373 | Refer to ccache documentation for more details. |
Danomi Manchego | dd79f2d | 2014-04-30 22:05:07 -0400 | [diff] [blame] | 374 | |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 375 | These initial settings are applied after ccache has been |
| 376 | compiled. |
Danomi Manchego | dd79f2d | 2014-04-30 22:05:07 -0400 | [diff] [blame] | 377 | |
Arnout Vandecappelle | 1e97b27 | 2015-10-04 16:25:32 +0100 | [diff] [blame] | 378 | config BR2_CCACHE_USE_BASEDIR |
| 379 | bool "Use relative paths" |
| 380 | default y |
| 381 | help |
| 382 | Allow ccache to convert absolute paths within the output |
| 383 | directory into relative paths. |
| 384 | |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 385 | During the build, many -I include directives are given with an |
| 386 | absolute path. These absolute paths end up in the hashes that |
| 387 | are computed by ccache. Therefore, when you build from a |
| 388 | different directory, the hash will be different and the cached |
| 389 | object will not be used. |
Arnout Vandecappelle | 1e97b27 | 2015-10-04 16:25:32 +0100 | [diff] [blame] | 390 | |
| 391 | To improve cache performance, set this option to y. This |
| 392 | allows ccache to rewrite absolute paths within the output |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 393 | directory into relative paths. Note that only paths within the |
| 394 | output directory will be rewritten; therefore, if you change |
| 395 | BR2_HOST_DIR to point outside the output directory and |
Arnout Vandecappelle | 1e97b27 | 2015-10-04 16:25:32 +0100 | [diff] [blame] | 396 | subsequently move it to a different location, this will lead |
| 397 | to cache misses. |
| 398 | |
| 399 | This option has as a result that the debug information in the |
| 400 | object files also has only relative paths. Therefore, make |
| 401 | sure you cd to the build directory before starting gdb. See |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 402 | the section "COMPILING IN DIFFERENT DIRECTORIES" in the ccache |
| 403 | manual for more information. |
Arnout Vandecappelle | 1e97b27 | 2015-10-04 16:25:32 +0100 | [diff] [blame] | 404 | |
Danomi Manchego | dd79f2d | 2014-04-30 22:05:07 -0400 | [diff] [blame] | 405 | endif |
| 406 | |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 407 | config BR2_ENABLE_DEBUG |
| 408 | bool "build packages with debugging symbols" |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 409 | help |
Thomas Petazzoni | a9a3467 | 2012-03-14 23:49:58 +0100 | [diff] [blame] | 410 | Build packages with debugging symbols enabled. All libraries |
| 411 | and binaries in the 'staging' directory will have debugging |
| 412 | symbols, which allows remote debugging even if libraries and |
| 413 | binaries are stripped on the target. Whether libraries and |
| 414 | binaries are stripped on the target is controlled by the |
| 415 | BR2_STRIP_* options below. |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 416 | |
| 417 | if BR2_ENABLE_DEBUG |
| 418 | choice |
| 419 | prompt "gcc debug level" |
| 420 | default BR2_DEBUG_2 |
| 421 | help |
| 422 | Set the debug level for gcc |
| 423 | |
| 424 | config BR2_DEBUG_1 |
| 425 | bool "debug level 1" |
| 426 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 427 | Debug level 1 produces minimal information, enough for making |
| 428 | backtraces in parts of the program that you don't plan to |
| 429 | debug. This includes descriptions of functions and external |
| 430 | variables, but no information about local variables and no |
| 431 | line numbers. |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 432 | |
| 433 | config BR2_DEBUG_2 |
| 434 | bool "debug level 2" |
| 435 | help |
| 436 | The default gcc debug level is 2 |
| 437 | |
| 438 | config BR2_DEBUG_3 |
| 439 | bool "debug level 3" |
| 440 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 441 | Level 3 includes extra information, such as all the macro |
| 442 | definitions present in the program. Some debuggers support |
| 443 | macro expansion when you use -g3. |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 444 | endchoice |
| 445 | endif |
| 446 | |
Thomas De Schampheleire | b7939fe | 2021-06-01 16:34:06 +0200 | [diff] [blame] | 447 | config BR2_ENABLE_RUNTIME_DEBUG |
| 448 | bool "build packages with runtime debugging info" |
| 449 | help |
| 450 | Some packages may have runtime assertions, extra traces, and |
| 451 | similar runtime elements that can help debugging. However, |
| 452 | these elements may negatively influence performance so should |
| 453 | normally not be enabled on production systems. |
| 454 | |
| 455 | Enable this option to enable such runtime debugging. |
| 456 | |
| 457 | Note: disabling this option is not a guarantee that all |
| 458 | packages effectively removed these runtime debugging elements. |
| 459 | |
Bernhard Reutner-Fischer | bbd251a | 2007-07-31 18:06:50 +0000 | [diff] [blame] | 460 | config BR2_STRIP_strip |
Yann E. MORIN | 0d643fd | 2017-07-01 14:51:21 +0200 | [diff] [blame] | 461 | bool "strip target binaries" |
Yann E. MORIN | 0d643fd | 2017-07-01 14:51:21 +0200 | [diff] [blame] | 462 | default y |
Damien Le Moal | 9db5eb2 | 2022-07-20 11:45:25 +0900 | [diff] [blame] | 463 | depends on BR2_BINFMT_ELF |
Bernhard Reutner-Fischer | bbd251a | 2007-07-31 18:06:50 +0000 | [diff] [blame] | 464 | help |
Thomas Petazzoni | a9a3467 | 2012-03-14 23:49:58 +0100 | [diff] [blame] | 465 | Binaries and libraries in the target filesystem will be |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 466 | stripped using the normal 'strip' command. This allows to save |
| 467 | space, mainly by removing debugging symbols. Debugging symbols |
| 468 | on the target are needed for native debugging, but not when |
| 469 | remote debugging is used. |
Ulf Samuelsson | 85f54fb | 2007-08-24 05:31:07 +0000 | [diff] [blame] | 470 | |
Thomas De Schampheleire | 2a97045 | 2012-06-21 19:34:50 +0000 | [diff] [blame] | 471 | config BR2_STRIP_EXCLUDE_FILES |
| 472 | string "executables that should not be stripped" |
Thomas De Schampheleire | 2a97045 | 2012-06-21 19:34:50 +0000 | [diff] [blame] | 473 | default "" |
Ricardo Martincoski | a126444 | 2018-04-01 02:08:33 -0300 | [diff] [blame] | 474 | depends on BR2_STRIP_strip |
Thomas De Schampheleire | 2a97045 | 2012-06-21 19:34:50 +0000 | [diff] [blame] | 475 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 476 | You may specify a space-separated list of binaries and |
| 477 | libraries here that should not be stripped on the target. |
Thomas De Schampheleire | 2a97045 | 2012-06-21 19:34:50 +0000 | [diff] [blame] | 478 | |
| 479 | config BR2_STRIP_EXCLUDE_DIRS |
| 480 | string "directories that should be skipped when stripping" |
Thomas De Schampheleire | 2a97045 | 2012-06-21 19:34:50 +0000 | [diff] [blame] | 481 | default "" |
Ricardo Martincoski | a126444 | 2018-04-01 02:08:33 -0300 | [diff] [blame] | 482 | depends on BR2_STRIP_strip |
Thomas De Schampheleire | 2a97045 | 2012-06-21 19:34:50 +0000 | [diff] [blame] | 483 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 484 | You may specify a space-separated list of directories that |
| 485 | should be skipped when stripping. Binaries and libraries in |
| 486 | these directories will not be touched. The directories should |
| 487 | be specified relative to the target directory, without leading |
| 488 | slash. |
Thomas De Schampheleire | 2a97045 | 2012-06-21 19:34:50 +0000 | [diff] [blame] | 489 | |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 490 | choice |
| 491 | prompt "gcc optimization level" |
Thomas Petazzoni | 292949c | 2024-01-02 09:36:42 +0100 | [diff] [blame] | 492 | default BR2_OPTIMIZE_2 |
John Voltz | 923f42a | 2008-03-12 11:23:11 +0000 | [diff] [blame] | 493 | help |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 494 | Set the optimization level for gcc |
| 495 | |
| 496 | config BR2_OPTIMIZE_0 |
| 497 | bool "optimization level 0" |
| 498 | help |
Lothar Felten | 4e09fd8 | 2017-10-20 13:19:17 +0200 | [diff] [blame] | 499 | Do not optimize. |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 500 | |
| 501 | config BR2_OPTIMIZE_1 |
| 502 | bool "optimization level 1" |
| 503 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 504 | Optimize. Optimizing compilation takes somewhat more time, and |
| 505 | a lot more memory for a large function. With -O, the compiler |
| 506 | tries to reduce code size and execution time, without |
| 507 | performing any optimizations that take a great deal of |
| 508 | compilation time. -O turns on the following optimization |
Peter Korsgaard | 02a623d | 2008-08-04 19:07:05 +0000 | [diff] [blame] | 509 | flags: -fdefer-pop -fdelayed-branch -fguess-branch-probability |
| 510 | -fcprop-registers -floop-optimize -fif-conversion |
| 511 | -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts |
| 512 | -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 513 | -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants. -O |
| 514 | also turns on -fomit-frame-pointer on machines where doing so |
| 515 | does not interfere with debugging. |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 516 | |
| 517 | config BR2_OPTIMIZE_2 |
| 518 | bool "optimization level 2" |
| 519 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 520 | Optimize even more. GCC performs nearly all supported |
| 521 | optimizations that do not involve a space-speed tradeoff. The |
| 522 | compiler does not perform loop unrolling or function inlining |
| 523 | when you specify -O2. As compared to -O, this option increases |
| 524 | both compilation time and the performance of the generated |
| 525 | code. -O2 turns on all optimization flags specified by -O. It |
| 526 | also turns on the following optimization flags: |
| 527 | -fthread-jumps -fcrossjumping -foptimize-sibling-calls |
Peter Korsgaard | 02a623d | 2008-08-04 19:07:05 +0000 | [diff] [blame] | 528 | -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 529 | -fexpensive-optimizations -fstrength-reduce |
| 530 | -frerun-cse-after-loop -frerun-loop-opt -fcaller-saves |
| 531 | -fpeephole2 -fschedule-insns -fschedule-insns2 |
| 532 | -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing |
| 533 | -fdelete-null-pointer-checks -freorder-blocks |
| 534 | -freorder-functions -falign-functions -falign-jumps |
| 535 | -falign-loops -falign-labels -ftree-vrp -ftree-pre. Please |
| 536 | note the warning under -fgcse about invoking -O2 on programs |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 537 | that use computed gotos. |
Thomas Petazzoni | 292949c | 2024-01-02 09:36:42 +0100 | [diff] [blame] | 538 | This is the default. |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 539 | |
| 540 | config BR2_OPTIMIZE_3 |
| 541 | bool "optimization level 3" |
| 542 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 543 | Optimize yet more. -O3 turns on all optimizations specified by |
| 544 | -O2 and also turns on the -finline-functions, -funswitch-loops |
| 545 | and -fgcse-after-reload options. |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 546 | |
Martin Kelly | 5ff8459 | 2016-05-18 14:17:55 -0700 | [diff] [blame] | 547 | config BR2_OPTIMIZE_G |
| 548 | bool "optimize for debugging" |
| 549 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 |
| 550 | help |
| 551 | Optimize for debugging. This enables optimizations that do not |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 552 | interfere with debugging. It should be the optimization level |
| 553 | of choice for the standard edit-compile-debug cycle, offering |
| 554 | a reasonable level of optimization while maintaining fast |
| 555 | compilation and a good debugging experience. |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 556 | |
| 557 | config BR2_OPTIMIZE_S |
| 558 | bool "optimize for size" |
| 559 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 560 | Optimize for size. -Os enables all -O2 optimizations that do |
| 561 | not typically increase code size. It also performs further |
| 562 | optimizations designed to reduce code size. -Os disables the |
| 563 | following optimization flags: -falign-functions -falign-jumps |
| 564 | -falign-loops -falign-labels -freorder-blocks |
| 565 | -freorder-blocks-and-partition -fprefetch-loop-arrays |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 566 | -ftree-vect-loop-version |
Peter Korsgaard | 02a623d | 2008-08-04 19:07:05 +0000 | [diff] [blame] | 567 | |
Joshua Henderson | ed6a7e1 | 2018-03-26 12:34:05 -0700 | [diff] [blame] | 568 | config BR2_OPTIMIZE_FAST |
Fabrice Fontaine | 3e186ce | 2020-07-16 23:44:51 +0200 | [diff] [blame] | 569 | bool "optimize for fast (may break packages!)" |
Joshua Henderson | ed6a7e1 | 2018-03-26 12:34:05 -0700 | [diff] [blame] | 570 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 |
| 571 | help |
| 572 | Optimize for fast. Disregard strict standards |
| 573 | compliance. -Ofast enables all -O3 optimizations. It also |
| 574 | enables optimizations that are not valid for all |
Fabrice Fontaine | 3e186ce | 2020-07-16 23:44:51 +0200 | [diff] [blame] | 575 | standard-compliant programs, so be careful, as it may break |
| 576 | some packages. It turns on -ffast-math and the |
Joshua Henderson | ed6a7e1 | 2018-03-26 12:34:05 -0700 | [diff] [blame] | 577 | Fortran-specific -fstack-arrays, unless -fmax-stack-var-size |
| 578 | is specified, and -fno-protect-parens. |
| 579 | |
John Voltz | 41f6b79 | 2008-03-12 13:07:10 +0000 | [diff] [blame] | 580 | endchoice |
John Voltz | 923f42a | 2008-03-12 11:23:11 +0000 | [diff] [blame] | 581 | |
Arnout Vandecappelle (Essensium/Mind) | fb51422 | 2022-07-25 17:22:25 +0200 | [diff] [blame] | 582 | config BR2_ENABLE_LTO |
| 583 | bool "build packages with link-time optimisation" |
| 584 | help |
| 585 | Enable the link-time optimisation (LTO) option when building |
| 586 | packages. Link-time optimisation re-runs optimisations at |
| 587 | link time, which allows the compiler to do interprocedural |
| 588 | analysis across compilation units and thus come with better |
| 589 | results: smaller size and better performance. |
| 590 | |
| 591 | Note that this analysis is limited to statically linked |
| 592 | object files and libraries. |
| 593 | |
| 594 | This option may significantly increase build times, |
| 595 | sometimes 5 times longer, with only limited gains. |
| 596 | |
| 597 | At this time, this option only enables LTO in packages that |
| 598 | have an explicit configuration option for it. Other packages |
| 599 | always enable LTO, but most packages never enable LTO. |
| 600 | |
Pascal Huerst | 09a1a10 | 2014-07-31 22:08:55 +0200 | [diff] [blame] | 601 | config BR2_GOOGLE_BREAKPAD_ENABLE |
| 602 | bool "Enable google-breakpad support" |
Pascal Huerst | 09a1a10 | 2014-07-31 22:08:55 +0200 | [diff] [blame] | 603 | depends on BR2_INSTALL_LIBSTDCPP |
Fabrice Fontaine | 109362c | 2024-03-03 14:22:22 +0100 | [diff] [blame] | 604 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17 |
Gustavo Zacarias | e9ffb3b | 2016-09-14 21:46:29 -0300 | [diff] [blame] | 605 | depends on BR2_USE_WCHAR |
Thomas Petazzoni | 0bb3983 | 2016-09-19 16:50:46 +0200 | [diff] [blame] | 606 | depends on BR2_TOOLCHAIN_HAS_THREADS |
Adam Duskett | c20334d | 2023-12-02 21:18:35 -0700 | [diff] [blame] | 607 | depends on BR2_TOOLCHAIN_USES_GLIBC |
Pascal Huerst | 09a1a10 | 2014-07-31 22:08:55 +0200 | [diff] [blame] | 608 | depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS |
Thomas Petazzoni | fadc438 | 2017-11-26 15:40:19 +0100 | [diff] [blame] | 609 | depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS |
Ricardo Martincoski | a126444 | 2018-04-01 02:08:33 -0300 | [diff] [blame] | 610 | select BR2_PACKAGE_GOOGLE_BREAKPAD |
Pascal Huerst | 09a1a10 | 2014-07-31 22:08:55 +0200 | [diff] [blame] | 611 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 612 | This option will enable the use of google breakpad, a library |
| 613 | and tool suite that allows you to distribute an application to |
| 614 | users with compiler-provided debugging information removed, |
| 615 | record crashes in compact "minidump" files, send them back to |
| 616 | your server and produce C and C++ stack traces from these |
| 617 | minidumps. Breakpad can also write minidumps on request for |
| 618 | programs that have not crashed. |
Pascal Huerst | 09a1a10 | 2014-07-31 22:08:55 +0200 | [diff] [blame] | 619 | |
| 620 | if BR2_GOOGLE_BREAKPAD_ENABLE |
| 621 | |
| 622 | config BR2_GOOGLE_BREAKPAD_INCLUDE_FILES |
| 623 | string "List of executables and libraries to extract symbols from" |
| 624 | default "" |
| 625 | help |
| 626 | You may specify a space-separated list of binaries and |
| 627 | libraries with full paths relative to $(TARGET_DIR) of which |
| 628 | debug symbols will be dumped for further use with google |
| 629 | breakpad. |
| 630 | |
| 631 | A directory structure that can be used by minidump-stackwalk |
| 632 | will be created at: |
| 633 | |
| 634 | $(STAGING_DIR)/usr/share/google-breakpad-symbols |
| 635 | |
| 636 | endif |
| 637 | |
Steven Noonan | d29c719 | 2015-12-27 12:07:31 +0100 | [diff] [blame] | 638 | choice |
Thomas Petazzoni | 158001f | 2014-12-11 23:50:09 +0100 | [diff] [blame] | 639 | bool "libraries" |
Thomas Petazzoni | f1d3e09 | 2014-12-11 23:50:11 +0100 | [diff] [blame] | 640 | default BR2_SHARED_LIBS if BR2_BINFMT_SUPPORTS_SHARED |
Thomas Petazzoni | 158001f | 2014-12-11 23:50:09 +0100 | [diff] [blame] | 641 | default BR2_STATIC_LIBS if !BR2_BINFMT_SUPPORTS_SHARED |
Bernhard Reutner-Fischer | 3096f34 | 2007-06-01 22:16:28 +0000 | [diff] [blame] | 642 | help |
Thomas Petazzoni | 158001f | 2014-12-11 23:50:09 +0100 | [diff] [blame] | 643 | Select the type of libraries you want to use on the target. |
Bernhard Reutner-Fischer | 3096f34 | 2007-06-01 22:16:28 +0000 | [diff] [blame] | 644 | |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 645 | The default is to build dynamic libraries and use those on the |
| 646 | target filesystem, except when the architecture and/or the |
| 647 | selected binary format does not support shared libraries. |
Alexey Brodkin | 7d9c0df | 2014-10-12 18:34:44 +0200 | [diff] [blame] | 648 | |
Thomas Petazzoni | 158001f | 2014-12-11 23:50:09 +0100 | [diff] [blame] | 649 | config BR2_STATIC_LIBS |
| 650 | bool "static only" |
Arnout Vandecappelle (Essensium/Mind) | 90932b4 | 2021-10-06 22:41:32 +0200 | [diff] [blame] | 651 | depends on !BR2_TOOLCHAIN_USES_GLIBC |
Thomas Petazzoni | 158001f | 2014-12-11 23:50:09 +0100 | [diff] [blame] | 652 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 653 | Build and use only static libraries. No shared libraries will |
Bernd Kuhls | d9312d6 | 2016-07-31 18:02:47 +0200 | [diff] [blame] | 654 | be installed on the target. This potentially increases your |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 655 | code size and should only be used if you know what you are |
| 656 | doing. Note that some packages may not be available when this |
| 657 | option is enabled, due to their need for dynamic library |
| 658 | support. |
Thomas Petazzoni | 158001f | 2014-12-11 23:50:09 +0100 | [diff] [blame] | 659 | |
Arnout Vandecappelle (Essensium/Mind) | 90932b4 | 2021-10-06 22:41:32 +0200 | [diff] [blame] | 660 | comment "static only needs a toolchain w/ uclibc or musl" |
| 661 | depends on BR2_TOOLCHAIN_USES_GLIBC |
| 662 | |
Thomas Petazzoni | 158001f | 2014-12-11 23:50:09 +0100 | [diff] [blame] | 663 | config BR2_SHARED_LIBS |
| 664 | bool "shared only" |
| 665 | depends on BR2_BINFMT_SUPPORTS_SHARED |
| 666 | help |
| 667 | Build and use only shared libraries. This is the recommended |
| 668 | solution as it saves space and build time. |
| 669 | |
| 670 | config BR2_SHARED_STATIC_LIBS |
| 671 | bool "both static and shared" |
| 672 | depends on BR2_BINFMT_SUPPORTS_SHARED |
| 673 | help |
| 674 | Build both shared and static libraries, but link executables |
| 675 | dynamically. While building both shared and static libraries |
| 676 | take more time and more disk space, having static libraries |
| 677 | may be useful to link some of the applications statically. |
| 678 | |
| 679 | endchoice |
Alexey Brodkin | 7d9c0df | 2014-10-12 18:34:44 +0200 | [diff] [blame] | 680 | |
Thomas Petazzoni | ee0246e | 2011-09-29 21:57:38 +0200 | [diff] [blame] | 681 | config BR2_PACKAGE_OVERRIDE_FILE |
| 682 | string "location of a package override file" |
Yann E. MORIN | eda3d0e | 2014-01-29 22:48:24 +0100 | [diff] [blame] | 683 | default "$(CONFIG_DIR)/local.mk" |
Thomas Petazzoni | ee0246e | 2011-09-29 21:57:38 +0200 | [diff] [blame] | 684 | help |
| 685 | A package override file is a short makefile that contains |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 686 | variable definitions of the form <pkg>_OVERRIDE_SRCDIR, which |
| 687 | allows to tell Buildroot to use an existing directory as the |
| 688 | source directory for a particular package. See the Buildroot |
| 689 | documentation for more details on this feature. |
Thomas Petazzoni | ee0246e | 2011-09-29 21:57:38 +0200 | [diff] [blame] | 690 | |
Simon Dawson | 5538e47 | 2013-03-17 23:13:47 +0000 | [diff] [blame] | 691 | config BR2_GLOBAL_PATCH_DIR |
Yann E. MORIN | 5d36710 | 2023-11-06 20:09:13 +0100 | [diff] [blame] | 692 | string "global patch and hash directories" |
Simon Dawson | 5538e47 | 2013-03-17 23:13:47 +0000 | [diff] [blame] | 693 | help |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 694 | You may specify a space separated list of one or more |
Yann E. MORIN | 5d36710 | 2023-11-06 20:09:13 +0100 | [diff] [blame] | 695 | directories containing global package patches and/or hashes. |
| 696 | For a specific version <packageversion> of a specific package |
| 697 | <packagename>, patches are looked up as follows: |
Simon Dawson | 5538e47 | 2013-03-17 23:13:47 +0000 | [diff] [blame] | 698 | |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 699 | First, the default Buildroot patch set for the package is |
| 700 | applied from the package's directory in Buildroot. |
Simon Dawson | 5538e47 | 2013-03-17 23:13:47 +0000 | [diff] [blame] | 701 | |
Ryan Barnett | bc4f79d | 2013-12-18 04:25:01 -0600 | [diff] [blame] | 702 | Then for every directory - <global-patch-dir> - that exists in |
| 703 | BR2_GLOBAL_PATCH_DIR, if the directory |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 704 | <global-patch-dir>/<packagename>/<packageversion>/ exists, |
| 705 | then all *.patch files in this directory will be applied. |
Simon Dawson | 5538e47 | 2013-03-17 23:13:47 +0000 | [diff] [blame] | 706 | |
Martin Kelly | 65f9b93 | 2016-05-31 09:57:22 -0700 | [diff] [blame] | 707 | Otherwise, if the directory <global-patch-dir>/<packagename> |
| 708 | exists, then all *.patch files in the directory will be |
| 709 | applied. |
Simon Dawson | 5538e47 | 2013-03-17 23:13:47 +0000 | [diff] [blame] | 710 | |
Yann E. MORIN | 5d36710 | 2023-11-06 20:09:13 +0100 | [diff] [blame] | 711 | The hash files are looked up similarly to the patches. |
| 712 | |
Thomas Petazzoni | 4ac8f78 | 2014-12-10 23:53:57 +0100 | [diff] [blame] | 713 | menu "Advanced" |
| 714 | |
Bryce Ferguson | 3f1b965 | 2018-11-26 22:10:09 -0600 | [diff] [blame] | 715 | config BR2_FORCE_HOST_BUILD |
| 716 | bool "Force the building of host dependencies" |
| 717 | help |
| 718 | Build all available host dependencies, even if they are |
| 719 | already installed on the system. |
| 720 | |
| 721 | This option can be used to ensure that the download cache of |
| 722 | source archives for packages remain consistent between |
| 723 | different build hosts. |
| 724 | |
| 725 | This option will increase build time. |
| 726 | |
Yann E. MORIN | e091e31 | 2023-11-06 20:09:14 +0100 | [diff] [blame] | 727 | config BR2_DOWNLOAD_FORCE_CHECK_HASHES |
| 728 | bool "Force all downloads to have a valid hash" |
Yann E. MORIN | e091e31 | 2023-11-06 20:09:14 +0100 | [diff] [blame] | 729 | help |
Yann E. MORIN | e091e31 | 2023-11-06 20:09:14 +0100 | [diff] [blame] | 730 | Say 'y' here to enforce downloads to have at least one valid |
| 731 | hash (and of course, that all hashes be valid). |
| 732 | |
Thomas Petazzoni | 5b0c02a | 2023-12-27 18:07:58 +0100 | [diff] [blame] | 733 | By default, Buildroot checks hashes of all packages |
| 734 | downloaded, except those for which a custom version is |
| 735 | used. |
Yann E. MORIN | e091e31 | 2023-11-06 20:09:14 +0100 | [diff] [blame] | 736 | |
Thomas Petazzoni | 5b0c02a | 2023-12-27 18:07:58 +0100 | [diff] [blame] | 737 | With this option turned on, Buildroot will check hashes of |
| 738 | all packages, including those that use a custom version. In |
| 739 | order to provide hashes for such packages, place additional |
| 740 | hash files in BR2_GLOBAL_PATCH_DIR directories. |
Yann E. MORIN | e091e31 | 2023-11-06 20:09:14 +0100 | [diff] [blame] | 741 | |
Gilles Chanteperdrix | 71574a6 | 2016-06-14 17:31:09 +0200 | [diff] [blame] | 742 | config BR2_REPRODUCIBLE |
| 743 | bool "Make the build reproducible (experimental)" |
Yann E. MORIN | 6393b69 | 2017-10-21 22:31:02 +0200 | [diff] [blame] | 744 | # SOURCE_DATE_EPOCH support in toolchain-wrapper requires GCC 4.4 |
| 745 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 |
Jerzy Grzegorek | a446ab7 | 2016-07-02 17:06:18 +0200 | [diff] [blame] | 746 | help |
| 747 | This option will remove all sources of non-reproducibility |
| 748 | from the build process. For a given Buildroot configuration, |
| 749 | this allows to generate exactly identical binaries from one |
| 750 | build to the other, including on different machines. |
Gilles Chanteperdrix | 71574a6 | 2016-06-14 17:31:09 +0200 | [diff] [blame] | 751 | |
Jérôme Pouiller | bedb161 | 2016-11-23 13:58:56 +0100 | [diff] [blame] | 752 | The current implementation is restricted to builds with the |
| 753 | same output directory. Many (absolute) paths are recorded in |
| 754 | intermediary files, and it is very likely that some of these |
| 755 | paths leak into the target rootfs. If you build with the |
| 756 | same O=... path, however, the result is identical. |
| 757 | |
Jerzy Grzegorek | a446ab7 | 2016-07-02 17:06:18 +0200 | [diff] [blame] | 758 | This is labeled as an experimental feature, as not all |
| 759 | packages behave properly to ensure reproducibility. |
Gilles Chanteperdrix | 71574a6 | 2016-06-14 17:31:09 +0200 | [diff] [blame] | 760 | |
Thomas Petazzoni | c4e6d5c | 2019-11-05 17:46:40 +0100 | [diff] [blame] | 761 | config BR2_PER_PACKAGE_DIRECTORIES |
| 762 | bool "Use per-package directories (experimental)" |
| 763 | help |
| 764 | This option will change the build process of Buildroot |
| 765 | package to use per-package target and host directories. |
| 766 | |
| 767 | This is useful for two related purposes: |
| 768 | |
| 769 | - Cleanly isolate the build of each package, so that a |
| 770 | given package only "sees" the dependencies it has |
| 771 | explicitly expressed, and not other packages that may |
| 772 | have by chance been built before. |
| 773 | |
| 774 | - Enable top-level parallel build. |
| 775 | |
| 776 | This is labeled as an experimental feature, as not all |
| 777 | packages behave properly with per-package directories. |
| 778 | |
Eric Andersen | 8e5fb3f | 2004-12-11 13:01:10 +0000 | [diff] [blame] | 779 | endmenu |
Eric Andersen | 2d523c2 | 2004-10-09 01:06:03 +0000 | [diff] [blame] | 780 | |
Thomas Petazzoni | 3c427c6 | 2022-10-12 23:50:08 +0200 | [diff] [blame] | 781 | config BR2_TIME_BITS_64 |
| 782 | bool "Build Y2038-ready code" |
| 783 | depends on BR2_TOOLCHAIN_USES_GLIBC && !BR2_ARCH_IS_64 |
| 784 | help |
| 785 | This option will pass -D_TIME_BITS=64 in the compiler flags |
| 786 | to ensure the glibc C library uses a 64-bit representation |
| 787 | for time_t and other time types, which ensures that |
| 788 | programs/libraries will correctly handle time past year |
| 789 | 2038. |
| 790 | |
| 791 | This option only has an effect with glibc >= 2.34, as |
| 792 | earlier glibc versions did not have support for 64-bit |
| 793 | time_t. |
| 794 | |
Matt Weber | d3732cf | 2018-01-23 22:09:40 -0600 | [diff] [blame] | 795 | comment "Security Hardening Options" |
| 796 | |
Thomas Petazzoni | 70dd4bd | 2021-07-25 15:45:19 +0200 | [diff] [blame] | 797 | config BR2_PIC_PIE_ARCH_SUPPORTS |
| 798 | bool |
Fabrice Fontaine | 810ba38 | 2021-05-03 20:22:41 +0200 | [diff] [blame] | 799 | default y |
Romain Naour | d120f84 | 2021-06-12 12:24:49 +0200 | [diff] [blame] | 800 | # Microblaze glibc toolchains don't work with PIC/PIE enabled |
| 801 | depends on !BR2_microblaze |
Romain Naour | 6b4b63a | 2021-06-01 21:00:21 +0200 | [diff] [blame] | 802 | # Nios2 toolchains produce non working binaries with -fPIC |
| 803 | depends on !BR2_nios2 |
Thomas Petazzoni | 70dd4bd | 2021-07-25 15:45:19 +0200 | [diff] [blame] | 804 | |
| 805 | config BR2_PIC_PIE |
| 806 | bool "Build code with PIC/PIE" |
| 807 | default y |
| 808 | depends on BR2_PIC_PIE_ARCH_SUPPORTS |
Yann E. MORIN | 814f6e1 | 2019-03-12 13:09:36 +0100 | [diff] [blame] | 809 | depends on BR2_SHARED_LIBS |
Fabrice Fontaine | de3fa43 | 2019-10-27 23:03:34 +0100 | [diff] [blame] | 810 | depends on BR2_TOOLCHAIN_SUPPORTS_PIE |
Yann E. MORIN | 814f6e1 | 2019-03-12 13:09:36 +0100 | [diff] [blame] | 811 | help |
| 812 | Generate Position-Independent Code (PIC) and link |
| 813 | Position-Independent Executables (PIE). |
| 814 | |
Fabrice Fontaine | de3fa43 | 2019-10-27 23:03:34 +0100 | [diff] [blame] | 815 | comment "PIC/PIE needs a toolchain w/ PIE" |
Thomas Petazzoni | 70dd4bd | 2021-07-25 15:45:19 +0200 | [diff] [blame] | 816 | depends on BR2_PIC_PIE_ARCH_SUPPORTS |
Fabrice Fontaine | de3fa43 | 2019-10-27 23:03:34 +0100 | [diff] [blame] | 817 | depends on BR2_SHARED_LIBS |
| 818 | depends on !BR2_TOOLCHAIN_SUPPORTS_PIE |
| 819 | |
Matt Weber | d3732cf | 2018-01-23 22:09:40 -0600 | [diff] [blame] | 820 | choice |
| 821 | bool "Stack Smashing Protection" |
Fabrice Fontaine | 5073907 | 2021-05-04 22:09:11 +0200 | [diff] [blame] | 822 | default BR2_SSP_ALL if BR2_ENABLE_SSP # legacy |
Fabrice Fontaine | 810ba38 | 2021-05-03 20:22:41 +0200 | [diff] [blame] | 823 | default BR2_SSP_STRONG if BR2_TOOLCHAIN_HAS_SSP_STRONG |
| 824 | default BR2_SSP_REGULAR |
Matt Weber | d3732cf | 2018-01-23 22:09:40 -0600 | [diff] [blame] | 825 | depends on BR2_TOOLCHAIN_HAS_SSP |
| 826 | help |
| 827 | Enable stack smashing protection support using GCC's |
| 828 | -fstack-protector option family. |
| 829 | |
| 830 | See |
| 831 | http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt |
| 832 | for details. |
| 833 | |
| 834 | Note that this requires the toolchain to have SSP support. |
| 835 | This is always the case for glibc and eglibc toolchain, but is |
| 836 | optional in uClibc toolchains. |
| 837 | |
| 838 | config BR2_SSP_NONE |
| 839 | bool "None" |
| 840 | help |
| 841 | Disable stack-smashing protection. |
| 842 | |
| 843 | config BR2_SSP_REGULAR |
| 844 | bool "-fstack-protector" |
| 845 | help |
| 846 | Emit extra code to check for buffer overflows, such as stack |
| 847 | smashing attacks. This is done by adding a guard variable to |
| 848 | functions with vulnerable objects. This includes functions |
| 849 | that call alloca, and functions with buffers larger than 8 |
| 850 | bytes. The guards are initialized when a function is entered |
| 851 | and then checked when the function exits. If a guard check |
| 852 | fails, an error message is printed and the program exits. |
| 853 | |
| 854 | config BR2_SSP_STRONG |
| 855 | bool "-fstack-protector-strong" |
Thomas Petazzoni | 058dc9a | 2020-02-20 03:01:16 +0100 | [diff] [blame] | 856 | depends on BR2_TOOLCHAIN_HAS_SSP_STRONG |
Matt Weber | d3732cf | 2018-01-23 22:09:40 -0600 | [diff] [blame] | 857 | help |
| 858 | Like -fstack-protector but includes additional functions to be |
| 859 | protected - those that have local array definitions, or have |
| 860 | references to local frame addresses. |
| 861 | |
Yann E. MORIN | 51db897 | 2019-03-12 13:09:35 +0100 | [diff] [blame] | 862 | -fstack-protector-strong officially appeared in gcc 4.9, but |
| 863 | some vendors have backported -fstack-protector-strong to older |
| 864 | versions of gcc. |
Matt Weber | d3732cf | 2018-01-23 22:09:40 -0600 | [diff] [blame] | 865 | |
| 866 | config BR2_SSP_ALL |
| 867 | bool "-fstack-protector-all" |
| 868 | help |
| 869 | Like -fstack-protector except that all functions are |
| 870 | protected. This option might have a significant performance |
| 871 | impact on the compiled binaries. |
| 872 | |
| 873 | endchoice |
| 874 | |
Yann E. MORIN | b8ec113 | 2019-03-12 13:09:33 +0100 | [diff] [blame] | 875 | config BR2_SSP_OPTION |
| 876 | string |
| 877 | default "-fstack-protector" if BR2_SSP_REGULAR |
| 878 | default "-fstack-protector-strong" if BR2_SSP_STRONG |
| 879 | default "-fstack-protector-all" if BR2_SSP_ALL |
| 880 | |
Matt Weber | d3732cf | 2018-01-23 22:09:40 -0600 | [diff] [blame] | 881 | comment "Stack Smashing Protection needs a toolchain w/ SSP" |
| 882 | depends on !BR2_TOOLCHAIN_HAS_SSP |
| 883 | |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 884 | choice |
| 885 | bool "RELRO Protection" |
Fabrice Fontaine | 810ba38 | 2021-05-03 20:22:41 +0200 | [diff] [blame] | 886 | default BR2_RELRO_FULL if BR2_TOOLCHAIN_SUPPORTS_PIE |
| 887 | default BR2_RELRO_PARTIAL |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 888 | depends on BR2_SHARED_LIBS |
| 889 | help |
Ricardo Martincoski | d610917 | 2018-04-01 02:08:39 -0300 | [diff] [blame] | 890 | Enable a link-time protection know as RELRO (RELocation Read |
| 891 | Only) which helps to protect from certain type of exploitation |
| 892 | techniques altering the content of some ELF sections. |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 893 | |
| 894 | config BR2_RELRO_NONE |
| 895 | bool "None" |
| 896 | help |
| 897 | Disables Relocation link-time protections. |
| 898 | |
| 899 | config BR2_RELRO_PARTIAL |
| 900 | bool "Partial" |
| 901 | help |
| 902 | This option makes the dynamic section not writeable after |
| 903 | initialization (with almost no performance penalty). |
| 904 | |
| 905 | config BR2_RELRO_FULL |
| 906 | bool "Full" |
Thomas Petazzoni | 70dd4bd | 2021-07-25 15:45:19 +0200 | [diff] [blame] | 907 | depends on BR2_PIC_PIE_ARCH_SUPPORTS |
Fabrice Fontaine | de3fa43 | 2019-10-27 23:03:34 +0100 | [diff] [blame] | 908 | depends on BR2_TOOLCHAIN_SUPPORTS_PIE |
Yann E. MORIN | 814f6e1 | 2019-03-12 13:09:36 +0100 | [diff] [blame] | 909 | select BR2_PIC_PIE |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 910 | help |
Ricardo Martincoski | d610917 | 2018-04-01 02:08:39 -0300 | [diff] [blame] | 911 | This option includes the partial configuration, but also marks |
| 912 | the GOT as read-only at the cost of initialization time during |
| 913 | program loading, i.e every time an executable is started. |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 914 | |
Fabrice Fontaine | de3fa43 | 2019-10-27 23:03:34 +0100 | [diff] [blame] | 915 | comment "RELRO Full needs a toolchain w/ PIE" |
Thomas Petazzoni | 70dd4bd | 2021-07-25 15:45:19 +0200 | [diff] [blame] | 916 | depends on BR2_PIC_PIE_ARCH_SUPPORTS |
Fabrice Fontaine | de3fa43 | 2019-10-27 23:03:34 +0100 | [diff] [blame] | 917 | depends on !BR2_TOOLCHAIN_SUPPORTS_PIE |
| 918 | |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 919 | endchoice |
| 920 | |
| 921 | comment "RELocation Read Only (RELRO) needs shared libraries" |
| 922 | depends on !BR2_SHARED_LIBS |
| 923 | |
Romain Naour | 2e94aee | 2021-08-21 00:53:41 +0200 | [diff] [blame] | 924 | config BR2_FORTIFY_SOURCE_ARCH_SUPPORTS |
| 925 | bool |
| 926 | default y |
| 927 | # Microblaze glibc toolchains don't work with Fortify Source enabled |
| 928 | depends on !BR2_microblaze |
| 929 | |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 930 | choice |
| 931 | bool "Buffer-overflow Detection (FORTIFY_SOURCE)" |
Fabrice Fontaine | 810ba38 | 2021-05-03 20:22:41 +0200 | [diff] [blame] | 932 | default BR2_FORTIFY_SOURCE_1 |
Romain Naour | 2e94aee | 2021-08-21 00:53:41 +0200 | [diff] [blame] | 933 | depends on BR2_FORTIFY_SOURCE_ARCH_SUPPORTS |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 934 | depends on BR2_TOOLCHAIN_USES_GLIBC |
| 935 | depends on !BR2_OPTIMIZE_0 |
| 936 | help |
| 937 | Enable the _FORTIFY_SOURCE macro which introduces additional |
Ricardo Martincoski | d610917 | 2018-04-01 02:08:39 -0300 | [diff] [blame] | 938 | checks to detect buffer-overflows in the following standard |
| 939 | library functions: memcpy, mempcpy, memmove, memset, strcpy, |
| 940 | stpcpy, strncpy, strcat, strncat, sprintf, vsprintf, snprintf, |
| 941 | vsnprintf, gets. |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 942 | |
| 943 | NOTE: This feature requires an optimization level of s/1/2/3/g |
| 944 | |
| 945 | Support for this feature has been present since GCC 4.x. |
| 946 | |
| 947 | config BR2_FORTIFY_SOURCE_NONE |
| 948 | bool "None" |
| 949 | help |
| 950 | Disables additional checks to detect buffer-overflows. |
| 951 | |
| 952 | config BR2_FORTIFY_SOURCE_1 |
| 953 | bool "Conservative" |
Romain Naour | a75ee0e | 2018-11-05 21:07:50 +0100 | [diff] [blame] | 954 | # gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61164 |
| 955 | depends on !BR2_TOOLCHAIN_BUILDROOT || BR2_TOOLCHAIN_GCC_AT_LEAST_6 |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 956 | help |
| 957 | This option sets _FORTIFY_SOURCE to 1 and only introduces |
| 958 | checks that shouldn't change the behavior of conforming |
| 959 | programs. Adds checks at compile-time only. |
| 960 | |
| 961 | config BR2_FORTIFY_SOURCE_2 |
| 962 | bool "Aggressive" |
Romain Naour | a75ee0e | 2018-11-05 21:07:50 +0100 | [diff] [blame] | 963 | # gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61164 |
| 964 | depends on !BR2_TOOLCHAIN_BUILDROOT || BR2_TOOLCHAIN_GCC_AT_LEAST_6 |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 965 | help |
| 966 | This option sets _FORTIFY_SOURCES to 2 and some more |
| 967 | checking is added, but some conforming programs might fail. |
| 968 | Also adds checks at run-time (detected buffer overflow |
| 969 | terminates the program) |
| 970 | |
Julien Olivain | 2f54c2a | 2022-09-18 23:21:44 +0200 | [diff] [blame] | 971 | config BR2_FORTIFY_SOURCE_3 |
| 972 | bool "Extended" |
| 973 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_12 |
| 974 | help |
| 975 | This option sets _FORTIFY_SOURCES to 3 and even more |
| 976 | checking is added compared to level 2. Extends checks at |
| 977 | run-time that can introduce an additional performance |
| 978 | overhead. |
| 979 | |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 980 | endchoice |
| 981 | |
| 982 | comment "Fortify Source needs a glibc toolchain and optimization" |
Romain Naour | 2e94aee | 2021-08-21 00:53:41 +0200 | [diff] [blame] | 983 | depends on BR2_FORTIFY_SOURCE_ARCH_SUPPORTS |
Matt Weber | 20a4583 | 2018-01-23 22:09:41 -0600 | [diff] [blame] | 984 | depends on (!BR2_TOOLCHAIN_USES_GLIBC || BR2_OPTIMIZE_0) |
Yann E. MORIN | 1ac2cdd | 2016-08-25 19:19:46 +0200 | [diff] [blame] | 985 | endmenu |
| 986 | |
Thomas Petazzoni | 6c3e3ad | 2012-11-03 08:27:58 +0000 | [diff] [blame] | 987 | source "system/Config.in" |
Thomas Petazzoni | beb43c7 | 2010-12-05 21:52:44 +0100 | [diff] [blame] | 988 | |
Yann E. MORIN | 2440385 | 2013-08-17 22:35:37 +0200 | [diff] [blame] | 989 | source "linux/Config.in" |
Bernhard Reutner-Fischer | 5010039 | 2007-09-25 07:55:45 +0000 | [diff] [blame] | 990 | |
Yann E. MORIN | 2440385 | 2013-08-17 22:35:37 +0200 | [diff] [blame] | 991 | source "package/Config.in" |
Thomas Petazzoni | d06e802 | 2012-01-28 18:42:49 +0100 | [diff] [blame] | 992 | |
Thomas Petazzoni | 0585241 | 2010-03-10 22:30:06 +0100 | [diff] [blame] | 993 | source "fs/Config.in" |
| 994 | |
Thomas Petazzoni | 649b5b9 | 2010-03-14 18:20:45 +0100 | [diff] [blame] | 995 | source "boot/Config.in" |
| 996 | |
Yann E. MORIN | 2440385 | 2013-08-17 22:35:37 +0200 | [diff] [blame] | 997 | source "package/Config.in.host" |
Arnout Vandecappelle (Essensium/Mind) | ebcfa98 | 2012-11-12 10:08:28 +0000 | [diff] [blame] | 998 | |
| 999 | source "Config.in.legacy" |
Thomas Petazzoni | 8eb8aaf | 2013-12-05 20:11:11 +0100 | [diff] [blame] | 1000 | |
Yann E. MORIN | edf32b0 | 2019-07-29 22:19:59 +0200 | [diff] [blame] | 1001 | # br2-external menus definitions |
| 1002 | source "$BR2_BASE_DIR/.br2-external.in.menus" |