1comment "boost needs a toolchain w/ C++, threads, wchar"
2	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
3
4config BR2_PACKAGE_BOOST
5	bool "boost"
6	depends on BR2_INSTALL_LIBSTDCPP
7	# Boost could theorically be built with threading=single, but
8	# that unfortunately doesn't work. Until someone fixes that,
9	# let's depend on threads.
10	depends on BR2_TOOLCHAIN_HAS_THREADS
11	depends on BR2_USE_WCHAR
12	help
13	  A general purpose C++ library
14
15	  http://www.boost.org/
16
17if BR2_PACKAGE_BOOST
18
19config BR2_PACKAGE_BOOST_ATOMIC
20	bool "boost-atomic"
21	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
22	help
23	  C++11-style atomic<>.
24
25config BR2_PACKAGE_BOOST_CHRONO
26	bool "boost-chrono"
27	select BR2_PACKAGE_BOOST_SYSTEM
28	help
29	  Useful time utilities. C++11.
30
31config BR2_PACKAGE_BOOST_CONTAINER
32	bool "boost-container"
33	help
34	  Standard library containers and extensions.
35
36# see
37# http://www.boost.org/doc/libs/1_78_0/libs/context/doc/html/context/architectures.html
38# for the list of supported architectures. Sparc pretends to be
39# supported, but it doesn't build.
40config BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
41	bool
42	default y if ((BR2_arm || BR2_armeb) && BR2_ARM_CPU_HAS_ARM)
43	default y if (BR2_aarch64 || BR2_aarch64_be)
44	default y if BR2_i386
45	default y if BR2_mips
46	default y if BR2_mipsel
47	default y if BR2_powerpc
48	default y if BR2_x86_64
49
50config BR2_PACKAGE_BOOST_CONTEXT
51	bool "boost-context"
52	depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
53	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
54		|| BR2_TOOLCHAIN_GCC_AT_LEAST_6 # boost-thread
55	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
56	select BR2_PACKAGE_BOOST_THREAD if !BR2_TOOLCHAIN_GCC_AT_LEAST_6
57	help
58	  C++11 context switching library.
59
60config BR2_PACKAGE_BOOST_CONTRACT
61	bool "boost-contract"
62	# pthread_condattr_setclock
63	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
64	select BR2_PACKAGE_BOOST_SYSTEM
65	help
66	  Contract programming for C++.
67
68comment "boost-contract needs a toolchain w/ NPTL"
69	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
70
71config BR2_PACKAGE_BOOST_COROUTINE
72	bool "boost-coroutine"
73	depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
74	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
75	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context, boost-thread
76	select BR2_PACKAGE_BOOST_CHRONO
77	select BR2_PACKAGE_BOOST_CONTEXT
78	select BR2_PACKAGE_BOOST_SYSTEM
79	select BR2_PACKAGE_BOOST_THREAD
80	help
81	  deprecated coroutine library, the non-depricated coroutine2
82	  library is a header-only library and does not need to be
83	  selected.
84
85comment "boost-coroutine needs a toolchain not affected by GCC bug 64735"
86	depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
87	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
88	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
89
90config BR2_PACKAGE_BOOST_DATE_TIME
91	bool "boost-date_time"
92	help
93	  A set of date-time libraries based on generic programming
94	  concepts.
95
96config BR2_PACKAGE_BOOST_EXCEPTION
97	bool "boost-exception"
98	help
99	  The Boost Exception library supports transporting of arbitrary
100	  data in exception objects, and transporting of exceptions
101	  between threads.
102
103config BR2_PACKAGE_BOOST_FIBER
104	bool "boost-fiber"
105	depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
106	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
107	# mips support uses the "pause" instruction, only available
108	# since mips32r2/mips64r2.
109	depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64
110	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
111	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context
112	select BR2_PACKAGE_BOOST_CONTEXT
113	select BR2_PACKAGE_BOOST_FILESYSTEM
114	select BR2_PACKAGE_BOOST_SYSTEM
115	help
116	  C++11 userland threads library.
117
118comment "boost-fiber needs a toolchain w/ NPTL"
119	depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
120	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
121	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
122
123comment "boost-fiber needs a toolchain not affected by GCC bug 64735"
124	depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
125	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
126		|| BR2_TOOLCHAIN_GCC_AT_LEAST_6
127	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
128
129config BR2_PACKAGE_BOOST_FILESYSTEM
130	bool "boost-filesystem"
131	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic
132	select BR2_PACKAGE_BOOST_ATOMIC
133	select BR2_PACKAGE_BOOST_SYSTEM
134	help
135	  The Boost Filesystem Library provides portable facilities to
136	  query and manipulate paths, files, and directories.
137
138config BR2_PACKAGE_BOOST_GRAPH
139	bool "boost-graph"
140	select BR2_PACKAGE_BOOST_REGEX
141	help
142	  The BGL graph interface and graph components are generic, in
143	  the same sense as the the Standard Template Library (STL).
144
145config BR2_PACKAGE_BOOST_GRAPH_PARALLEL
146	bool "boost-graph_parallel"
147	help
148	  The PBGL graph interface and graph components are generic, in
149	  the same sense as the the Standard Template Library (STL).
150
151config BR2_PACKAGE_BOOST_IOSTREAMS
152	bool "boost-iostreams"
153	select BR2_PACKAGE_BZIP2
154	select BR2_PACKAGE_ZLIB
155	help
156	  Boost.IOStreams provides a framework for defining streams,
157	  stream buffers and i/o filters.
158
159config BR2_PACKAGE_BOOST_JSON
160	bool "boost-json"
161	select BR2_PACKAGE_BOOST_CONTAINER
162	help
163	  Boost.JSON is a portable C++ library which provides containers
164	  and algorithms that implement JavaScript Object Notation, or
165	  simply "JSON", a lightweight data-interchange format.
166
167	  To use the library "header-only" this option is not needed.
168
169config BR2_PACKAGE_BOOST_LOCALE
170	bool "boost-locale"
171	# When boost-locale is enabled with icu support, Boost no
172	# longer supports building the libboost_* libraries as static
173	# libraries, causing build failures when other boost features
174	# than boost-locale are enabled. To work around this, we
175	# prevent using boost-locale on static linking configurations
176	# with icu enabled. See
177	# https://svn.boost.org/trac/boost/ticket/9685 for more
178	# details.
179	depends on !(BR2_STATIC_LIBS && BR2_PACKAGE_ICU)
180	depends on !(BR2_TOOLCHAIN_HAS_GCC_BUG_64735 && BR2_PACKAGE_ICU) # boost-thread
181	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
182		|| !BR2_PACKAGE_ICU # boost-thread
183	select BR2_PACKAGE_BOOST_SYSTEM
184	select BR2_PACKAGE_BOOST_THREAD if BR2_PACKAGE_ICU
185	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
186	help
187	  Provide localization and Unicode handling tools for C++.
188
189comment "boost-locale needs a toolchain w/ dynamic library"
190	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
191	depends on BR2_PACKAGE_ICU
192	depends on BR2_STATIC_LIBS
193
194comment "boost-locale needs a toolchain not affected by GCC bug 64735"
195	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
196	depends on BR2_PACKAGE_ICU
197	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
198
199config BR2_PACKAGE_BOOST_LOG
200	bool "boost-log"
201	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
202	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic
203	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
204	select BR2_PACKAGE_BOOST_ATOMIC
205	select BR2_PACKAGE_BOOST_DATE_TIME
206	select BR2_PACKAGE_BOOST_FILESYSTEM
207	select BR2_PACKAGE_BOOST_REGEX
208	select BR2_PACKAGE_BOOST_SYSTEM
209	select BR2_PACKAGE_BOOST_THREAD
210	help
211	  Logging library.
212
213comment "boost-log needs a toolchain w/ NPTL"
214	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
215	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
216
217comment "boost-log needs a toolchain not affected by GCC bug 64735"
218	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
219
220config BR2_PACKAGE_BOOST_MATH
221	bool "boost-math"
222	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # C++14
223	help
224	  Boost.Math includes several contributions in the domain of
225	  mathematics:
226
227	  The Greatest Common Divisor and Least Common
228	  Multiple library provides run-time and compile-time evaluation
229	  of the greatest common divisor (GCD) or least common multiple
230	  (LCM) of two integers.
231
232	  The Special Functions library currently provides eight
233	  templated special functions, in namespace boost.
234
235	  The Complex Number Inverse Trigonometric Functions are the
236	  inverses of trigonometric functions currently present in the
237	  C++ standard.
238
239	  Quaternions are a relative of complex numbers often used to
240	  parameterise rotations in three dimentional space.
241
242	  Octonions, like quaternions, are a relative of complex
243	  numbers.
244
245config BR2_PACKAGE_BOOST_MPI
246	bool "boost-mpi"
247	help
248	  Message Passing Interface library, for use in
249	  distributed-memory parallel application programming.
250
251config BR2_PACKAGE_BOOST_NOWIDE
252	bool "boost-nowide"
253	help
254	  Library for cross-platform, unicode aware programming.
255
256config BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
257	bool "boost-program_options"
258	help
259	  The program_options library allows program developers to
260	  obtain program options, that is (name, value) pairs from the
261	  user, via conventional methods such as command line and config
262	  file.
263
264config BR2_PACKAGE_BOOST_PYTHON
265	bool "boost-python"
266	depends on BR2_PACKAGE_PYTHON3
267	help
268	  The Boost Python Library is a framework for interfacing Python
269	  and C++. It allows you to quickly and seamlessly expose C++
270	  classes functions and objects to Python, and vice-versa,
271	  using no special tools -- just your C++ compiler.
272
273config BR2_PACKAGE_BOOST_RANDOM
274	bool "boost-random"
275	select BR2_PACKAGE_BOOST_SYSTEM
276	help
277	  A complete system for random number generation.
278
279config BR2_PACKAGE_BOOST_REGEX
280	bool "boost-regex"
281	help
282	  A new infrastructure for generic algorithms that builds on top
283	  of the new iterator concepts.
284
285config BR2_PACKAGE_BOOST_SERIALIZATION
286	bool "boost-serialization"
287	help
288	  Serialization for persistence and marshalling.
289
290config BR2_PACKAGE_BOOST_STACKTRACE
291	bool "boost-stacktrace"
292	depends on !BR2_STATIC_LIBS
293	help
294	  Gather, store, copy and print backtraces.
295
296comment "boost-stacktrace needs a toolchain w/ dynamic library"
297	depends on BR2_STATIC_LIBS
298
299config BR2_PACKAGE_BOOST_SYSTEM
300	bool "boost-system"
301	help
302	  Operating system support, including the diagnostics support
303	  that will be part of the C++0x standard library.
304
305config BR2_PACKAGE_BOOST_TEST
306	bool "boost-test"
307	depends on BR2_USE_MMU # fork()
308	select BR2_PACKAGE_BOOST_SYSTEM
309	select BR2_PACKAGE_BOOST_TIMER
310	help
311	  Support for simple program testing, full unit testing, and for
312	  program execution monitoring.
313
314config BR2_PACKAGE_BOOST_THREAD
315	bool "boost-thread"
316	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
317	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::current_exception
318	select BR2_PACKAGE_BOOST_CHRONO
319	select BR2_PACKAGE_BOOST_SYSTEM
320	help
321	  Portable C++ multi-threading. C++11, C++14.
322
323comment "boost-thread needs a toolchain not affected by GCC bug 64735"
324	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
325
326config BR2_PACKAGE_BOOST_TIMER
327	bool "boost-timer"
328	select BR2_PACKAGE_BOOST_CHRONO
329	select BR2_PACKAGE_BOOST_SYSTEM
330	help
331	  Event timer, progress timer, and progress display classes.
332
333config BR2_PACKAGE_BOOST_TYPE_ERASURE
334	bool "boost-type_erasure"
335	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
336	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
337	select BR2_PACKAGE_BOOST_SYSTEM
338	select BR2_PACKAGE_BOOST_THREAD
339	help
340	  Runtime polymorphism based on concepts.
341
342comment "boost-type_erasure needs a toolchain not affected by GCC bug 64735"
343	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
344
345config BR2_PACKAGE_BOOST_URL
346	bool "boost-url"
347	help
348	  Boost.URL is a portable C++ library which provides containers
349	  and algorithms which model a "URL," more formally described
350	  using the Uniform Resource Identifier (URI) specification.
351
352	  This library understands the grammars related to URLs and
353	  provides functionality to validate, parse, examine, and
354	  modify urls, and apply normalization or resolution algorithms.
355
356	  To use the library "header-only" this option is not needed.
357
358config BR2_PACKAGE_BOOST_WAVE
359	bool "boost-wave"
360	# limitation of assembler for coldfire
361	# error: Tried to convert PC relative branch to absolute jump
362	depends on !BR2_m68k_cf
363	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
364	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
365	select BR2_PACKAGE_BOOST_DATE_TIME
366	select BR2_PACKAGE_BOOST_FILESYSTEM
367	select BR2_PACKAGE_BOOST_SYSTEM
368	select BR2_PACKAGE_BOOST_THREAD
369	help
370	  The Boost.Wave library is a Standards conformant, and highly
371	  configurable implementation of the mandated C99/C++
372	  preprocessor functionality packed behind an easy to use
373	  iterator interface.
374
375comment "boost-wave needs a toolchain not affected by GCC bug 64735"
376	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
377
378endif
379