Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge master to mickledore #190

Merged
merged 18 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/CI_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: meta-mono
on:
push:
branches:
- master
- master-next
- mickledore
pull_request:

Expand All @@ -16,7 +18,7 @@ jobs:
strategy:
matrix:
dotnet_version: [7.0.202]
mono_version: [6.12.0.161]
mono_version: [6.12.0.182]
branch: [mickledore]
arch: [x86-64, arm, arm64]
env:
Expand Down
8 changes: 4 additions & 4 deletions conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ BBFILE_PATTERN_mono := "^${LAYERDIR}/"
BBFILE_PRIORITY_mono = "5"

# Default tested with qemux86/qemuarm
PREFERRED_VERSION_mono ?= "6.12.0.161"
PREFERRED_VERSION_mono-native ?= "6.12.0.161"
PREFERRED_VERSION_mono ?= "6.12.0.182"
PREFERRED_VERSION_mono-native ?= "6.12.0.182"

PREFERRED_VERSION_libgdiplus ?= "6.0.5"
PREFERRED_VERSION_libgdiplus-native ?= "6.0.5"

PREFERRED_VERSION_nuget ?= "5.2.0"
PREFERRED_VERSION_nuget-native ?= "5.2.0"

PREFERRED_VERSION_msbuild ?= "16.6"
PREFERRED_VERSION_msbuild-native ?= "16.6"
PREFERRED_VERSION_msbuild ?= "16.10.1"
PREFERRED_VERSION_msbuild-native ?= "16.10.1"

LAYERSERIES_COMPAT_mono = "kirkstone langdale mickledore"
12 changes: 11 additions & 1 deletion recipes-mono/libgdiplus/libgdiplus-common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ BUGTRACKER = "http://bugzilla.xamarin.com/"
SECTION = "libs"
LICENSE = "MIT"

SRC_URI = "https://github.com/mono/libgdiplus/archive/${PV}.tar.gz;downloadfilename=${BPN}-${PV}.tar.gz"
BRANCH ?= "main"

BRANCH_googletest ?= "v1.8.x"
SRCREV_googletest = "dea0216d0c6bc5e63cf5f6c8651cd268668032ec"

SRC_URI = " \
git://github.com/mono/libgdiplus.git;protocol=https;branch=${BRANCH} \
gitsm://github.com/google/googletest.git;protocol=https;name=googletest;branch=${BRANCH_googletest};destsuffix=git/external/googletest \
"

S = "${WORKDIR}/git"

inherit autotools pkgconfig

Expand Down
3 changes: 1 addition & 2 deletions recipes-mono/libgdiplus/libgdiplus-native_4.2.bb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fe7364dfce9f3689eb6995e7cdd56879"

SRC_URI += "file://libgdiplus-2.10.9-format.patch"

SRC_URI[md5sum] = "925709982aba701c567850617e2206b1"
SRC_URI[sha256sum] = "98f8a8e58ed22e136c4ac6eaafbc860757f5a97901ecc0ea357e2b6e4cfa2be5"
SRCREV = "109aeea93fbf8c9da94e9e9a8ed6c6e433c8d554"
4 changes: 2 additions & 2 deletions recipes-mono/libgdiplus/libgdiplus-native_6.0.4.bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ require libgdiplus-native.inc

LIC_FILES_CHKSUM = "file://COPYING;md5=e0a7dacaa67d7e24a32074fba736dc59"

SRC_URI[md5sum] = "3f94b3d61934eecccaaac5a49501b283"
SRC_URI[sha256sum] = "9a5e3f98018116f99361520348e9713cd05680c231d689a83d87acfaf237d3a8"
BRANCH = "release/6.0"
SRCREV = "c5b9035d14146e054f2636f2e70dd3577bdaa397"
4 changes: 2 additions & 2 deletions recipes-mono/libgdiplus/libgdiplus-native_6.0.5.bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ require libgdiplus-native.inc

LIC_FILES_CHKSUM = "file://COPYING;md5=e0a7dacaa67d7e24a32074fba736dc59"

