diff --git a/Dockerfile.ios b/Dockerfile.ios index d5c354d..66acd12 100644 --- a/Dockerfile.ios +++ b/Dockerfile.ios @@ -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 && \ diff --git a/Dockerfile.javascript b/Dockerfile.javascript index 9f6aa61..19eb396 100644 --- a/Dockerfile.javascript +++ b/Dockerfile.javascript @@ -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 && \ diff --git a/Dockerfile.osx b/Dockerfile.osx index 1ebc32a..7ad1f7e 100644 --- a/Dockerfile.osx +++ b/Dockerfile.osx @@ -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 \ diff --git a/build.sh b/build.sh index ea99945..fc5db10 100755 --- a/build.sh +++ b/build.sh @@ -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 diff --git a/files/patches/mono-emscripten-1.39.9.patch b/files/patches/mono-emscripten-1.39.9.patch deleted file mode 100644 index e909a9f..0000000 --- a/files/patches/mono-emscripten-1.39.9.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 8daffc3e4c562560f9e5c4d643bc38e5350eff31 Mon Sep 17 00:00:00 2001 -From: Zoltan Varga -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 , 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 diff --git a/files/patches/mono-sys-uio-fix-preadv-misdetection.patch b/files/patches/mono-sys-uio-fix-preadv-misdetection.patch deleted file mode 100644 index 4e4d646..0000000 --- a/files/patches/mono-sys-uio-fix-preadv-misdetection.patch +++ /dev/null @@ -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__) */ - - - /* diff --git a/files/patches/mono-xcode-allow-weak-import.patch b/files/patches/mono-xcode-allow-weak-import.patch deleted file mode 100644 index 38142d3..0000000 --- a/files/patches/mono-xcode-allow-weak-import.patch +++ /dev/null @@ -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 \