Update to Mono 6.12.0.111

- Since with latest godot-mono-builds, removing the need for downstream
  patches for iOS and Emscripten builds.
This commit is contained in:
Rémi Verschelde
2020-11-19 11:45:44 +01:00
parent dede88afa4
commit 98f617fbbd
7 changed files with 1 additions and 133 deletions

View File

@@ -27,10 +27,7 @@ ENV PATH="/root/ioscross/arm64/bin:/root/ioscross/x86_64/bin:${PATH}"
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
patch -p1 < /root/files/patches/mono-xcode-allow-weak-import.patch && \
patch -p1 < /root/files/patches/mono-sys-uio-fix-preadv-misdetection.patch && \
cd godot-mono-builds && \
export DISABLE_NO_WEAK_IMPORTS=1 && \
export MONO_SOURCE_ROOT=/root/${mono_version} && \
python3 ios.py configure -j --verbose --target=arm64 --ios-toolchain ${IOSCROSS_ROOT}/arm64 --ios-sdk ${IOSCROSS_ROOT}/arm64/SDK/iPhoneOS14.0.sdk --osx-toolchain ${OSXCROSS_ROOT} && \
python3 ios.py make -j --verbose --target=arm64 && \

View File

@@ -15,10 +15,8 @@ RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is manda
source /root/emsdk/emsdk_env.sh && \
cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
patch -p1 < /root/files/patches/mono-emscripten-1.39.9.patch && \
export MONO_SOURCE_ROOT=/root/${mono_version} && \
cd /root/${mono_version}/godot-mono-builds && \
sed -i patch_emscripten.py -e "/emscripten-pr-8457.diff/d" && \
python3 patch_emscripten.py && \
python3 wasm.py configure -j --target=runtime && \
python3 wasm.py make -j --target=runtime && \

View File

@@ -17,8 +17,6 @@ ENV PATH="/root/osxcross/target/bin:${PATH}"
RUN cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
patch -p1 < /root/files/patches/mono-xcode-allow-weak-import.patch && \
patch -p1 < /root/files/patches/mono-sys-uio-fix-preadv-misdetection.patch && \
export CMAKE=/root/osxcross/target/bin/x86_64-apple-darwin19-cmake && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/root/dependencies/mono \

View File

@@ -88,7 +88,7 @@ if [ ! -e ${mono_root} ]; then
# Set up godot-mono-builds in tree
git clone --progress https://github.com/godotengine/godot-mono-builds
pushd godot-mono-builds
git checkout b4c77dcfb6f38f660e73f60c4ae03e11173ac8fd
git checkout 42b90fe9a6a6ad6756a62866dc0dcc04a694f83b
export MONO_SOURCE_ROOT=${mono_root}
python3 patch_mono.py
popd

View File