SRC_URI[md5sum] = "8079300e708c7ea9b4254d4b2eeba463"
SRC_URI[sha256sum] = "1fd034f4b636214cc24e94c563cd10b3f3444d9f0660927b60e63fd4131d97fa"
BRANCH = "release/6.0"
SRCREV = "110bdc284272258a0d9c95db0de8fcf34b6888b0"
3 changes: 1 addition & 2 deletions recipes-mono/libgdiplus/libgdiplus_4.2.bb
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ SRC_URI += " \
file://libgdiplus-2.10.9-format.patch \
"

SRC_URI[md5sum] = "925709982aba701c567850617e2206b1"
SRC_URI[sha256sum] = "98f8a8e58ed22e136c4ac6eaafbc860757f5a97901ecc0ea357e2b6e4cfa2be5"
SRCREV = "109aeea93fbf8c9da94e9e9a8ed6c6e433c8d554"
4 changes: 2 additions & 2 deletions recipes-mono/libgdiplus/libgdiplus_6.0.2.bb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e0a7dacaa67d7e24a32074fba736dc59"

SRC_URI += "file://0001-fix-cross-compile.patch"

SRC_URI[md5sum] = "94f9f05004e6054e414d747844e897b0"
SRC_URI[sha256sum] = "d605bf548affd29bd0418001ffb1bb8c1bf9962c1c37c23744abb0194a099232"
BRANCH = "release/6.0"
SRCREV = "35ae5341c2326c44e26058ca90b12303bb9b1da0"
4 changes: 2 additions & 2 deletions recipes-mono/libgdiplus/libgdiplus_6.0.4.bb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ SRC_URI += " \
file://0001-fix-cross-compile.patch \
"

SRC_URI[md5sum] = "3f94b3d61934eecccaaac5a49501b283"
SRC_URI[sha256sum] = "9a5e3f98018116f99361520348e9713cd05680c231d689a83d87acfaf237d3a8"
BRANCH = "release/6.0"
SRCREV = "c5b9035d14146e054f2636f2e70dd3577bdaa397"
4 changes: 2 additions & 2 deletions recipes-mono/libgdiplus/libgdiplus_6.0.5.bb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ SRC_URI += " \
file://0001-fix-cross-compile.patch \
"

SRC_URI[md5sum] = "8079300e708c7ea9b4254d4b2eeba463"
SRC_URI[sha256sum] = "1fd034f4b636214cc24e94c563cd10b3f3444d9f0660927b60e63fd4131d97fa"
BRANCH = "release/6.0"
SRCREV = "110bdc284272258a0d9c95db0de8fcf34b6888b0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From e019d4ac4735e774d0a3c15bb36d5eb3ebfa3053 Mon Sep 17 00:00:00 2001
From: Raphael Robatsch <raphael-git@tapesoftware.net>
Date: Tue, 9 May 2023 11:55:02 +0200
Subject: [PATCH] Disable mmap(MAP_32BIT) support

mmap(2) with flag MAP_32BIT can erroneously return ENOMEM on recent
kernels. Disable MAP_32BIT support for now.

Reference: https://lore.kernel.org/linux-mm/cb8dc31a-fef2-1d09-f133-e9f7b9f9e77a@sony.com/
Reference: https://lore.kernel.org/all/20230414185919.4175572-1-Liam.Howlett@oracle.com/T/#m00a0ac8a72bf2f26711b7f8cc56612a8ef62c3d0
---
mono/mini/mini-amd64.h | 2 --
mono/utils/mono-codeman.c | 4 ----
2 files changed, 6 deletions(-)

diff --git a/mono/mini/mini-amd64.h b/mono/mini/mini-amd64.h
index b321743b67d..0a81bb4bd6b 100644
--- a/mono/mini/mini-amd64.h
+++ b/mono/mini/mini-amd64.h
@@ -390,9 +390,7 @@

#endif /* !HOST_WIN32 */

-#if !defined(__linux__)
#define MONO_ARCH_NOMAP32BIT 1
-#endif

