|
| 1 | +comment "GCC Options" |
| 2 | + |
| 3 | +choice |
| 4 | + prompt "GCC compiler Version" |
| 5 | + default BR2_GCC_VERSION_ARC if BR2_GCC_VERSION_4_8_ARC # legacy |
| 6 | + default BR2_GCC_VERSION_ARC if BR2_arc |
| 7 | + default BR2_GCC_VERSION_POWERPC_SPE if BR2_POWERPC_CPU_HAS_SPE |
| 8 | + default BR2_GCC_VERSION_12_X |
| 9 | + help |
| 10 | + Select the version of gcc you wish to use. |
| 11 | + |
| 12 | +config BR2_GCC_VERSION_ARC |
| 13 | + bool "gcc arc (13.1)" |
| 14 | + # Only supported architecture |
| 15 | + depends on BR2_arc |
| 16 | + select BR2_TOOLCHAIN_GCC_AT_LEAST_13 |
| 17 | + |
| 18 | +config BR2_GCC_VERSION_POWERPC_SPE |
| 19 | + bool "gcc powerpc spe" |
| 20 | + # powerpc spe support has been deprecated since gcc 8.x. |
| 21 | + # https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html |
| 22 | + depends on BR2_POWERPC_CPU_HAS_SPE |
| 23 | + select BR2_TOOLCHAIN_GCC_AT_LEAST_8 |
| 24 | + |
| 25 | +config BR2_GCC_VERSION_LEGACY |
| 26 | + bool "gcc 8.x" |
| 27 | + select BR2_TOOLCHAIN_GCC_AT_LEAST_8 |
| 28 | + |
| 29 | +config BR2_GCC_VERSION_11_X |
| 30 | + bool "gcc 11.x" |
| 31 | + depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_12 |
| 32 | + # powerpc spe support has been deprecated since gcc 8.x. |
| 33 | + # https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html |
| 34 | + depends on !BR2_POWERPC_CPU_HAS_SPE |
| 35 | + # ARC HS48 rel 31 only supported by gcc arc fork. |
| 36 | + depends on !BR2_archs4x_rel31 |
| 37 | + select BR2_TOOLCHAIN_GCC_AT_LEAST_11 |
| 38 | + |
| 39 | +config BR2_GCC_VERSION_12_X |
| 40 | + bool "gcc 12.x" |
| 41 | + depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_13 |
| 42 | + # powerpc spe support has been deprecated since gcc 8.x. |
| 43 | + # https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html |
| 44 | + depends on !BR2_POWERPC_CPU_HAS_SPE |
| 45 | + # ARC HS48 rel 31 only supported by gcc arc fork. |
| 46 | + depends on !BR2_archs4x_rel31 |
| 47 | + select BR2_TOOLCHAIN_GCC_AT_LEAST_12 |
| 48 | + |
| 49 | +config BR2_GCC_VERSION_13_X |
| 50 | + bool "gcc 13.x" |
| 51 | + # powerpc spe support has been deprecated since gcc 8.x. |
| 52 | + # https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html |
| 53 | + depends on !BR2_POWERPC_CPU_HAS_SPE |
| 54 | + select BR2_TOOLCHAIN_GCC_AT_LEAST_13 |
| 55 | + |
| 56 | +endchoice |
| 57 | + |
| 58 | +# libcilkrts was introduced in gcc 4.9 and removed in gcc 8.x |
| 59 | +config BR2_GCC_SUPPORTS_LIBCILKRTS |
| 60 | + bool |
| 61 | + default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_8 |
| 62 | + |
| 63 | +config BR2_GCC_SUPPORTS_DLANG |
| 64 | + bool |
| 65 | + default y if BR2_aarch64 |
| 66 | + default y if BR2_arm |
| 67 | + default y if BR2_i386 |
| 68 | + default y if BR2_mips || BR2_mipsel |
| 69 | + default y if BR2_mips64 || BR2_mips64el |
| 70 | + default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le |
| 71 | + default y if BR2_x86_64 |
| 72 | + default y if BR2_riscv && !BR2_RISCV_64 |
| 73 | + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_9 |
| 74 | + depends on BR2_TOOLCHAIN_USES_GLIBC |
| 75 | + # "The D front-end is now itself written in D, in order to build GDC, you |
| 76 | + # will need a working GDC compiler (GCC version 9.1 or later)." |
| 77 | + # https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=5fee5ec362f7a243f459e6378fd49dfc89dc9fb5 |
| 78 | + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_12 |
| 79 | + |
| 80 | +config BR2_GCC_VERSION |
| 81 | + string |
| 82 | + default "8.4.0" if BR2_GCC_VERSION_LEGACY |
| 83 | + default "11.4.0" if BR2_GCC_VERSION_11_X |
| 84 | + default "12.4.0" if BR2_GCC_VERSION_12_X |
| 85 | + default "13.3.0" if BR2_GCC_VERSION_13_X |
| 86 | + default "arc-2023.09-release" if BR2_GCC_VERSION_ARC |
| 87 | + |
| 88 | +config BR2_EXTRA_GCC_CONFIG_OPTIONS |
| 89 | + string "Additional gcc options" |
| 90 | + default "" |
| 91 | + help |
| 92 | + Any additional gcc configure options you may want to |
| 93 | + include. Those options are applied for all of the gcc |
| 94 | + initial, gcc intermediate and gcc final passes. |
| 95 | + |
| 96 | +config BR2_TOOLCHAIN_BUILDROOT_CXX |
| 97 | + bool "Enable C++ support" |
| 98 | + select BR2_INSTALL_LIBSTDCPP |
| 99 | + help |
| 100 | + Enable this option if you want your toolchain to support the |
| 101 | + C++ language and you want C++ libraries to be installed on |
| 102 | + your target system. |
| 103 | + |
| 104 | +comment "Fortran support needs a toolchain w/ wchar" |
| 105 | + depends on BR2_TOOLCHAIN_HAS_LIBQUADMATH |
| 106 | + depends on !BR2_USE_WCHAR # libquadmath |
| 107 | + |
| 108 | +config BR2_TOOLCHAIN_BUILDROOT_FORTRAN |
| 109 | + bool "Enable Fortran support" |
| 110 | + # on architecture building libquadmath, wchar is required |
| 111 | + depends on !BR2_TOOLCHAIN_HAS_LIBQUADMATH || \ |
| 112 | + (BR2_TOOLCHAIN_HAS_LIBQUADMATH && BR2_USE_WCHAR) |
| 113 | + # internal compiler error: in gen_reg_rtx, at emit-rtl.cc:1167 |
| 114 | + # fixed in gcc 14.x, so disable gcc 12.x/13.x |
| 115 | + depends on !(BR2_microblaze && \ |
| 116 | + (BR2_GCC_VERSION_12_X || BR2_GCC_VERSION_13_X)) |
| 117 | + select BR2_TOOLCHAIN_HAS_FORTRAN |
| 118 | + help |
| 119 | + Enable this option if you want your toolchain to support the |
| 120 | + Fortran language and you want Fortran libraries to be |
| 121 | + installed on your target system. |
| 122 | + |
| 123 | +config BR2_TOOLCHAIN_BUILDROOT_DLANG |
| 124 | + bool "Enable D language support" |
| 125 | + depends on BR2_GCC_SUPPORTS_DLANG |
| 126 | + select BR2_TOOLCHAIN_HAS_DLANG |
| 127 | + help |
| 128 | + Enable this option if you want your toolchain to support the |
| 129 | + D language and you want D libraries to be installed on your |
| 130 | + target system. |
| 131 | + |
| 132 | +config BR2_GCC_ENABLE_OPENMP |
| 133 | + bool "Enable compiler OpenMP support" |
| 134 | + depends on !BR2_PTHREADS_NONE && !BR2_arc && !BR2_microblaze |
| 135 | + select BR2_TOOLCHAIN_HAS_OPENMP |
| 136 | + help |
| 137 | + Enable OpenMP support for the compiler |
| 138 | + |
| 139 | +config BR2_GCC_ENABLE_GRAPHITE |
| 140 | + bool "Enable graphite support" |
| 141 | + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 |
| 142 | + help |
| 143 | + This option enables the graphite optimizations in the |
| 144 | + compiler. |
| 145 | + |
| 146 | +comment "graphite support needs gcc >= 5.x" |
| 147 | + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5 |
0 commit comments