@@ -1,58 +0,0 @@
From 8daffc3e4c562560f9e5c4d643bc38e5350eff31 Mon Sep 17 00:00:00 2001
From: Zoltan Varga <vargaz@gmail.com>
Date: Sun, 8 Mar 2020 00:16:18 -0500
Subject: [PATCH] Bump emscripten to 1.39.9. (#19147)
---
sdks/builds/emscripten-pr-8457.diff | 20 --------------------
sdks/builds/wasm.mk | 3 +--
2 files changed, 1 insertion(+), 22 deletions(-)
delete mode 100644 sdks/builds/emscripten-pr-8457.diff
diff --git a/sdks/builds/emscripten-pr-8457.diff b/sdks/builds/emscripten-pr-8457.diff
deleted file mode 100644
index 3a03bf669ec8..000000000000
--- a/sdks/builds/emscripten-pr-8457.diff
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/emcc.py 2019-08-13 20:07:34.000000000 -0500
-+++ b/emcc.py 2019-08-27 08:05:39.000000000 -0500
-@@ -915,7 +918,7 @@
- file_suffix = get_file_suffix(arg)
- if file_suffix in SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS or shared.Building.is_ar(arg): # we already removed -o <target>, so all these should be inputs
- newargs[i] = ''
-- if file_suffix.endswith(SOURCE_ENDINGS):
-+ if file_suffix.endswith(SOURCE_ENDINGS) or (has_dash_c and file_suffix.endswith(OBJECT_FILE_ENDINGS)):
- input_files.append((i, arg))
- has_source_inputs = True
- elif file_suffix.endswith(HEADER_ENDINGS):
-@@ -1838,7 +1840,7 @@
- # First, generate LLVM bitcode. For each input file, we get base.o with bitcode
- for i, input_file in input_files:
- file_ending = get_file_suffix(input_file)
-- if file_ending.endswith(SOURCE_ENDINGS):
-+ if file_ending.endswith(SOURCE_ENDINGS) or (has_dash_c and file_ending.endswith(OBJECT_FILE_ENDINGS)):
- compile_source_file(i, input_file)
- else: # bitcode
- if file_ending.endswith(BITCODE_ENDINGS):
diff --git a/sdks/builds/wasm.mk b/sdks/builds/wasm.mk
index 520e04c48cbc..53ed93cc0c8c 100644
--- a/sdks/builds/wasm.mk
+++ b/sdks/builds/wasm.mk
@@ -1,7 +1,7 @@
#emcc has lots of bash'isms
SHELL:=/bin/bash
-EMSCRIPTEN_VERSION=1.39.7
+EMSCRIPTEN_VERSION=1.39.9
EMSCRIPTEN_LOCAL_SDK_DIR=$(TOP)/sdks/builds/toolchains/emsdk
EMSCRIPTEN_SDK_DIR ?= $(EMSCRIPTEN_LOCAL_SDK_DIR)
@@ -29,7 +29,6 @@ $(EMSCRIPTEN_SDK_DIR)/.emscripten: | $(EMSCRIPTEN_SDK_DIR)
cd $(TOP)/sdks/builds/toolchains/emsdk && ./emsdk install $(EMSCRIPTEN_VERSION)
cd $(TOP)/sdks/builds/toolchains/emsdk && ./emsdk activate --embedded $(EMSCRIPTEN_VERSION)
cd $(TOP)/sdks/builds/toolchains/emsdk/upstream/emscripten && (patch -N -p1 < $(TOP)/sdks/builds/fix-emscripten-8511.diff; exit 0)
- cd $(TOP)/sdks/builds/toolchains/emsdk/upstream/emscripten && (patch -N -p1 < $(TOP)/sdks/builds/emscripten-pr-8457.diff; exit 0)
touch $@
.PHONY: provision-wasm

View File

@@ -1,38 +0,0 @@
Backported from Unity's mono fork:
https://github.com/Unity-Technologies/mono/pull/1309
---
diff --git a/support/sys-uio.c b/support/sys-uio.c
index 53e162f9..5e44f796 100644
--- a/support/sys-uio.c
+++ b/support/sys-uio.c
@@ -82,7 +82,7 @@ Mono_Posix_Syscall_writev (int dirfd, struct Mono_Posix_Iovec *iov, gint32 iovcn
}
#endif /* def HAVE_WRITEV */
-#ifdef HAVE_PREADV
+#if defined(HAVE_PREADV) && !defined(__APPLE__) // Configure incorrectly detects that this function is available on macOS SDK 11.0 (it is not)
gint64
Mono_Posix_Syscall_preadv (int dirfd, struct Mono_Posix_Iovec *iov, gint32 iovcnt, gint64 off)
{
@@ -100,9 +100,9 @@ Mono_Posix_Syscall_preadv (int dirfd, struct Mono_Posix_Iovec *iov, gint32 iovcn
free (v);
return res;
}
-#endif /* def HAVE_PREADV */
+#endif /* defined(HAVE_PREADV) && !defined(__APPLE__) */
-#ifdef HAVE_PWRITEV
+#if defined(HAVE_PWRITEV) && !defined(__APPLE__) // Configure incorrectly detects that this function is available on macOS SDK 11.0 (it is not)
gint64
Mono_Posix_Syscall_pwritev (int dirfd, struct Mono_Posix_Iovec *iov, gint32 iovcnt, gint64 off)
{
@@ -120,7 +120,7 @@ Mono_Posix_Syscall_pwritev (int dirfd, struct Mono_Posix_Iovec *iov, gint32 iovc
free (v);
return res;
}
-#endif /* def HAVE_PWRITEV */
+#endif /* defined(HAVE_PWRITEV) && !defined(__APPLE__) */
/*

View File

@@ -1,29 +0,0 @@
Workaround for Xcode bug: https://github.com/mono/mono/issues/19393
---
diff --git a/sdks/builds/ios.mk b/sdks/builds/ios.mk
index 0470ccb57cb..bf1036330c5 100644
--- a/sdks/builds/ios.mk
+++ b/sdks/builds/ios.mk
@@ -90,7 +90,6 @@ _ios-$(1)_CPPFLAGS= \
-DSMALL_CONFIG -D_XOPEN_SOURCE -DHOST_IOS -DHAVE_LARGE_FILE_SUPPORT=1 \
_ios-$(1)_LDFLAGS= \
- -Wl,-no_weak_imports \
-arch $(3) \
-framework CoreFoundation \
-lobjc -lc++
diff --git a/sdks/builds/mac.mk b/sdks/builds/mac.mk
index bded6b2c22b..98d8be2f456 100644
--- a/sdks/builds/mac.mk
+++ b/sdks/builds/mac.mk
@@ -36,8 +36,7 @@ _mac-$(1)_CXXFLAGS= \
_mac-$(1)_CPPFLAGS=
-_mac-$(1)_LDFLAGS= \
- -Wl,-no_weak_imports
+_mac-$(1)_LDFLAGS=
_mac-$(1)_CONFIGURE_FLAGS= \
--disable-boehm \