#ifdef TARGET_WIN32
#define MONO_AMD64_ARG_REG1 AMD64_RCX
diff --git a/mono/utils/mono-codeman.c b/mono/utils/mono-codeman.c
index 234aac4b0ca..5eccda92bd0 100644
--- a/mono/utils/mono-codeman.c
+++ b/mono/utils/mono-codeman.c
@@ -68,11 +68,7 @@ static const MonoCodeManagerCallbacks *code_manager_callbacks;
#define MAX_WASTAGE 32
#define MIN_BSIZE 32

-#ifdef __x86_64__
-#define ARCH_MAP_FLAGS MONO_MMAP_32BIT
-#else
#define ARCH_MAP_FLAGS 0
-#endif

#define MONO_PROT_RWX (MONO_MMAP_READ|MONO_MMAP_WRITE|MONO_MMAP_EXEC|MONO_MMAP_JIT)

--
2.40.1
5 changes: 5 additions & 0 deletions recipes-mono/mono/mono-6.12.0.182.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SRC_URI[sha256sum] = "57366a6ab4f3b5ecf111d48548031615b3a100db87c679fc006e8c8a4efd9424"

S = "${WORKDIR}/mono-${PV}"

DEPENDS += " cmake-native"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff -ur mono-6.8.0.96.org/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs mono-6.8.0.96/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
--- mono-6.8.0.96.org/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs 2020-01-15 07:46:01.000000000 +0000
+++ mono-6.8.0.96/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs 2020-02-08 21:22:11.059830600 +0000
@@ -3091,6 +3091,11 @@
return IntPtr.Zero;
}

+ if(width == 0 || height == 0) {
+ width = bitmap.Width;
+ height = bitmap.Height;
+ }
+
// Win32 only allows creation cursors of a certain size
if ((bitmap.Width != width) || (bitmap.Width != height)) {
cursor_bitmap = new Bitmap(bitmap, new Size(width, height));
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From e019d4ac4735e774d0a3c15bb36d5eb3ebfa3053 Mon Sep 17 00:00:00 2001
From: Raphael Robatsch <raphael-git@tapesoftware.net>
Date: Tue, 9 May 2023 11:55:02 +0200
Subject: [PATCH] Disable mmap(MAP_32BIT) support

mmap(2) with flag MAP_32BIT can erroneously return ENOMEM on recent
kernels. Disable MAP_32BIT support for now.

Reference: https://lore.kernel.org/linux-mm/cb8dc31a-fef2-1d09-f133-e9f7b9f9e77a@sony.com/
Reference: https://lore.kernel.org/all/20230414185919.4175572-1-Liam.Howlett@oracle.com/T/#m00a0ac8a72bf2f26711b7f8cc56612a8ef62c3d0
---
mono/mini/mini-amd64.h | 2 --
mono/utils/mono-codeman.c | 4 ----
2 files changed, 6 deletions(-)

diff --git a/mono/mini/mini-amd64.h b/mono/mini/mini-amd64.h
index b321743b67d..0a81bb4bd6b 100644
--- a/mono/mini/mini-amd64.h
+++ b/mono/mini/mini-amd64.h
@@ -390,9 +390,7 @@

#endif /* !HOST_WIN32 */

-#if !defined(__linux__)
#define MONO_ARCH_NOMAP32BIT 1
-#endif

#ifdef TARGET_WIN32
#define MONO_AMD64_ARG_REG1 AMD64_RCX
diff --git a/mono/utils/mono-codeman.c b/mono/utils/mono-codeman.c
index 234aac4b0ca..5eccda92bd0 100644
--- a/mono/utils/mono-codeman.c
+++ b/mono/utils/mono-codeman.c
@@ -68,11 +68,7 @@ static const MonoCodeManagerCallbacks *code_manager_callbacks;
#define MAX_WASTAGE 32
#define MIN_BSIZE 32

-#ifdef __x86_64__
-#define ARCH_MAP_FLAGS MONO_MMAP_32BIT
-#else
#define ARCH_MAP_FLAGS 0
-#endif

#define MONO_PROT_RWX (MONO_MMAP_READ|MONO_MMAP_WRITE|MONO_MMAP_EXEC|MONO_MMAP_JIT)

--
2.40.1
12 changes: 12 additions & 0 deletions recipes-mono/mono/mono-6.12.0.182/shm_open-test-crosscompile.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- mono-6.8.0.96/configure.ac.orig 2019-03-15 10:45:13.000000000 -0400
+++ mono-6.8.0.96/configure.ac 2019-03-19 08:00:53.815148109 -0400
@@ -3264,6 +3264,9 @@
AC_DEFINE(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP, 1, [shm_open that works well enough with mmap])
], [
AC_MSG_RESULT(no)
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP, 1, [shm_open that works well enough with mmap])
])
fi

