Yann E. MORIN | 2508b16 | 2010-07-28 00:08:16 +0200 | [diff] [blame] | 1 | # Generic toolchain options |
| 2 | |
| 3 | # we want gdb config in the middle of both source and external |
| 4 | # toolchains, but mconf won't let us source the same file twice, |
| 5 | # so put it here instead |
Thomas Petazzoni | a0b6faa | 2013-04-07 00:04:33 +0000 | [diff] [blame] | 6 | source "package/gdb/Config.in.host" |
Yann E. MORIN | 2508b16 | 2010-07-28 00:08:16 +0200 | [diff] [blame] | 7 | |
Romain Naour | 5dce3c0 | 2016-02-20 13:42:46 +0100 | [diff] [blame^] | 8 | # https://sourceware.org/bugzilla/show_bug.cgi?id=19405 |
| 9 | config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 |
| 10 | bool |
| 11 | |
Thomas Petazzoni | 0858e00 | 2012-11-03 18:47:49 +0100 | [diff] [blame] | 12 | config BR2_TOOLCHAIN_HAS_NATIVE_RPC |
Thomas Petazzoni | fff7117 | 2010-12-13 17:27:37 +0100 | [diff] [blame] | 13 | bool |
| 14 | |
| 15 | config BR2_USE_WCHAR |
| 16 | bool |
Daniel Laird | 040bd64 | 2009-01-30 16:28:26 +0000 | [diff] [blame] | 17 | |
| 18 | config BR2_ENABLE_LOCALE |
Thomas Petazzoni | fff7117 | 2010-12-13 17:27:37 +0100 | [diff] [blame] | 19 | bool |
| 20 | |
Thomas Petazzoni | 6b578c8 | 2010-12-13 17:27:41 +0100 | [diff] [blame] | 21 | config BR2_INSTALL_LIBSTDCPP |
| 22 | bool |
| 23 | |
Thomas Petazzoni | 9eaad20 | 2010-12-13 17:27:44 +0100 | [diff] [blame] | 24 | config BR2_TOOLCHAIN_HAS_THREADS |
| 25 | bool |
| 26 | |
Peter Korsgaard | 5931db0 | 2011-11-24 14:26:52 +0100 | [diff] [blame] | 27 | config BR2_TOOLCHAIN_HAS_THREADS_DEBUG |
Peter Korsgaard | 5931db0 | 2011-11-24 14:26:52 +0100 | [diff] [blame] | 28 | bool |
| 29 | |
Thomas Petazzoni | c64f948 | 2014-02-18 22:08:59 +0100 | [diff] [blame] | 30 | config BR2_TOOLCHAIN_HAS_THREADS_NPTL |
| 31 | bool |
| 32 | |
Thomas Petazzoni | b988292 | 2011-05-30 23:56:57 +0200 | [diff] [blame] | 33 | config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS |
| 34 | bool |
| 35 | |
Thomas Petazzoni | c5866be | 2013-09-02 18:06:36 +0200 | [diff] [blame] | 36 | config BR2_TOOLCHAIN_HAS_SSP |
| 37 | bool |
| 38 | |
Peter Korsgaard | b87b474 | 2009-04-06 09:21:26 +0000 | [diff] [blame] | 39 | config BR2_ENABLE_LOCALE_PURGE |
| 40 | bool "Purge unwanted locales" |
Peter Korsgaard | b87b474 | 2009-04-06 09:21:26 +0000 | [diff] [blame] | 41 | help |
| 42 | Explicitly specify what locales to install on target. If N |
| 43 | then all locales supported by packages are installed. |
| 44 | |
| 45 | config BR2_ENABLE_LOCALE_WHITELIST |
| 46 | string "Locales to keep" |
| 47 | default "C en_US de fr" |
| 48 | depends on BR2_ENABLE_LOCALE_PURGE |
| 49 | help |
| 50 | Whitespace seperated list of locales to allow on target. |
| 51 | Locales not listed here will be removed from the target. |
| 52 | See 'locale -a' on your host for a list of locales available |
| 53 | on your build host, or have a look in /usr/share/locale in |
| 54 | the target file system for available locales. |
| 55 | |
| 56 | Notice that listing a locale here doesn't guarantee that it |
| 57 | will be available on the target - That purely depends on the |
| 58 | support for that locale in the selected packages. |
| 59 | |
Thomas Petazzoni | aebf199 | 2012-05-08 04:39:22 +0000 | [diff] [blame] | 60 | config BR2_GENERATE_LOCALE |
| 61 | string "Generate locale data" |
| 62 | default "" |
Thomas Petazzoni | aebf199 | 2012-05-08 04:39:22 +0000 | [diff] [blame] | 63 | depends on \ |
Thomas Petazzoni | cce0add | 2014-11-13 23:17:26 +0100 | [diff] [blame] | 64 | (BR2_TOOLCHAIN_BUILDROOT_UCLIBC && BR2_ENABLE_LOCALE) || \ |
Thomas Petazzoni | 381616e | 2013-06-30 21:29:09 +0200 | [diff] [blame] | 65 | BR2_TOOLCHAIN_USES_GLIBC |
Thomas Petazzoni | aebf199 | 2012-05-08 04:39:22 +0000 | [diff] [blame] | 66 | help |
| 67 | Generate support for a list of locales. Locales can be |
| 68 | specified with or without encoding, when no encoding is |
| 69 | specified, UTF-8 is assumed. Examples of locales: en_US, |
| 70 | fr_FR.UTF-8. |
| 71 | |
Yann E. MORIN | 11c1076 | 2014-07-27 21:28:32 +0200 | [diff] [blame] | 72 | config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY |
| 73 | bool "Copy gconv libraries" |
| 74 | depends on BR2_TOOLCHAIN_USES_GLIBC |
| 75 | help |
| 76 | The gconv libraries are used to convert between different |
| 77 | character sets (charsets). |
| 78 | |
| 79 | Say 'y' if you need to store and/or display different charsets. |
| 80 | |
| 81 | config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST |
| 82 | string "Gconv libraries to copy" |
| 83 | depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY |
| 84 | help |
| 85 | Set to the list of gconv libraries to copy. |
| 86 | Leave empty to copy all gconv libraries. |
| 87 | |
| 88 | Specify only the basename of the libraries, leave |
| 89 | out the .so extension. Eg.: |
| 90 | IBM850 ISO8859-15 UNICODE |
| 91 | |
| 92 | Note: the full set of gconv libs are ~8MiB (on ARM). |
| 93 | |
Thomas Petazzoni | 4caf788 | 2010-05-24 21:17:50 +0200 | [diff] [blame] | 94 | # glibc and eglibc directly include gettext, so a separatly compiled |
| 95 | # gettext isn't needed and shouldn't be built to avoid conflicts. Some |
| 96 | # packages always need gettext, other packages only need gettext when |
| 97 | # locale support is enabled. See the documentation for how packages |
| 98 | # should rely on the following two options. |
| 99 | |
Thomas Petazzoni | 54d6479 | 2010-05-13 22:21:08 +0200 | [diff] [blame] | 100 | config BR2_NEEDS_GETTEXT |
| 101 | bool |
Thomas Petazzoni | 381616e | 2013-06-30 21:29:09 +0200 | [diff] [blame] | 102 | default y if BR2_TOOLCHAIN_USES_UCLIBC |
Thomas Petazzoni | 4caf788 | 2010-05-24 21:17:50 +0200 | [diff] [blame] | 103 | |
| 104 | config BR2_NEEDS_GETTEXT_IF_LOCALE |
| 105 | bool |
| 106 | default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE) |
Thomas Petazzoni | 54d6479 | 2010-05-13 22:21:08 +0200 | [diff] [blame] | 107 | |
Mike Frysinger | e5e5f5d | 2011-01-10 09:28:41 -0500 | [diff] [blame] | 108 | config BR2_USE_MMU |
Guido MartÃnez | 2956304 | 2015-06-03 19:34:03 -0300 | [diff] [blame] | 109 | bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL |
| 110 | default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY |
Mike Frysinger | e5e5f5d | 2011-01-10 09:28:41 -0500 | [diff] [blame] | 111 | help |
| 112 | If your target has a MMU, you should say Y here. If you |
| 113 | are unsure, just say Y. |
| 114 | |
Daniel Laird | 040bd64 | 2009-01-30 16:28:26 +0000 | [diff] [blame] | 115 | config BR2_TARGET_OPTIMIZATION |
| 116 | string "Target Optimizations" |
Yann E. MORIN | 01c34b3 | 2014-12-21 14:00:25 +0100 | [diff] [blame] | 117 | default "" |
Daniel Laird | 040bd64 | 2009-01-30 16:28:26 +0000 | [diff] [blame] | 118 | help |
| 119 | Optimizations to use when building for the target host. |
Paul Jones | 36391de | 2010-06-14 22:36:04 +1000 | [diff] [blame] | 120 | NOTE: gcc optimization level is defined in build options. |
Baruch Siach | ec8eda4 | 2011-06-23 12:21:21 +0300 | [diff] [blame] | 121 | |
| 122 | config BR2_TARGET_LDFLAGS |
| 123 | string "Target linker options" |
| 124 | help |
Thomas De Schampheleire | 8f8d414 | 2012-01-13 20:23:23 +0100 | [diff] [blame] | 125 | Extra options to pass to the linker when building for the target. |
Thomas Petazzoni | 217ef08 | 2013-01-13 04:52:13 +0000 | [diff] [blame] | 126 | |
Yann E. MORIN | a930d9c | 2014-07-31 00:57:15 +0200 | [diff] [blame] | 127 | Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib') |
| 128 | are not supported. |
| 129 | |
Thomas Petazzoni | 217ef08 | 2013-01-13 04:52:13 +0000 | [diff] [blame] | 130 | config BR2_ECLIPSE_REGISTER |
| 131 | bool "Register toolchain within Eclipse Buildroot plug-in" |
| 132 | help |
| 133 | This options tells Buildroot to generate the necessary |
| 134 | configuration files to make your toolchain appear within |
| 135 | Eclipse, through the Eclipse Buildroot plugin. |
Yann E. MORIN | b155f5a | 2014-03-01 15:52:57 +0100 | [diff] [blame] | 136 | |
| 137 | # Options for packages to depend on, if they require at least a |
| 138 | # specific version of the kernel headers. |
| 139 | # Toolchains should choose the adequate option (ie. the highest |
| 140 | # version, not all of them). |
| 141 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 |
| 142 | bool |
| 143 | |
| 144 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 |
| 145 | bool |
| 146 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 |
| 147 | |
| 148 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 |
| 149 | bool |
| 150 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 |
| 151 | |
| 152 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 |
| 153 | bool |
| 154 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 |
| 155 | |
| 156 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 |
| 157 | bool |
| 158 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 |
| 159 | |
| 160 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 |
| 161 | bool |
| 162 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 |
| 163 | |
| 164 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 |
| 165 | bool |
| 166 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 |
| 167 | |
| 168 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 |
| 169 | bool |
| 170 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 |
| 171 | |
| 172 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 |
| 173 | bool |
| 174 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 |
| 175 | |
| 176 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 |
| 177 | bool |
| 178 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 |
| 179 | |
| 180 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 |
| 181 | bool |
| 182 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 |
| 183 | |
| 184 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 |
| 185 | bool |
| 186 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 |
| 187 | |
| 188 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 |
| 189 | bool |
| 190 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 |
| 191 | |
| 192 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 |
| 193 | bool |
| 194 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 |
Yann E. MORIN | a5a3096 | 2014-03-01 15:53:01 +0100 | [diff] [blame] | 195 | |
Gustavo Zacarias | 4916b88 | 2014-04-01 06:19:48 -0300 | [diff] [blame] | 196 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 |
| 197 | bool |
| 198 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 |
| 199 | |
Gustavo Zacarias | fb29afe | 2014-06-09 08:30:33 -0300 | [diff] [blame] | 200 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 |
| 201 | bool |
| 202 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 |
| 203 | |
Gustavo Zacarias | 911516f | 2014-08-03 23:29:22 -0300 | [diff] [blame] | 204 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 |
| 205 | bool |
| 206 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 |
| 207 | |
Gustavo Zacarias | 2d312b7 | 2014-10-06 08:44:39 -0300 | [diff] [blame] | 208 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 |
| 209 | bool |
| 210 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 |
| 211 | |
Gustavo Zacarias | bf6f74d | 2014-12-08 08:10:39 -0300 | [diff] [blame] | 212 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 |
| 213 | bool |
| 214 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 |
| 215 | |
Peter Korsgaard | 81366ed | 2015-02-09 13:31:23 +0100 | [diff] [blame] | 216 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 |
| 217 | bool |
| 218 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 |
| 219 | |
Gustavo Zacarias | e714ee9 | 2015-04-13 10:00:23 -0300 | [diff] [blame] | 220 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 |
| 221 | bool |
| 222 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 |
| 223 | |
Gustavo Zacarias | dae7d8a | 2015-06-22 10:11:03 -0300 | [diff] [blame] | 224 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 |
| 225 | bool |
| 226 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 |
| 227 | |
Peter Korsgaard | 8dc6829 | 2015-09-01 10:05:20 +0200 | [diff] [blame] | 228 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 |
| 229 | bool |
| 230 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 |
| 231 | |
Vicente Olivert Riera | aef2df8 | 2015-11-02 15:56:51 +0100 | [diff] [blame] | 232 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 |
| 233 | bool |
| 234 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 |
| 235 | |
Gustavo Zacarias | df2ad61 | 2016-01-11 07:52:36 -0300 | [diff] [blame] | 236 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 |
| 237 | bool |
| 238 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 |
| 239 | |
Gustavo Zacarias | 3ece3fa | 2016-03-14 07:14:10 -0300 | [diff] [blame] | 240 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 |
| 241 | bool |
| 242 | select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 |
| 243 | |
Yann E. MORIN | a5a3096 | 2014-03-01 15:53:01 +0100 | [diff] [blame] | 244 | # This order guarantees that the highest version is set, as kconfig |
| 245 | # stops affecting a value on the first matching default. |
| 246 | config BR2_TOOLCHAIN_HEADERS_AT_LEAST |
| 247 | string |
Gustavo Zacarias | 3ece3fa | 2016-03-14 07:14:10 -0300 | [diff] [blame] | 248 | default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 |
Gustavo Zacarias | df2ad61 | 2016-01-11 07:52:36 -0300 | [diff] [blame] | 249 | default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 |
Vicente Olivert Riera | aef2df8 | 2015-11-02 15:56:51 +0100 | [diff] [blame] | 250 | default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 |
Peter Korsgaard | 8dc6829 | 2015-09-01 10:05:20 +0200 | [diff] [blame] | 251 | default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 |
Gustavo Zacarias | dae7d8a | 2015-06-22 10:11:03 -0300 | [diff] [blame] | 252 | default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 |
Gustavo Zacarias | e714ee9 | 2015-04-13 10:00:23 -0300 | [diff] [blame] | 253 | default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 |
Peter Korsgaard | 81366ed | 2015-02-09 13:31:23 +0100 | [diff] [blame] | 254 | default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 |
Gustavo Zacarias | bf6f74d | 2014-12-08 08:10:39 -0300 | [diff] [blame] | 255 | default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 |
Gustavo Zacarias | 2d312b7 | 2014-10-06 08:44:39 -0300 | [diff] [blame] | 256 | default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 |
Gustavo Zacarias | 911516f | 2014-08-03 23:29:22 -0300 | [diff] [blame] | 257 | default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 |
Gustavo Zacarias | fb29afe | 2014-06-09 08:30:33 -0300 | [diff] [blame] | 258 | default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 |
Gustavo Zacarias | 4916b88 | 2014-04-01 06:19:48 -0300 | [diff] [blame] | 259 | default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 |
Yann E. MORIN | a5a3096 | 2014-03-01 15:53:01 +0100 | [diff] [blame] | 260 | default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 |
| 261 | default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 |
| 262 | default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 |
| 263 | default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 |
| 264 | default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 |
| 265 | default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 |
| 266 | default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 |
| 267 | default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 |
| 268 | default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 |
| 269 | default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 |
| 270 | default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 |
| 271 | default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 |
| 272 | default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 |
| 273 | default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 |
| 274 | default "2.6" |
Thomas Petazzoni | 8ba2a76 | 2015-08-04 20:00:33 +0200 | [diff] [blame] | 275 | |
| 276 | config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 |
| 277 | bool |
| 278 | |
| 279 | config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 |
| 280 | bool |
| 281 | select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 |
| 282 | |
| 283 | config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 |
| 284 | bool |
| 285 | select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 |
| 286 | |
| 287 | config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 |
| 288 | bool |
| 289 | select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 |
| 290 | |
| 291 | config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 |
| 292 | bool |
| 293 | select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 |
| 294 | |
| 295 | config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 |
| 296 | bool |
| 297 | select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 |
| 298 | |
| 299 | config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 |
| 300 | bool |
| 301 | select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 |
| 302 | |
| 303 | config BR2_TOOLCHAIN_GCC_AT_LEAST_5 |
| 304 | bool |
| 305 | select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 |
| 306 | |
| 307 | # This order guarantees that the highest version is set, as kconfig |
| 308 | # stops affecting a value on the first matching default. |
| 309 | config BR2_TOOLCHAIN_GCC_AT_LEAST |
| 310 | string |
| 311 | default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5 |
| 312 | default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 |
| 313 | default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 |
| 314 | default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 |
| 315 | default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 |
| 316 | default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 |
| 317 | default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 |
| 318 | default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 |
Thomas Petazzoni | 6856e41 | 2016-02-02 16:31:20 +0100 | [diff] [blame] | 319 | |
| 320 | config BR2_TOOLCHAIN_HAS_SYNC_1 |
| 321 | bool |
| 322 | default y |
Thomas Petazzoni | 6856e41 | 2016-02-02 16:31:20 +0100 | [diff] [blame] | 323 | depends on !BR2_bfin |
| 324 | depends on !BR2_microblaze |
| 325 | depends on !BR2_sparc |
| 326 | depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) |
| 327 | |
| 328 | config BR2_TOOLCHAIN_HAS_SYNC_2 |
| 329 | bool |
| 330 | default y if BR2_TOOLCHAIN_HAS_SYNC_1 |
| 331 | |
| 332 | config BR2_TOOLCHAIN_HAS_SYNC_4 |
| 333 | bool |
| 334 | default y |
| 335 | depends on !BR2_sparc |
Thomas Petazzoni | 6856e41 | 2016-02-02 16:31:20 +0100 | [diff] [blame] | 336 | depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) |
| 337 | |
| 338 | # The availability of __sync for 8-byte types on ARM is somewhat |
| 339 | # complicated: |
| 340 | # |
| 341 | # - It appeared in gcc starting with gcc 4.7. |
| 342 | # |
| 343 | # - On ARMv7, there is no problem, it can be directly implemented in |
| 344 | # userspace. |
| 345 | # |
| 346 | # - On < ARMv7, it requires help from the kernel. Unfortunately, the |
| 347 | # libgcc code implementing 8-byte __sync with the help from the |
| 348 | # kernel calls __write() when a failure occurs, which is a function |
| 349 | # internal to glibc, not available in uClibc and musl. This means |
| 350 | # that the 8-byte __sync operations are not available on < ARMv7 |
| 351 | # with uClibc and musl. This problem was fixed as part of gcc |
| 352 | # PR68059, which was backported to the gcc 5 branch, but isn't yet |
| 353 | # part of any gcc 5.x release. |
| 354 | # |
| 355 | config BR2_TOOLCHAIN_ARM_HAS_SYNC_8 |
| 356 | bool |
| 357 | default y |
| 358 | depends on BR2_arm || BR2_armeb |
| 359 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 |
| 360 | depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A |
| 361 | |
| 362 | # 8-byte intrinsics available on most x86 CPUs, except a few old ones |
| 363 | config BR2_TOOLCHAIN_X86_HAS_SYNC_8 |
| 364 | bool |
| 365 | default y |
| 366 | depends on BR2_i386 |
Thomas Petazzoni | 6856e41 | 2016-02-02 16:31:20 +0100 | [diff] [blame] | 367 | depends on !BR2_x86_i486 |
| 368 | depends on !BR2_x86_c3 |
| 369 | depends on !BR2_x86_winchip_c6 |
| 370 | depends on !BR2_x86_winchip2 |
| 371 | |
| 372 | # 8-byte intrinsics available: |
| 373 | # - On all 64 bits architecture |
| 374 | # - On a certain combinations of ARM platforms |
| 375 | # - On certain x86 32 bits CPUs |
| 376 | config BR2_TOOLCHAIN_HAS_SYNC_8 |
| 377 | bool |
| 378 | default y if BR2_ARCH_IS_64 |
| 379 | default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8 |
| 380 | default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8 |
| 381 | |
Thomas Petazzoni | 42735cb | 2016-03-06 21:47:16 +0100 | [diff] [blame] | 382 | # libatomic is available since gcc 4.8, when thread support is |
| 383 | # enabled. |
| 384 | config BR2_TOOLCHAIN_HAS_LIBATOMIC |
| 385 | bool |
| 386 | default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \ |
| 387 | BR2_TOOLCHAIN_HAS_THREADS |
| 388 | |
Thomas Petazzoni | 6856e41 | 2016-02-02 16:31:20 +0100 | [diff] [blame] | 389 | # __atomic intrinsics are available: |
| 390 | # - with gcc 4.8, either through built-ins or libatomic, on all |
Thomas Petazzoni | 42735cb | 2016-03-06 21:47:16 +0100 | [diff] [blame] | 391 | # architectures. Since we don't want to separate the cases where |
| 392 | # libatomic is needed vs. not needed, we simplify thing and only |
| 393 | # support situations where libatomic is available, even if on some |
| 394 | # architectures libatomic is not strictly needed as all __atomic |
| 395 | # intrinsics might be built-in. The only case where libatomic is |
| 396 | # missing entirely is when the toolchain does not have support for |
| 397 | # threads. However, a package that does not need threads but still |
| 398 | # uses atomics is quite a corner case, which does not warrant the |
| 399 | # added complexity. |
Thomas Petazzoni | 6856e41 | 2016-02-02 16:31:20 +0100 | [diff] [blame] | 400 | # - with gcc 4.7, libatomic did not exist, so only built-ins are |
| 401 | # available. This means that __atomic can only be used in a subset |
| 402 | # of the architectures |
| 403 | config BR2_TOOLCHAIN_HAS_ATOMIC |
| 404 | bool |
Thomas Petazzoni | 42735cb | 2016-03-06 21:47:16 +0100 | [diff] [blame] | 405 | default y if BR2_TOOLCHAIN_HAS_LIBATOMIC |
Thomas Petazzoni | 6856e41 | 2016-02-02 16:31:20 +0100 | [diff] [blame] | 406 | default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm |
| 407 | default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb |
| 408 | default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa |
| 409 | default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64 |