1config BR2_PACKAGE_UCLIBC_ARCH_SUPPORTS
2	bool
3	default y if BR2_aarch64
4	default y if BR2_aarch64_be
5	default y if BR2_arcle
6	default y if BR2_arceb
7	default y if BR2_arm
8	default y if BR2_armeb
9	default y if BR2_i386
10	default y if BR2_m68k
11	default y if BR2_microblaze
12	default y if BR2_mips
13	default y if BR2_mipsel
14	default y if BR2_mips64
15	default y if BR2_mips64el
16	default y if BR2_or1k
17	default y if BR2_powerpc
18	# see libc/sysdeps/linux/riscv32/sys/asm.h
19	default y if BR2_RISCV_32 && (BR2_RISCV_ABI_ILP32 || BR2_RISCV_ABI_ILP32D)
20	# see libc/sysdeps/linux/riscv64/sys/asm.h
21	default y if BR2_RISCV_64 && (BR2_RISCV_ABI_LP64 || BR2_RISCV_ABI_LP64D)
22	default y if BR2_sh4
23	default y if BR2_sh4eb
24	default y if BR2_sparc
25	default y if BR2_xtensa
26	default y if BR2_x86_64
27
28config BR2_PACKAGE_UCLIBC_SUPPORTS
29	bool
30	default y if BR2_PACKAGE_UCLIBC_ARCH_SUPPORTS
31
32if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
33
34comment "uClibc Options"
35
36config BR2_PACKAGE_UCLIBC
37	bool
38	default y
39	select BR2_PACKAGE_LINUX_HEADERS
40
41config BR2_UCLIBC_CONFIG
42	string "uClibc configuration file to use?"
43	default "package/uclibc/uClibc-ng.config"
44	help
45	  Some people may wish to use their own modified uClibc
46	  configuration file and will specify their config file
47	  location with this option.  See also docs/README in this
48	  package.  If unsure, use the default.
49
50config BR2_UCLIBC_CONFIG_FRAGMENT_FILES
51	string "Additional uClibc configuration fragment files"
52	help
53	  A space-separated list of configuration fragment files, that
54	  will be merged to the main uClibc configuration file.
55
56config BR2_TOOLCHAIN_BUILDROOT_WCHAR
57	bool "Enable WCHAR support"
58	select BR2_USE_WCHAR
59	help
60	  Enable this option if you want your toolchain to support
61	  wide characters (i.e characters longer than 8 bits, needed
62	  for locale support).
63
64config BR2_TOOLCHAIN_BUILDROOT_LOCALE
65	bool "Enable toolchain locale/i18n support"
66	select BR2_TOOLCHAIN_BUILDROOT_WCHAR
67	select BR2_ENABLE_LOCALE
68	select BR2_NEEDS_HOST_UTF8_LOCALE
69	help
70	  Enable this option if you want your toolchain to support
71	  localization and internationalization.
72
73choice
74	prompt "Thread library implementation"
75	help
76	  Use this option to select the thread library implementation
77	  that should be used in your toolchain.
78
79config BR2_PTHREADS_NATIVE
80	bool "Native POSIX Threading (NPTL)"
81	depends on BR2_USE_MMU
82	select BR2_TOOLCHAIN_HAS_THREADS
83	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
84
85config BR2_PTHREADS
86	bool "linuxthreads"
87	depends on !BR2_aarch64 && !BR2_aarch64_be
88	select BR2_TOOLCHAIN_HAS_THREADS
89
90config BR2_PTHREADS_NONE
91	bool "none"
92
93endchoice
94
95config BR2_PTHREAD_DEBUG
96	bool "Thread library debugging"
97	depends on BR2_PTHREADS || BR2_PTHREADS_NATIVE
98	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
99	help
100	  Build the thread library with debugging enabled.
101
102config BR2_TOOLCHAIN_BUILDROOT_USE_SSP
103	bool "Enable stack protection support"
104	depends on BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI
105	select BR2_TOOLCHAIN_HAS_SSP
106	help
107	  Enable stack smashing protection support using GCCs
108	  -fstack-protector-all option in uClibc.
109
110	  See
111	  http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
112	  for details.
113
114config BR2_UCLIBC_INSTALL_UTILS
115	bool "Compile and install uClibc utilities"
116	default y
117	help
118	  Enabling this option will compile and install the getconf,
119	  ldconfig and ldd uClibc utilities for the target.
120
121	  You can save ~32 KiB in target space by disabling them since
122	  they're normally not needed.
123
124# Mapping from the Buildroot architecture configuration options to the
125# uClibc architecture names.
126config BR2_UCLIBC_TARGET_ARCH
127	string
128	default "aarch64"  if BR2_aarch64 || BR2_aarch64_be
129	default "arc"	   if BR2_arcle || BR2_arceb
130	default "arm"	   if BR2_arm	|| BR2_armeb
131	default "m68k"	   if BR2_m68k
132	default "microblaze"   if BR2_microblaze
133	default "mips"	   if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
134	default "or1k"     if BR2_or1k
135	default "powerpc"  if BR2_powerpc
136	default "sh"	   if BR2_sh
137	default "sparc"	   if BR2_sparc
138	default "xtensa"   if BR2_xtensa
139	default "i386"	   if BR2_i386
140	default "x86_64"   if BR2_x86_64
141	default "riscv64"  if BR2_RISCV_64
142	default "riscv32"  if BR2_RISCV_32
143
144config BR2_UCLIBC_MIPS_ABI
145	string
146	default "O32" if BR2_MIPS_OABI32
147	default "N32" if BR2_MIPS_NABI32
148	default "N64" if BR2_MIPS_NABI64
149	depends on BR2_UCLIBC_TARGET_ARCH = "mips"
150
151config BR2_UCLIBC_MIPS_NAN
152	string
153	default "LEGACY" if BR2_MIPS_NAN_LEGACY
154	default "2008" if BR2_MIPS_NAN_2008
155	depends on BR2_UCLIBC_TARGET_ARCH = "mips"
156
157config BR2_UCLIBC_SH_TYPE
158	string
159	default "SH4"  if BR2_sh4 || BR2_sh4eb
160	depends on BR2_UCLIBC_TARGET_ARCH = "sh"
161
162config BR2_UCLIBC_SPARC_TYPE
163	string
164	default "V8"	if BR2_sparc_v8
165	depends on BR2_UCLIBC_TARGET_ARCH = "sparc"
166
167config BR2_UCLIBC_POWERPC_TYPE
168	string
169	default "CLASSIC" if !BR2_powerpc_8540 && !BR2_powerpc_8548
170	default "E500"    if BR2_powerpc_8540 || BR2_powerpc_8548
171	depends on BR2_UCLIBC_TARGET_ARCH = "powerpc"
172
173config BR2_UCLIBC_X86_TYPE
174	string
175	default "486"        if BR2_x86_i486
176	default "586"        if BR2_x86_i586
177	default "586MMX"     if BR2_x86_pentium_mmx
178	default "686"	     if BR2_x86_i686 || BR2_x86_pentiumpro
179	default "PENTIUMII"  if BR2_x86_pentium2
180	default "PENTIUMIII" if BR2_x86_pentium3
181	default "PENTIUM4"   if BR2_x86_pentium4 || BR2_x86_pentium_m || \
182	                        BR2_x86_nocona || BR2_x86_core2 || BR2_x86_corei7
183	depends on BR2_UCLIBC_TARGET_ARCH = "i386"
184
185endif # BR2_TOOLCHAIN_BUILDROOT_UCLIBC
186