2 changes: 1 addition & 1 deletion recipes-mono/mono/mono-native-6.xx-base.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RPROVIDES:${PN} += "nativesdk-mono"
PROVIDES += "nativesdk-mono"

do_compile() {
make EXTERNAL_MCS="${S}/mcs/class/lib/monolite/basic.exe" EXTERNAL_RUNTIME="${S}/foo/bar/mono"
oe_runmake EXTERNAL_MCS="${S}/mcs/class/lib/monolite/basic.exe" EXTERNAL_RUNTIME="${S}/foo/bar/mono"
}

EDEPENDS_X11 =+ "libgdiplus-native"
Expand Down
1 change: 1 addition & 0 deletions recipes-mono/mono/mono-native_6.12.0.161.bb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ SRC_URI = "http://download.mono-project.com/sources/mono/mono-${BASEPV}.tar.xz \
file://0036-Revert-2020-02-Start-a-dedicated-thread-for-MERP-cra.patch \
file://0037-Allow-nfloat-to-be-in-the-ObjCRuntime-namespace-and-.patch \
file://0039-aot-Prepend-the-assembly-name-to-the-names-of-gshare.patch \
file://disable-mmap-MAP_32BIT-support.patch \
"

addtask fixup_config after do_patch before do_configure
Expand Down
21 changes: 21 additions & 0 deletions recipes-mono/mono/mono-native_6.12.0.182.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require mono-6.xx.inc
require mono-mit-bsd-6xx.inc
require mono-native-6.xx-base.inc
require mono-${PV}.inc

SRC_URI = "http://download.mono-project.com/sources/mono/mono-${PV}.tar.xz \
file://0001-patch-XplatUIX11-cursor.diff \
file://shm_open-test-crosscompile.diff \
file://disable-mmap-MAP_32BIT-support.patch \
"

addtask fixup_config after do_patch before do_configure

do_fixup_config() {
sed 's|$mono_libdir/libMonoPosixHelper@libsuffix@|libMonoPosixHelper.so|g' -i ${S}/data/config.in
sed 's|@X11@|libX11.so.6|g' -i ${S}/data/config.in
sed 's|@libgdiplus_install_loc@|libgdiplus.so.0|g' -i ${S}/data/config.in
}



1 change: 1 addition & 0 deletions recipes-mono/mono/mono_6.12.0.161.bb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ SRC_URI = "http://download.mono-project.com/sources/mono/mono-${BASEPV}.tar.xz \
file://0036-Revert-2020-02-Start-a-dedicated-thread-for-MERP-cra.patch \
file://0037-Allow-nfloat-to-be-in-the-ObjCRuntime-namespace-and-.patch \
file://0039-aot-Prepend-the-assembly-name-to-the-names-of-gshare.patch \
file://disable-mmap-MAP_32BIT-support.patch \
"


Expand Down
25 changes: 25 additions & 0 deletions recipes-mono/mono/mono_6.12.0.182.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
require mono-6.xx.inc
require mono-mit-bsd-6xx.inc
require ${PN}-base.inc
require mono-${PV}.inc

RDEPENDS:${PN}-dev =+ " zlib "

SRC_URI = "http://download.mono-project.com/sources/mono/mono-${PV}.tar.xz \
file://shm_open-test-crosscompile.diff \
file://disable-mmap-MAP_32BIT-support.patch \
"


addtask fixup_config after do_patch before do_configure

