1config BR2_PACKAGE_GLIBC_ARCH_SUPPORTS
2	bool
3	default y if BR2_arm
4	default y if BR2_armeb
5	default y if BR2_aarch64
6	default y if BR2_aarch64_be
7	default y if BR2_i386
8	default y if BR2_m68k_m68k
9	default y if BR2_mips
10	default y if BR2_mipsel
11	default y if BR2_mips64
12	default y if BR2_mips64el
13	default y if BR2_or1k
14	default y if BR2_powerpc
15	default y if BR2_powerpc64
16	default y if BR2_powerpc64le
17	default y if BR2_riscv
18	default y if BR2_s390x
19	default y if BR2_sh
20	default y if BR2_sparc64
21	default y if BR2_x86_64
22	default y if BR2_microblaze
23	default y if BR2_nios2
24	default y if BR2_arc && BR2_ARC_ATOMIC_EXT
25	depends on !BR2_POWERPC_CPU_HAS_SPE
26	depends on BR2_RISCV_ISA_RVA || !BR2_riscv
27	depends on BR2_USE_MMU
28
29config BR2_PACKAGE_GLIBC_SUPPORTS
30	bool
31	default y if BR2_PACKAGE_GLIBC_ARCH_SUPPORTS
32	# Make sure to keep these dependencies in sync with the
33	# Config.in comments in
34	# toolchain/toolchain-buildroot/Config.in
35	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
36	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 || !BR2_powerpc64le
37	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 || !BR2_MIPS_NAN_2008
38	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 || !BR2_RISCV_32
39	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 || !BR2_RISCV_64
40	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 || !BR2_arc
41	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 || !BR2_or1k
42
43if BR2_TOOLCHAIN_BUILDROOT_GLIBC
44
45comment "Glibc Options"
46
47config BR2_PACKAGE_GLIBC
48	bool
49	default y
50	select BR2_PACKAGE_LINUX_HEADERS
51	select BR2_TOOLCHAIN_HAS_SSP if BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI
52	help
53	  https://www.gnu.org/software/libc/
54
55config BR2_PACKAGE_GLIBC_KERNEL_COMPAT
56	bool "Enable compatibility shims to run on older kernels"
57	help
58	  Say 'y' here if you plan on running your system on a kernel
59	  older than the version used for the toolchain headers.
60
61	  Enabling those compatibility shims may generate a slightly
62	  bigger and slightly slower glibc library.
63
64	  The oldest supported kernel version depends on the
65	  architecture.
66
67config BR2_PACKAGE_GLIBC_UTILS
68	bool "Install glibc utilities"
69	help
70	  Enabling this option will compile and install the getconf,
71	  ldconfig, ldd and locale glibc utilities for the target.
72
73endif # BR2_TOOLCHAIN_BUILDROOT_GLIBC
74