initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,29 @@
From 1be0e4a2d8db15a405f64a6f65507b87c1be7e1a Mon Sep 17 00:00:00 2001
From: tkoecker <tkoecker@gmx.net>
Date: Fri, 21 May 2021 16:31:11 +0200
Subject: [PATCH] added missing brackets (#118)
[Retrieved from:
https://github.com/boostorg/predef/commit/1be0e4a2d8db15a405f64a6f65507b87c1be7e1a]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
include/boost/predef/architecture/sparc.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/boost/predef/architecture/sparc.h b/boost/predef/architecture/sparc.h
index d7b94f0..d01605e 100644
--- a/boost/predef/architecture/sparc.h
+++ b//boost/predef/architecture/sparc.h
@@ -34,10 +34,10 @@ Distributed under the Boost Software License, Version 1.0.
#if defined(__sparc__) || defined(__sparc)
# undef BOOST_ARCH_SPARC
-# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv9) || defined(__sparc_v9__)
+# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv9) || defined(__sparc_v9__))
# define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(9,0,0)
# endif
-# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv8) || defined(__sparc_v8__)
+# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv8) || defined(__sparc_v8__))
# define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(8,0,0)
# endif
# if !defined(BOOST_ARCH_SPARC)
@@ -0,0 +1,52 @@
From 32bd6197353f6ea8e5bef01f09e25c944141acfc Mon Sep 17 00:00:00 2001
From: jzmaddock <john@johnmaddock.co.uk>
Date: Wed, 1 Sep 2021 18:54:54 +0100
Subject: [PATCH] Allow definition of BOOST_MATH_NO_ATOMIC_INT on the command
line. Allows us to test/emulate platforms with no atomic integers.
[buildroot@heine.tech:
- backport from boostorg/math 32bd6197353f6ea8e5bef01f09e25c944141acfc
- alter path to match boost release
]
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
boost/math/tools/atomic.hpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/boost/math/tools/atomic.hpp b/boost/math/tools/atomic.hpp
index cc76ed269f..e3cbf5db89 100644
--- a/boost/math/tools/atomic.hpp
+++ b/boost/math/tools/atomic.hpp
@@ -16,27 +16,27 @@
namespace boost {
namespace math {
namespace detail {
-#if ATOMIC_INT_LOCK_FREE == 2
+#if (ATOMIC_INT_LOCK_FREE == 2) && !defined(BOOST_MATH_NO_ATOMIC_INT)
typedef std::atomic<int> atomic_counter_type;
typedef std::atomic<unsigned> atomic_unsigned_type;
typedef int atomic_integer_type;
typedef unsigned atomic_unsigned_integer_type;
-#elif ATOMIC_SHORT_LOCK_FREE == 2
+#elif (ATOMIC_SHORT_LOCK_FREE == 2) && !defined(BOOST_MATH_NO_ATOMIC_INT)
typedef std::atomic<short> atomic_counter_type;
typedef std::atomic<unsigned short> atomic_unsigned_type;
typedef short atomic_integer_type;
typedef unsigned short atomic_unsigned_type;
-#elif ATOMIC_LONG_LOCK_FREE == 2
+#elif (ATOMIC_LONG_LOCK_FREE == 2) && !defined(BOOST_MATH_NO_ATOMIC_INT)
typedef std::atomic<long> atomic_unsigned_integer_type;
typedef std::atomic<unsigned long> atomic_unsigned_type;
typedef unsigned long atomic_unsigned_type;
typedef long atomic_integer_type;
-#elif ATOMIC_LLONG_LOCK_FREE == 2
+#elif (ATOMIC_LLONG_LOCK_FREE == 2) && !defined(BOOST_MATH_NO_ATOMIC_INT)
typedef std::atomic<long long> atomic_unsigned_integer_type;
typedef std::atomic<unsigned long long> atomic_unsigned_type;
typedef long long atomic_integer_type;
typedef unsigned long long atomic_unsigned_integer_type;
-#else
+#elif !defined(BOOST_MATH_NO_ATOMIC_INT)
# define BOOST_MATH_NO_ATOMIC_INT
#endif
} // Namespace detail
@@ -0,0 +1,150 @@
From 7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b Mon Sep 17 00:00:00 2001
From: jzmaddock <john@johnmaddock.co.uk>
Date: Wed, 1 Sep 2021 20:31:53 +0100
Subject: [PATCH] Make no atomics a soft failure in bernoulli_details.hpp.
Include an "escape macro" so thread safety can be disabled if certain
bernoulli features are to be used in a no-atomics environment. Fixes
https://github.com/boostorg/math/issues/673.
[buildroot@heine.tech:
- backport from boostorg/math 7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b
- alter path to match boost release
]
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
.../detail/bernoulli_details.hpp | 10 +++++++---
libs/math/test/Jamfile.v2 | 3 +++
test/compile_test/bernoulli_no_atomic_d.cpp | 14 ++++++++++++++
test/compile_test/bernoulli_no_atomic_fail.cpp | 15 +++++++++++++++
test/compile_test/bernoulli_no_atomic_mp.cpp | 16 ++++++++++++++++
5 files changed, 55 insertions(+), 3 deletions(-)
create mode 100644 test/compile_test/bernoulli_no_atomic_d.cpp
create mode 100644 test/compile_test/bernoulli_no_atomic_fail.cpp
create mode 100644 test/compile_test/bernoulli_no_atomic_mp.cpp
diff --git a/boost/math/special_functions/detail/bernoulli_details.hpp b/boost/math/special_functions/detail/bernoulli_details.hpp
index cf35545264..8519b7c89c 100644
--- a/boost/math/special_functions/detail/bernoulli_details.hpp
+++ b/boost/math/special_functions/detail/bernoulli_details.hpp
@@ -360,7 +360,7 @@ class bernoulli_numbers_cache
return out;
}
- #ifndef BOOST_HAS_THREADS
+ #if !defined(BOOST_HAS_THREADS) || defined(BOOST_MATH_BERNOULLI_UNTHREADED)
//
// Single threaded code, very simple:
//
@@ -382,6 +382,8 @@ class bernoulli_numbers_cache
*out = (i >= m_overflow_limit) ? policies::raise_overflow_error<T>("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(i), pol) : bn[i];
++out;
}
+ #elif defined(BOOST_MATH_NO_ATOMIC_INT)
+ static_assert(sizeof(T) == 1, "Unsupported configuration: your platform appears to have no atomic integers. If you are happy with thread-unsafe code, then you may define BOOST_MATH_BERNOULLI_UNTHREADED to suppress this error.");
#else
//
// Double-checked locking pattern, lets us access cached already cached values
@@ -464,7 +466,7 @@ class bernoulli_numbers_cache
return out;
}
- #ifndef BOOST_HAS_THREADS
+ #if !defined(BOOST_HAS_THREADS) || defined(BOOST_MATH_BERNOULLI_UNTHREADED)
//
// Single threaded code, very simple:
//
@@ -494,6 +496,8 @@ class bernoulli_numbers_cache
}
++out;
}
+ #elif defined(BOOST_MATH_NO_ATOMIC_INT)
+ static_assert(sizeof(T) == 1, "Unsupported configuration: your platform appears to have no atomic integers. If you are happy with thread-unsafe code, then you may define BOOST_MATH_BERNOULLI_UNTHREADED to suppress this error.");
#else
//
// Double-checked locking pattern, lets us access cached already cached values
@@ -555,7 +559,7 @@ class bernoulli_numbers_cache
// The value at which we know overflow has already occurred for the Bn:
std::size_t m_overflow_limit;
- #ifdef BOOST_HAS_THREADS
+ #if defined(BOOST_HAS_THREADS) && !defined(BOOST_MATH_NO_ATOMIC_INT)
std::mutex m_mutex;
atomic_counter_type m_counter, m_current_precision;
#else
diff --git a/libs/math/test/Jamfile.v2 b/libs/math/test/Jamfile.v2
index 52fb87f5e5..3ac63f9279 100644
--- a/libs/math/test/Jamfile.v2
+++ b/libs/math/test/Jamfile.v2
@@ -1137,6 +1137,9 @@ test-suite misc :
# [ run __temporary_test.cpp test_instances//test_instances : : : <test-info>always_show_run_output <pch>off ]
[ compile test_no_long_double_policy.cpp ]
+ [ compile compile_test/bernoulli_no_atomic_d.cpp ]
+ [ compile compile_test/bernoulli_no_atomic_mp.cpp ]
+ [ compile-fail compile_test/bernoulli_no_atomic_fail.cpp ]
;
test-suite interpolators :
diff --git a/test/compile_test/bernoulli_no_atomic_d.cpp b/test/compile_test/bernoulli_no_atomic_d.cpp
new file mode 100644
index 0000000000..61926f7e1f
--- /dev/null
+++ b/test/compile_test/bernoulli_no_atomic_d.cpp
@@ -0,0 +1,14 @@
+// (C) Copyright John Maddock 2021.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_MATH_NO_ATOMIC_INT
+
+#include <boost/math/special_functions/bernoulli.hpp>
+#include "test_compile_result.hpp"
+
+void compile_and_link_test()
+{
+ check_result<double>(boost::math::bernoulli_b2n<double>(4));
+}
diff --git a/test/compile_test/bernoulli_no_atomic_fail.cpp b/test/compile_test/bernoulli_no_atomic_fail.cpp
new file mode 100644
index 0000000000..bbd7152412
--- /dev/null
+++ b/test/compile_test/bernoulli_no_atomic_fail.cpp
@@ -0,0 +1,15 @@
+// (C) Copyright John Maddock 2021.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_MATH_NO_ATOMIC_INT
+
+#include <boost/math/special_functions/bernoulli.hpp>
+#include <boost/multiprecision/cpp_bin_float.hpp>
+#include "test_compile_result.hpp"
+
+void compile_and_link_test()
+{
+ check_result<boost::multiprecision::cpp_bin_float_50>(boost::math::bernoulli_b2n<boost::multiprecision::cpp_bin_float_50>(4));
+}
diff --git a/test/compile_test/bernoulli_no_atomic_mp.cpp b/test/compile_test/bernoulli_no_atomic_mp.cpp
new file mode 100644
index 0000000000..8d5a6e78e6
--- /dev/null
+++ b/test/compile_test/bernoulli_no_atomic_mp.cpp
@@ -0,0 +1,16 @@
+// (C) Copyright John Maddock 2021.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_MATH_NO_ATOMIC_INT
+#define BOOST_MATH_BERNOULLI_UNTHREADED
+
+#include <boost/math/special_functions/bernoulli.hpp>
+#include <boost/multiprecision/cpp_bin_float.hpp>
+#include "test_compile_result.hpp"
+
+void compile_and_link_test()
+{
+ check_result<boost::multiprecision::cpp_bin_float_50>(boost::math::bernoulli_b2n<boost::multiprecision::cpp_bin_float_50>(4));
+}
+397
View File
@@ -0,0 +1,397 @@
comment "boost needs a toolchain w/ C++, threads, wchar"
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
config BR2_PACKAGE_BOOST
bool "boost"
depends on BR2_INSTALL_LIBSTDCPP
# Boost could theorically be built with threading=single, but
# that unfortunately doesn't work. Until someone fixes that,
# let's depend on threads.
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_WCHAR
help
A general purpose C++ library
http://www.boost.org/
if BR2_PACKAGE_BOOST
choice
prompt "Layout"
default BR2_PACKAGE_BOOST_LAYOUT_SYSTEM
help
Selects the layout of Boost binary names
config BR2_PACKAGE_BOOST_LAYOUT_SYSTEM
bool "system"
help
Boost binary names do not include the Boost version number
or the name and version number of the compiler.
config BR2_PACKAGE_BOOST_LAYOUT_TAGGED
bool "tagged"
help
Boost binary names include the encoded build properties such
as variant and threading, but do not include compiler name
and version, or Boost version. This option is useful if you
build several variants of Boost, using the same compiler.
config BR2_PACKAGE_BOOST_LAYOUT_VERSIONED
bool "versioned"
help
Boost binary names include the Boost version number, name
and version of the compiler and encoded build properties.
endchoice
config BR2_PACKAGE_BOOST_LAYOUT
string
default "system" if BR2_PACKAGE_BOOST_LAYOUT_SYSTEM
default "tagged" if BR2_PACKAGE_BOOST_LAYOUT_TAGGED
default "versioned" if BR2_PACKAGE_BOOST_LAYOUT_VERSIONED
config BR2_PACKAGE_BOOST_ATOMIC
bool "boost-atomic"
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
help
C++11-style atomic<>.
config BR2_PACKAGE_BOOST_CHRONO
bool "boost-chrono"
select BR2_PACKAGE_BOOST_SYSTEM
help
Useful time utilities. C++11.
config BR2_PACKAGE_BOOST_CONTAINER
bool "boost-container"
help
Standard library containers and extensions.
# see
# http://www.boost.org/doc/libs/1_59_0/libs/context/doc/html/context/architectures.html
# for the list of supported architectures. Sparc pretends to be
# supported, but it doesn't build.
config BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
bool
default y if ((BR2_arm || BR2_armeb) && BR2_ARM_CPU_HAS_ARM)
default y if BR2_i386
default y if BR2_mips
default y if BR2_mipsel
default y if BR2_powerpc
default y if BR2_x86_64
config BR2_PACKAGE_BOOST_CONTEXT
bool "boost-context"
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|| BR2_TOOLCHAIN_GCC_AT_LEAST_6 # boost-thread
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
select BR2_PACKAGE_BOOST_THREAD if !BR2_TOOLCHAIN_GCC_AT_LEAST_6
help
C++11 context switching library.
config BR2_PACKAGE_BOOST_CONTRACT
bool "boost-contract"
# pthread_condattr_setclock
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
select BR2_PACKAGE_BOOST_SYSTEM
help
Contract programming for C++.
comment "boost-contract needs a toolchain w/ NPTL"
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
config BR2_PACKAGE_BOOST_COROUTINE
bool "boost-coroutine"
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context, boost-thread
select BR2_PACKAGE_BOOST_CHRONO
select BR2_PACKAGE_BOOST_CONTEXT
select BR2_PACKAGE_BOOST_SYSTEM
select BR2_PACKAGE_BOOST_THREAD
help
deprecated coroutine library, the non-depricated coroutine2
library is a header-only library and does not need to be
selected.
comment "boost-coroutine needs a toolchain not affected by GCC bug 64735"
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
config BR2_PACKAGE_BOOST_DATE_TIME
bool "boost-date_time"
help
A set of date-time libraries based on generic programming
concepts.
config BR2_PACKAGE_BOOST_EXCEPTION
bool "boost-exception"
help
The Boost Exception library supports transporting of arbitrary
data in exception objects, and transporting of exceptions
between threads.
config BR2_PACKAGE_BOOST_FIBER
bool "boost-fiber"
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
# mips support uses the "pause" instruction, only available
# since mips32r2/mips64r2.
depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context
select BR2_PACKAGE_BOOST_CONTEXT
select BR2_PACKAGE_BOOST_FILESYSTEM
select BR2_PACKAGE_BOOST_SYSTEM
help
C++11 userland threads library.
comment "boost-fiber needs a toolchain w/ NPTL"
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
comment "boost-fiber needs a toolchain not affected by GCC bug 64735"
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|| BR2_TOOLCHAIN_GCC_AT_LEAST_6
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
config BR2_PACKAGE_BOOST_FILESYSTEM
bool "boost-filesystem"
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic
select BR2_PACKAGE_BOOST_ATOMIC
select BR2_PACKAGE_BOOST_SYSTEM
help
The Boost Filesystem Library provides portable facilities to
query and manipulate paths, files, and directories.
config BR2_PACKAGE_BOOST_GRAPH
bool "boost-graph"
select BR2_PACKAGE_BOOST_REGEX
help
The BGL graph interface and graph components are generic, in
the same sense as the the Standard Template Library (STL).
config BR2_PACKAGE_BOOST_GRAPH_PARALLEL
bool "boost-graph_parallel"
help
The PBGL graph interface and graph components are generic, in
the same sense as the the Standard Template Library (STL).
config BR2_PACKAGE_BOOST_IOSTREAMS
bool "boost-iostreams"
select BR2_PACKAGE_BZIP2
select BR2_PACKAGE_ZLIB
help
Boost.IOStreams provides a framework for defining streams,
stream buffers and i/o filters.
config BR2_PACKAGE_BOOST_JSON
bool "boost-json"
select BR2_PACKAGE_BOOST_CONTAINER
help
Boost.JSON is a portable C++ library which provides containers
and algorithms that implement JavaScript Object Notation, or
simply "JSON", a lightweight data-interchange format.
To use the library "header-only" this option is not needed.
config BR2_PACKAGE_BOOST_LOCALE
bool "boost-locale"
# When boost-locale is enabled with icu support, Boost no
# longer supports building the libboost_* libraries as static
# libraries, causing build failures when other boost features
# than boost-locale are enabled. To work around this, we
# prevent using boost-locale on static linking configurations
# with icu enabled. See
# https://svn.boost.org/trac/boost/ticket/9685 for more
# details.
depends on !(BR2_STATIC_LIBS && BR2_PACKAGE_ICU)
depends on !(BR2_TOOLCHAIN_HAS_GCC_BUG_64735 && BR2_PACKAGE_ICU) # boost-thread
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|| !BR2_PACKAGE_ICU # boost-thread
select BR2_PACKAGE_BOOST_SYSTEM
select BR2_PACKAGE_BOOST_THREAD if BR2_PACKAGE_ICU
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
help
Provide localization and Unicode handling tools for C++.
comment "boost-locale needs a toolchain w/ dynamic library"
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
depends on BR2_PACKAGE_ICU
depends on BR2_STATIC_LIBS
comment "boost-locale needs a toolchain not affected by GCC bug 64735"
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
depends on BR2_PACKAGE_ICU
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
config BR2_PACKAGE_BOOST_LOG
bool "boost-log"
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
select BR2_PACKAGE_BOOST_ATOMIC
select BR2_PACKAGE_BOOST_DATE_TIME
select BR2_PACKAGE_BOOST_FILESYSTEM
select BR2_PACKAGE_BOOST_REGEX
select BR2_PACKAGE_BOOST_SYSTEM
select BR2_PACKAGE_BOOST_THREAD
help
Logging library.
comment "boost-log needs a toolchain w/ NPTL"
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
comment "boost-log needs a toolchain not affected by GCC bug 64735"
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
config BR2_PACKAGE_BOOST_MATH
bool "boost-math"
help
Boost.Math includes several contributions in the domain of
mathematics:
The Greatest Common Divisor and Least Common
Multiple library provides run-time and compile-time evaluation
of the greatest common divisor (GCD) or least common multiple
(LCM) of two integers.
The Special Functions library currently provides eight
templated special functions, in namespace boost.
The Complex Number Inverse Trigonometric Functions are the
inverses of trigonometric functions currently present in the
C++ standard.
Quaternions are a relative of complex numbers often used to
parameterise rotations in three dimentional space.
Octonions, like quaternions, are a relative of complex
numbers.
config BR2_PACKAGE_BOOST_MPI
bool "boost-mpi"
help
Message Passing Interface library, for use in
distributed-memory parallel application programming.
config BR2_PACKAGE_BOOST_NOWIDE
bool "boost-nowide"
help
Library for cross-platform, unicode aware programming.
config BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
bool "boost-program_options"
help
The program_options library allows program developers to
obtain program options, that is (name, value) pairs from the
user, via conventional methods such as command line and config
file.
config BR2_PACKAGE_BOOST_PYTHON
bool "boost-python"
depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
help
The Boost Python Library is a framework for interfacing Python
and C++. It allows you to quickly and seamlessly expose C++
classes functions and objects to Python, and vice-versa,
using no special tools -- just your C++ compiler.
config BR2_PACKAGE_BOOST_RANDOM
bool "boost-random"
select BR2_PACKAGE_BOOST_SYSTEM
help
A complete system for random number generation.
config BR2_PACKAGE_BOOST_REGEX
bool "boost-regex"
help
A new infrastructure for generic algorithms that builds on top
of the new iterator concepts.
config BR2_PACKAGE_BOOST_SERIALIZATION
bool "boost-serialization"
help
Serialization for persistence and marshalling.
config BR2_PACKAGE_BOOST_STACKTRACE
bool "boost-stacktrace"
depends on !BR2_STATIC_LIBS
help
Gather, store, copy and print backtraces.
comment "boost-stacktrace needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS
config BR2_PACKAGE_BOOST_SYSTEM
bool "boost-system"
help
Operating system support, including the diagnostics support
that will be part of the C++0x standard library.
config BR2_PACKAGE_BOOST_TEST
bool "boost-test"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_BOOST_SYSTEM
select BR2_PACKAGE_BOOST_TIMER
help
Support for simple program testing, full unit testing, and for
program execution monitoring.
config BR2_PACKAGE_BOOST_THREAD
bool "boost-thread"
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::current_exception
select BR2_PACKAGE_BOOST_CHRONO
select BR2_PACKAGE_BOOST_SYSTEM
help
Portable C++ multi-threading. C++11, C++14.
comment "boost-thread needs a toolchain not affected by GCC bug 64735"
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
config BR2_PACKAGE_BOOST_TIMER
bool "boost-timer"
select BR2_PACKAGE_BOOST_CHRONO
select BR2_PACKAGE_BOOST_SYSTEM
help
Event timer, progress timer, and progress display classes.
config BR2_PACKAGE_BOOST_TYPE_ERASURE
bool "boost-type_erasure"
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
select BR2_PACKAGE_BOOST_SYSTEM
select BR2_PACKAGE_BOOST_THREAD
help
Runtime polymorphism based on concepts.
comment "boost-type_erasure needs a toolchain not affected by GCC bug 64735"
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
config BR2_PACKAGE_BOOST_WAVE
bool "boost-wave"
# limitation of assembler for coldfire
# error: Tried to convert PC relative branch to absolute jump
depends on !BR2_m68k_cf
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
select BR2_PACKAGE_BOOST_DATE_TIME
select BR2_PACKAGE_BOOST_FILESYSTEM
select BR2_PACKAGE_BOOST_SYSTEM
select BR2_PACKAGE_BOOST_THREAD
help
The Boost.Wave library is a Standards conformant, and highly
configurable implementation of the mandated C99/C++
preprocessor functionality packed behind an easy to use
iterator interface.
comment "boost-wave needs a toolchain not affected by GCC bug 64735"
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
endif
+5
View File
@@ -0,0 +1,5 @@
# From https://www.boost.org/users/history/version_1_77_0.html
sha256 fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854 boost_1_77_0.tar.bz2
# Locally computed
sha256 c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566 LICENSE_1_0.txt
+208
View File
@@ -0,0 +1,208 @@
################################################################################
#
# boost
#
################################################################################
BOOST_VERSION = 1.77.0
BOOST_SOURCE = boost_$(subst .,_,$(BOOST_VERSION)).tar.bz2
BOOST_SITE = https://boostorg.jfrog.io/artifactory/main/release/$(BOOST_VERSION)/source
BOOST_INSTALL_STAGING = YES
BOOST_LICENSE = BSL-1.0
BOOST_LICENSE_FILES = LICENSE_1_0.txt
BOOST_CPE_ID_VENDOR = boost
# keep host variant as minimal as possible
HOST_BOOST_FLAGS = --without-icu --with-toolset=gcc \
--without-libraries=$(subst $(space),$(comma),atomic chrono context \
contract container coroutine date_time exception fiber filesystem graph \
graph_parallel iostreams json locale log math mpi nowide program_options \
python random regex serialization stacktrace system test thread timer \
type_erasure wave)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_ATOMIC),,atomic)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CHRONO),,chrono)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CONTAINER),,container)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CONTEXT),,context)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CONTRACT),,contract)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_COROUTINE),,coroutine)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_DATE_TIME),,date_time)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_EXCEPTION),,exception)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_FIBER),,fiber)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_FILESYSTEM),,filesystem)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_GRAPH),,graph)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_GRAPH_PARALLEL),,graph_parallel)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_IOSTREAMS),,iostreams)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_JSON),,json)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_LOCALE),,locale)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_LOG),,log)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MATH),,math)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MPI),,mpi)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_NOWIDE),,nowide)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_PROGRAM_OPTIONS),,program_options)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_PYTHON),,python)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_RANDOM),,random)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_REGEX),,regex)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_SERIALIZATION),,serialization)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_STACKTRACE),,stacktrace)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_SYSTEM),,system)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TEST),,test)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_THREAD),,thread)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TIMER),,timer)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TYPE_ERASURE),,type_erasure)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_WAVE),,wave)
BOOST_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
BOOST_FLAGS = --with-toolset=gcc
ifeq ($(BR2_PACKAGE_ICU),y)
BOOST_FLAGS += --with-icu=$(STAGING_DIR)/usr
BOOST_DEPENDENCIES += icu
else
BOOST_FLAGS += --without-icu
endif
ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y)
BOOST_DEPENDENCIES += bzip2 zlib
endif
ifeq ($(BR2_PACKAGE_BOOST_PYTHON),y)
BOOST_FLAGS += --with-python-root=$(HOST_DIR)
ifeq ($(BR2_PACKAGE_PYTHON3),y)
BOOST_FLAGS += --with-python=$(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR)
BOOST_TARGET_CXXFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)
BOOST_DEPENDENCIES += python3
else
BOOST_FLAGS += --with-python=$(HOST_DIR)/bin/python$(PYTHON_VERSION_MAJOR)
BOOST_TARGET_CXXFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)
BOOST_DEPENDENCIES += python
endif
endif
HOST_BOOST_OPTS += --no-cmake-config toolset=gcc threading=multi \
variant=release link=shared runtime-link=shared
ifeq ($(BR2_MIPS_OABI32),y)
BOOST_ABI = o32
else ifeq ($(BR2_arm),y)
BOOST_ABI = aapcs
else
BOOST_ABI = sysv
endif
BOOST_OPTS += --no-cmake-config \
toolset=gcc \
threading=multi \
abi=$(BOOST_ABI) \
variant=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release)
ifeq ($(BR2_sparc64),y)
BOOST_OPTS += architecture=sparc instruction-set=ultrasparc
endif
ifeq ($(BR2_sparc),y)
BOOST_OPTS += architecture=sparc instruction-set=v8
endif
# By default, Boost build and installs both the shared and static
# variants. Override that if we want static only or shared only.
ifeq ($(BR2_STATIC_LIBS),y)
BOOST_OPTS += link=static runtime-link=static
else ifeq ($(BR2_SHARED_LIBS),y)
BOOST_OPTS += link=shared runtime-link=shared
endif
ifeq ($(BR2_PACKAGE_BOOST_LOCALE),y)
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
# posix backend needs monetary.h which isn't available on uClibc
BOOST_OPTS += boost.locale.posix=off
endif
BOOST_DEPENDENCIES += $(if $(BR2_ENABLE_LOCALE),,libiconv)
endif
BOOST_WITHOUT_FLAGS_COMMASEPARATED += $(subst $(space),$(comma),$(strip $(BOOST_WITHOUT_FLAGS)))
BOOST_FLAGS += $(if $(BOOST_WITHOUT_FLAGS_COMMASEPARATED), --without-libraries=$(BOOST_WITHOUT_FLAGS_COMMASEPARATED))
BOOST_LAYOUT = $(call qstrip, $(BR2_PACKAGE_BOOST_LAYOUT))
# how verbose should the build be?
BOOST_OPTS += $(if $(QUIET),-d,-d+1)
HOST_BOOST_OPTS += $(if $(QUIET),-d,-d+1)
define BOOST_CONFIGURE_CMDS
(cd $(@D) && ./bootstrap.sh $(BOOST_FLAGS))
echo "using gcc : `$(TARGET_CC) -dumpversion` : $(TARGET_CXX) : <cxxflags>\"$(BOOST_TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > $(@D)/user-config.jam
echo "" >> $(@D)/user-config.jam
sed -i "s/: -O.* ;/: $(TARGET_OPTIMIZATION) ;/" $(@D)/tools/build/src/tools/gcc.jam
endef
define BOOST_BUILD_CMDS
(cd $(@D) && $(TARGET_MAKE_ENV) ./tools/build/src/engine/bjam -j$(PARALLEL_JOBS) -q \
--user-config=$(@D)/user-config.jam \
$(BOOST_OPTS) \
--ignore-site-config \
--layout=$(BOOST_LAYOUT))
endef
define BOOST_INSTALL_TARGET_CMDS
(cd $(@D) && $(TARGET_MAKE_ENV) ./b2 -j$(PARALLEL_JOBS) -q \
--user-config=$(@D)/user-config.jam \
$(BOOST_OPTS) \
--prefix=$(TARGET_DIR)/usr \
--ignore-site-config \
--layout=$(BOOST_LAYOUT) install )
endef
define BOOST_INSTALL_STAGING_CMDS
(cd $(@D) && $(TARGET_MAKE_ENV) ./tools/build/src/engine/bjam -j$(PARALLEL_JOBS) -q \
--user-config=$(@D)/user-config.jam \
$(BOOST_OPTS) \
--prefix=$(STAGING_DIR)/usr \
--ignore-site-config \
--layout=$(BOOST_LAYOUT) install)
endef
# These hooks will help us to detect missing select in Config.in
# Indeed boost buildsystem can select a library even if the user has
# disable it
define BOOST_REMOVE_TARGET_LIBRARIES
rm -rf $(TARGET_DIR)/usr/lib/libboost_*
endef
BOOST_PRE_INSTALL_TARGET_HOOKS += BOOST_REMOVE_TARGET_LIBRARIES
define BOOST_CHECK_TARGET_LIBRARIES
@$(foreach disabled,$(BOOST_WITHOUT_FLAGS),\
! ls $(TARGET_DIR)/usr/lib/libboost_$(disabled)* 1>/dev/null 2>&1 || \
! echo "libboost_$(disabled) shouldn't have been installed: missing select in boost/Config.in" || \
exit 1;)
endef
BOOST_POST_INSTALL_TARGET_HOOKS += BOOST_CHECK_TARGET_LIBRARIES
define HOST_BOOST_CONFIGURE_CMDS
(cd $(@D) && ./bootstrap.sh $(HOST_BOOST_FLAGS))
echo "using gcc : `$(HOST_CC) -dumpversion` : $(HOSTCXX) : <cxxflags>\"$(HOST_CXXFLAGS)\" <linkflags>\"$(HOST_LDFLAGS)\" ;" > $(@D)/user-config.jam
echo "" >> $(@D)/user-config.jam
endef
define HOST_BOOST_BUILD_CMDS
(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q \
--user-config=$(@D)/user-config.jam \
$(HOST_BOOST_OPTS) \
--ignore-site-config \
--prefix=$(HOST_DIR) )
endef
define HOST_BOOST_INSTALL_CMDS
(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q \
--user-config=$(@D)/user-config.jam \
$(HOST_BOOST_OPTS) \
--prefix=$(HOST_DIR) \
--ignore-site-config \
--layout=$(BOOST_LAYOUT) install )
endef
$(eval $(generic-package))
$(eval $(host-generic-package))