do_fixup_config() {
sed 's|$mono_libdir/libMonoPosixHelper@libsuffix@|libMonoPosixHelper.so|g' -i ${S}/data/config.in
sed 's|@X11@|libX11.so.6|g' -i ${S}/data/config.in
sed 's|@libgdiplus_install_loc@|libgdiplus.so.0|g' -i ${S}/data/config.in
}

PACKAGES += "${PN}-profiler "
FILES:${PN}-profiler += " ${datadir}/mono-2.0/mono/profiler/*"

INSANE_SKIP:${PN}-libs += "dev-so"
21 changes: 21 additions & 0 deletions recipes-mono/msbuild/msbuild-16.10.1/0001-Copy-hostfxr.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From be8f534947136661bfec11410da7767e92adb1f3 Mon Sep 17 00:00:00 2001
From: Nicolas Jeker <n.jeker@gmx.net>
Date: Fri, 22 Jan 2021 10:41:27 +0100
Subject: [PATCH] Copy hostfxr

---
eng/cibuild_bootstrapped_msbuild.sh | 1 +
1 file changed, 1 insertion(+)

diff --git a/eng/cibuild_bootstrapped_msbuild.sh b/eng/cibuild_bootstrapped_msbuild.sh
index 759c75f..cfa3c28 100755
--- a/eng/cibuild_bootstrapped_msbuild.sh
+++ b/eng/cibuild_bootstrapped_msbuild.sh
@@ -61,6 +61,7 @@ function DownloadMSBuildForMono {
unzip -q "$msbuild_zip" -d "$artifacts_dir"
# rename just to make it obvious when reading logs!
mv $artifacts_dir/msbuild $mono_msbuild_dir
+ cp %libhostfxr% $artifacts_dir/mono-msbuild/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
sed -i 's#/sh$#/bash#' $artifacts_dir/mono-msbuild/msbuild
chmod +x $artifacts_dir/mono-msbuild/MSBuild.dll

42 changes: 42 additions & 0 deletions recipes-mono/msbuild/msbuild-16.10.1/mono-msbuild-use-bash.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Index: xamarin-pkg-msbuild/gen_build_info.sh
===================================================================
--- xamarin-pkg-msbuild.orig/gen_build_info.sh
+++ xamarin-pkg-msbuild/gen_build_info.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash

if [ $# -ne 1 ]; then
echo "Usage: $0 <filename.cs>"
Index: xamarin-pkg-msbuild/mono/create_bootstrap.sh
===================================================================
--- xamarin-pkg-msbuild.orig/mono/create_bootstrap.sh
+++ xamarin-pkg-msbuild/mono/create_bootstrap.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash

# This creates a bootstrap from an exising mono installation
# This is just to ensure that we have the correct "matched" Roslyn
Index: xamarin-pkg-msbuild/msbuild-deploy.in
===================================================================
--- xamarin-pkg-msbuild.orig/msbuild-deploy.in
+++ xamarin-pkg-msbuild/msbuild-deploy.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
ABSOLUTE_PATH=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/`basename "${BASH_SOURCE[0]}"`
MSBUILD_SRC_DIR=`dirname $ABSOLUTE_PATH`
mono $MONO_OPTIONS $MSBUILD_SRC_DIR/MSBuild.exe $*
Index: xamarin-pkg-msbuild/eng/cibuild_bootstrapped_msbuild.sh
===================================================================
--- xamarin-pkg-msbuild.orig/eng/cibuild_bootstrapped_msbuild.sh
+++ xamarin-pkg-msbuild/eng/cibuild_bootstrapped_msbuild.sh
@@ -61,6 +61,7 @@ function DownloadMSBuildForMono {
unzip -q "$msbuild_zip" -d "$artifacts_dir"
# rename just to make it obvious when reading logs!
mv $artifacts_dir/msbuild $mono_msbuild_dir
+ sed -i 's#/sh$#/bash#' $artifacts_dir/mono-msbuild/msbuild
chmod +x $artifacts_dir/mono-msbuild/MSBuild.dll

if [[ `uname -s` != 'Darwin' ]]; then
Loading