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,52 @@
From 02a44ee1df8176c72e75fd706d1a8f063d3196d5 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Mon, 5 Nov 2018 22:50:40 +0100
Subject: Fix linkage with a system libatomic_ops shared library
Issue #247 (bdwgc).
When bdwgc is linked with the external libatomic_ops, bdw-gc.pc must
contain the needed dynamic libraries (such as -latomic_ops) otherwise
build of applications could fail on the link stage on some hosts:
* libgc.so: undefined reference to 'AO_fetch_compare_and_swap_emulation'
* libgc.so: undefined reference to 'AO_store_full_emulation'
So, this commit sets ATOMIC_OPS_LIBS to "-latomic_ops" when a system
atomic_ops library is used and uses ATOMIC_OPS_LIBS in bdw-gc.pc.in.
* bdw-gc.pc.in (Libs): Add @ATOMIC_OPS_LIBS@.
* configure.ac [$with_libatomic_ops!=no && $with_libatomic_ops!=none
&& $THREADS!=none] (ATOMIC_OPS_LIBS): Set to -latomic_ops; do AC_SUBST.
Fix is cherry-picked from bdwgc upstream
Link to original commit https://github.com/ivmai/bdwgc/commit/02a44ee1df8176c72e75fd706d1a8f063d3196d5?branch=02a44ee1df8176c72e75fd706d1a8f063d3196d5&diff=unified
Signed-off-by: Illia Bitkov <illia.bitkov@mind.be>
diff --git a/external/bdwgc/bdw-gc.pc.in b/external/bdwgc/bdw-gc.pc.in
index ef4c2341..a32e7598 100644
--- a/external/bdwgc/bdw-gc.pc.in
+++ b/external/bdwgc/bdw-gc.pc.in
@@ -6,5 +6,5 @@ includedir=@includedir@
Name: Boehm-Demers-Weiser Conservative Garbage Collector
Description: A garbage collector for C and C++
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lgc
+Libs: -L${libdir} @ATOMIC_OPS_LIBS@ -lgc
Cflags: -I${includedir}
diff --git a/external/bdwgc/configure.ac b/external/bdwgc/configure.ac
index 21abe8fa..9ffe81de 100644
--- a/external/bdwgc/configure.ac
+++ b/external/bdwgc/configure.ac
@@ -1081,7 +1081,9 @@ AS_IF([test x"$with_libatomic_ops" = xno \
AC_MSG_CHECKING([which libatomic_ops to use])
AS_IF([test x"$with_libatomic_ops" != xno],
[ AS_IF([test x"$with_libatomic_ops" != xnone -a x"$THREADS" != xnone],
- [ AC_MSG_RESULT([external]) ],
+ [ AC_MSG_RESULT([external])
+ ATOMIC_OPS_LIBS="-latomic_ops"
+ AC_SUBST([ATOMIC_OPS_LIBS]) ],
[ AC_MSG_RESULT([none])
AS_IF([test x"$THREADS" != xnone],
[ AC_DEFINE([GC_BUILTIN_ATOMIC], [1],
@@ -0,0 +1,34 @@
From 17650f7e0f571287bb14bb9b4fbde7b91d842bb4 Mon Sep 17 00:00:00 2001
From: monojenkins <jo.shields+jenkins@xamarin.com>
Date: Thu, 24 Sep 2020 12:17:34 -0400
Subject: [PATCH] Ongoing work on the cmake build. (#20428)
* Fix some warnings.
* Avoid creating netcore/config.make.
* Fix CPU_COUNT test.
* Add missing source file.
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
[Retrieved (and updated to keep only update of icall.c) from:
https://github.com/mono/mono/commit/17650f7e0f571287bb14bb9b4fbde7b91d842bb4]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
mono/metadata/CMakeLists.txt | 1 +
mono/metadata/icall.c | 2 +-
mono/mini/CMakeLists.txt | 5 +++++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c
index fa991bc72e57..f2c003ac1ff1 100644
--- a/mono/metadata/icall.c
+++ b/mono/metadata/icall.c
@@ -9605,7 +9605,7 @@ mono_create_icall_signatures (void)
int n;
while ((n = sig->param_count)) {
--sig->param_count; // remove ret
- gsize_a *types = (gsize*)(sig + 1);
+ gsize_a *types = (gsize_a*)(sig + 1);
for (int i = 0; i < n; ++i) {
gsize index = *types++;
g_assert (index < G_N_ELEMENTS (lookup));
+29
View File
@@ -0,0 +1,29 @@
config BR2_PACKAGE_HOST_MONO_ARCH_SUPPORTS
bool
default y if BR2_HOSTARCH = "x86_64"
default y if BR2_HOSTARCH = "x86"
config BR2_PACKAGE_MONO_ARCH_SUPPORTS
bool
default y if (BR2_arm || BR2_armeb || BR2_i386 || \
BR2_powerpc || BR2_x86_64)
depends on BR2_PACKAGE_HOST_MONO_ARCH_SUPPORTS
depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS
config BR2_PACKAGE_MONO
bool "mono"
depends on BR2_PACKAGE_MONO_ARCH_SUPPORTS
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_STATIC_LIBS
select BR2_PACKAGE_LIBATOMIC_OPS
help
An open source, cross-platform, implementation of C#
and the CLR that is binary compatible with Microsoft.NET.
http://download.mono-project.com/sources/mono/
comment "mono needs a toolchain w/ C++, threads, dynamic library"
depends on BR2_PACKAGE_MONO_ARCH_SUPPORTS
depends on !BR2_INSTALL_LIBSTDCPP || \
!BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+5
View File
@@ -0,0 +1,5 @@
# sha256 locally computed
sha256 51de5c02ad511333f93ff585bca54c8784de35af4ff27b759d16b46c4402cdac mono-6.12.0.90.tar.xz
sha256 923c7053ad0d430cd9b0b69a0ccf3abb7170a1ce50ecbf01915b565a35823d10 LICENSE
sha256 fc488f3ec9f36856bea8cce5cdde1449176341ef93a3962b691970f8981799f4 mcs/COPYING
sha256 2c3c3ef532828bcd42bb3127349625a25291ff5ae7e6f8d42e0fe9b5be836a99 external/Newtonsoft.Json/Tools/7-zip/copying.txt
+66
View File
@@ -0,0 +1,66 @@
################################################################################
#
# mono
#
################################################################################
MONO_VERSION = 6.12.0.90
MONO_SITE = http://download.mono-project.com/sources/mono
MONO_SOURCE = mono-$(MONO_VERSION).tar.xz
MONO_LICENSE = GPL-2.0 or MIT (compiler, tools), MIT (libs) or commercial
MONO_LICENSE_FILES = LICENSE mcs/COPYING \
external/Newtonsoft.Json/Tools/7-zip/copying.txt
MONO_CPE_ID_VENDOR = mono-project
MONO_INSTALL_STAGING = YES
## Mono native
# patching configure.ac
MONO_AUTORECONF = YES
MONO_COMMON_CONF_OPTS = --with-mcs-docs=no \
--with-ikvm-native=no \
--enable-minimal=profiler,debug \
--enable-static \
--disable-btls \
--disable-system-aot
# Disable managed code (mcs folder) from building
MONO_CONF_OPTS = $(MONO_COMMON_CONF_OPTS) --disable-mcs-build
# The libraries have been built by the host-mono build. Since they are
# architecture-independent, we simply copy them to the target.
define MONO_INSTALL_LIBS
rsync -av --exclude=*.so --exclude=*.mdb \
$(HOST_DIR)/lib/mono $(TARGET_DIR)/usr/lib/
endef
MONO_POST_INSTALL_TARGET_HOOKS += MONO_INSTALL_LIBS
ifeq ($(BR2_PACKAGE_LIBICONV),y)
MONO_DEPENDENCIES += libiconv
endif
MONO_DEPENDENCIES += \
host-mono \
$(if $(BR2_PACKAGE_LIBUNWIND),libunwind) \
libatomic_ops
## Mono managed
HOST_MONO_CONF_OPTS = $(MONO_COMMON_CONF_OPTS) --disable-libraries
# ensure monolite is used
HOST_MONO_MAKE_OPTS += EXTERNAL_MCS=false
HOST_MONO_DEPENDENCIES = host-monolite host-gettext host-python3
define HOST_MONO_SETUP_MONOLITE
rm -rf $(@D)/mcs/class/lib/monolite
(cd $(@D)/mcs/class/lib; ln -s $(HOST_DIR)/lib/monolite monolite)
endef
HOST_MONO_POST_CONFIGURE_HOOKS += HOST_MONO_SETUP_MONOLITE
$(eval $(autotools-package))
$(eval $(host-autotools-package))