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,56 @@
From 24484e80b3e329c9edee1995e102f8612eedb79c Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Tue, 13 May 2014 23:32:27 +0200
Subject: [PATCH] Add AO_REQUIRE_CAS to fix build on ARM < v6
ARM earlier than ARMv6, such as ARMv4 and ARMv5 do not provide
optimize atomic operations in libatomic_ops. Since libunwind is using
such operations, it should define AO_REQUIRE_CAS before including
<atomic_ops.h> so that libatomic_ops knows it should use emulated
atomic operations instead (even though they are obviously a lot more
expensive).
Also, while real atomic operations are all inline functions and
therefore linking against libatomic_ops was not required, the emulated
atomic operations actually require linking against libatomic_ops, so
the commented AC_CHECK_LIB test in acinclude.m4 is uncommented to make
sure we link against libatomic_ops.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
acinclude.m4 | 8 +-------
include/libunwind_i.h | 1 +
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index 497f7c2..9c15af1 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -22,11 +22,5 @@ fi])
AC_DEFUN([CHECK_ATOMIC_OPS],
[dnl Check whether the system has the atomic_ops package installed.
AC_CHECK_HEADERS(atomic_ops.h)
-#
-# Don't link against libatomic_ops for now. We don't want libunwind
-# to depend on libatomic_ops.so. Fortunately, none of the platforms
-# we care about so far need libatomic_ops.a (everything is done via
-# inline macros).
-#
-# AC_CHECK_LIB(atomic_ops, main)
+ AC_CHECK_LIB(atomic_ops, main)
])
diff --git a/include/libunwind_i.h b/include/libunwind_i.h
index 23f615e..deabdfd 100644
--- a/include/libunwind_i.h
+++ b/include/libunwind_i.h
@@ -95,6 +95,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
(pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
#ifdef HAVE_ATOMIC_OPS_H
+# define AO_REQUIRE_CAS
# include <atomic_ops.h>
static inline int
cmpxchg_ptr (void *addr, void *old, void *new)
--
1.9.2
+36
View File
@@ -0,0 +1,36 @@
# libunwind is only available for a certain subset of the
# architectures (as visible in the list of architectures supported
# with the glibc C library below).
#
# In addition to this, on some architectures libunwind requires the
# *context() function from the C library, which are only available on
# certain architectures in uClibc, and not available at all on
# musl. But on some other architectures, libunwind works without using
# the *context() functions, which allows it to be built with musl.
config BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
bool
default y if BR2_TOOLCHAIN_USES_GLIBC && \
(BR2_ARM_CPU_HAS_ARM || BR2_aarch64 || BR2_mips || BR2_mipsel || \
BR2_mips64 || BR2_mips64el || BR2_powerpc || BR2_sh || \
BR2_i386 || BR2_x86_64)
default y if BR2_TOOLCHAIN_USES_UCLIBC && \
(BR2_ARM_CPU_HAS_ARM || BR2_mips || BR2_mipsel || \
BR2_mips64 || BR2_mips64el || BR2_x86_64)
default y if BR2_TOOLCHAIN_USES_MUSL && \
(BR2_ARM_CPU_HAS_ARM || BR2_aarch64 || BR2_x86_64)
config BR2_PACKAGE_LIBUNWIND
bool "libunwind"
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
# forcefully links against libgcc_s, only available in dynamic
# linking configurations
depends on !BR2_STATIC_LIBS
help
C API to determine the call-chain of a program.
http://www.nongnu.org/libunwind/index.html
comment "libunwind needs a toolchain w/ threads, dynamic library"
depends on BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+5
View File
@@ -0,0 +1,5 @@
# Locally calculated after checking pgp signature
sha256 90337653d92d4a13de590781371c604f9031cdb50520366aa1e3a91e1efb1017 libunwind-1.5.0.tar.gz
# Hash for license file
sha256 6a0dbbdaec2b3136b7bf045586f4212bdf74e7af688bf9dfe9154607cf5ec156 COPYING
+23
View File
@@ -0,0 +1,23 @@
################################################################################
#
# libunwind
#
################################################################################
LIBUNWIND_VERSION = 1.5.0
LIBUNWIND_SITE = http://download.savannah.gnu.org/releases/libunwind
LIBUNWIND_INSTALL_STAGING = YES
LIBUNWIND_LICENSE_FILES = COPYING
LIBUNWIND_LICENSE = MIT
LIBUNWIND_CPE_ID_VENDOR = libunwind_project
LIBUNWIND_AUTORECONF = YES
LIBUNWIND_CONF_OPTS = \
--disable-tests \
$(if $(BR2_INSTALL_LIBSTDCPP),--enable-cxx-exceptions,--disable-cxx-exceptions)
ifeq ($(BR2_PACKAGE_LIBATOMIC_OPS),y)
LIBUNWIND_DEPENDENCIES += libatomic_ops
endif
$(eval $(autotools-package))