From a91f2a036f49acbcb120bb7d10629a1a8dcb702e Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 15 Mar 2023 01:51:53 -0400 Subject: [PATCH] user/dotnet8-stage0: upgrade to 8.0.100_pre2 --- user/dotnet8-stage0/APKBUILD | 49 ++++++----- ...-add-cmake-check-for-ioclt-prototype.patch | 81 ------------------- ...-add-stub-for-mini-is-gsharedvt-inst.patch | 66 +++++++++++++++ 3 files changed, 94 insertions(+), 102 deletions(-) delete mode 100644 user/dotnet8-stage0/runtime_82173-add-cmake-check-for-ioclt-prototype.patch create mode 100644 user/dotnet8-stage0/runtime_82678-add-stub-for-mini-is-gsharedvt-inst.patch diff --git a/user/dotnet8-stage0/APKBUILD b/user/dotnet8-stage0/APKBUILD index a62d8e6..bbb42ba 100644 --- a/user/dotnet8-stage0/APKBUILD +++ b/user/dotnet8-stage0/APKBUILD @@ -2,18 +2,18 @@ # Contributor: Antoine Martin (ayakael) pkgname=dotnet8-stage0 -pkgver=8.0.100_pre1 -pkgrel=1 +pkgver=8.0.100_pre2 +pkgrel=0 [ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross="" # Tag of tarball generator. -_gittag=v8.0.100-preview.1 +_gittag=v8.0.100-preview.2 # Versions of prebuilt artifacts and bootstrap tar _artifactsver=0.1.0-8.0.100-5.centos.8-x64 -_prebuiltsver=0.1.0-8.0.100-4.centos.8-x64 -_bootstrapver="8.0.100-preview.1.23115.2" +_prebuiltsver=0.1.0-8.0.100-11.centos.8-x64 +_bootstrapver="8.0.100-preview.2.23157.25" _bootstraprel=0 _installerver=$_bootstrapver @@ -30,8 +30,8 @@ _patches=" roslyn_allow-extra-params.patch runtime_76500-properly-set-toolchain-for-alpine.patch runtime_79856-save-errno-when-using-posix-semaphores.patch - runtime_82173-add-cmake-check-for-ioclt-prototype.patch runtime_82676-make-pal-console-c-use-int.patch + runtime_82678-add-stub-for-mini-is-gsharedvt-inst.patch runtime_make-lld-use-depend-on-existing-on-target.patch runtime_mono-thread-coop-undefine-fortify-source.patch runtime_no-additional-runtime-id.patch @@ -43,8 +43,8 @@ _extra_nupkgs=" https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-x64.7.0.2.nupkg https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-arm64.7.0.2.nupkg https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-arm.7.0.2.nupkg - https://lab.ilot.io/ayakael/repo-apk/-/raw/edge/archives/Microsoft.NETCore.App.Host.linux-musl-ppc64le.7.0.2.nupkg - https://lab.ilot.io/ayakael/repo-apk/-/raw/edge/archives/Microsoft.NETCore.App.Host.linux-musl-s390x.7.0.2.nupkg + microsoft.netcore.app.host.linux-musl-ppc64le.7.0.3.nupkg::https://lab.ilot.io/ayakael/dotnet-stage0/-/package_files/2067/download + microsoft.netcore.app.host.linux-musl-s390x.7.0.3.nupkg::https://lab.ilot.io/ayakael/dotnet-stage0/-/package_files/1904/download " _pkgver_macro=${pkgver%.*} @@ -214,7 +214,9 @@ prepare() { tar --use-compress-program="pigz" -xf "$srcdir"/dotnet-sdk-$_pkgver_macro*$_dotnet_arch*noextract -C "$_cli_root" --no-same-owner for i in $_extra_nupkgs; do - $_nuget push "$srcdir"/${i##*/} --source="$_packagesdir" + local filename=${i/::*} + local filename=${filename##*/} + $_nuget push "$srcdir"/$filename --source="$_packagesdir" done } @@ -235,6 +237,7 @@ _runtime() { -arch $_dotnet_target /consoleLoggerParameters:ShowTimestamp /p:NoPgoOptimize=true + /p:TargetRid=linux-musl-$_dotnet_target /p:EnableNgenOptimization=false /p:ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch=none /p:GitCommitHash=$(grep GitCommitHash "$builddir"/prereqs/git-info/runtime.props | sed -E 's|||g' | tr -d ' ') @@ -245,7 +248,7 @@ _runtime() { if [ "$_runtimever" != "${_runtimever##*-}" ]; then local args="$args /p:VersionSuffix=${_runtimever##*-}" fi - ROOTFS_DIR="$CBUILDROOT" ./build.sh $args + DotNetBuildFromSource=false ROOTFS_DIR="$CBUILDROOT" ./build.sh $args for i in artifacts/packages/*/*/*.nupkg; do $_nuget push $i --source="$_packagesdir" @@ -446,7 +449,11 @@ bootstrap() { # copies artifacts to artifacts dir for use by future dotnet builds for i in $_nupkgsArray; do install -Dm644 "$_packagesdir"/$i "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/ || true; done - for i in $_extra_nupkgs; do install -Dm644 "$srcdir"/${i##*/} "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/; done + for i in $_extra_nupkgs; do + local filename=${i/::*} + local filename=${filename##*/} + install -Dm644 "$srcdir"/$filename "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/ + done msg "Changing iltools version to $_iltoolsver" # source-build expects a certain version of ilasm, ildasm and testhost @@ -501,27 +508,27 @@ artifacts() { } sha512sums=" -f48d4168f526aade888bbd17f2da87f721dabc8ae004707ef9195b6359b79b871115a686678c87542ba74e1d86e5485df13d77ef4d3f4001c0804426aebaf92c dotnet-v8.0.100-preview.1.tar.xz -120048fce7c455cb2f98cbdda6b7f789f210d9e7e0b48304f8fdc8b4838c705c6af18b2b4c375b57aa48e0e5084e60ecefad0edc09c19aca166855b3dd3fb539 dotnet-sdk-8.0.100-preview.1.23115.2-linux-musl-x64.noextract -bf985c3b9c1f6f09f46f88527c54445c502e7c75dcbc004dccfb5339d0b5766290ff183abe3808919137ebc5a50c91cbd58a56ec31ad50a5e39a26671e990c61 dotnet-sdk-8.0.100-preview.1.23115.2-linux-musl-arm64.noextract -461094d1f53067c2b496ec25b1bf7686aee3a75f0de5a139bb29a3ac989cdb824367165c8385b78185414430f0579bbba8c94be6d511d793a16746dc018f232f dotnet-sdk-8.0.100-preview.1.23115.2-linux-musl-arm.noextract -727be7a0c753a72635d22044fef7fea4389294fce01a63638f7a6fdb1b18481737969b1ff2a666ac1b84c1d48434f3505b80ffdf8e56d4224c92c1db34f8a154 dotnet-sdk-8.0.100-preview.1.23115.2-r0-linux-musl-ppc64le.noextract -6f2ff2b7e7c1eaac7af2a80684c361357313ccbc2c2572ee0ee495b63507192ab27b0aab61de8557a7afd18d8073b44a823f4d6fbbdc75c3058eeb0517ad52e6 dotnet-sdk-8.0.100-preview.1.23115.2-r0-linux-musl-s390x.noextract +ea01bedda56bd7f2a3a856672ee75a444ad97988631d6dd9b52e513cb333248fff00cdd7f0da5635cf6c7012629bdb8cc44fc5b49a0e8bea4e1421cc1dec4244 dotnet-v8.0.100-preview.2.tar.xz +952cedb092edc02b8f3c211f0387c56acf4fdcadf607344cab529efd5e36a52e9017187e62baf2453544b7255cfedcdb7b0e68e1523d6bd74bf3a8f0ec8919c0 dotnet-sdk-8.0.100-preview.2.23157.25-linux-musl-x64.noextract +b04b6cf3280434775e268776899b3ee7fe1b94217edfdbc7e166f493f25f52d74be5a97ef07927d102731314004fe57d40d5efa8038bc78dbe0aac5d7f15756b dotnet-sdk-8.0.100-preview.2.23157.25-linux-musl-arm64.noextract +c338b11f74b8e00e25512bd675a2b2bf2ca7ac86b2b0bd02a184de3cec7bbb56f9066e54e8f9d9dc95bae2bd652e30b8465b26de08245b1d6fb4a9bd27d882e6 dotnet-sdk-8.0.100-preview.2.23157.25-linux-musl-arm.noextract +6d9825b2223a3cb5384601442f6768dfcfb9665f567f1b3f100597d3683aeaea8a173bf7429d57e57bc7bf9deb532f1c957cd9fd1348a8ff4ac6a428708e0bbf dotnet-sdk-8.0.100-preview.2.23157.25-r0-linux-musl-ppc64le.noextract +c39ec39631c56f49013104f3132b7c3a2fcc39f78a1767b694a63a17cc4aa68dc0c6039e737fd07b51ff877412210c1ba13e29eb5c3c106f09f2fc90f8fd4eeb dotnet-sdk-8.0.100-preview.2.23157.25-r0-linux-musl-s390x.noextract bb40f2fcd6f51e908e68fce740400345f2b3ee9c66c1cc69116b4188a19bb0f510e96c8ddcf99e03ee35d16f95ac0b918f940317cb7a5dd858682c4483d3c93b Private.SourceBuilt.Artifacts.0.1.0-8.0.100-5.centos.8-x64.noextract -f20d22a4d069c3647433def852dba50e803a494f4a9f455c24baff8e259896ec709ebcd2a80a1716a9b582ad0d36cd4be98ee4918b0349cca46cea0643a1a9d8 Private.SourceBuilt.Prebuilts.0.1.0-8.0.100-4.centos.8-x64.noextract +7f58addbea8477221543fb525801d2a0852f7ec3e5ce22b0bda9f7c77aaebc41fb81f345ac2a31b0677ba243c308c363a96ceca4c4a5daf6b7db384afe7118b2 Private.SourceBuilt.Prebuilts.0.1.0-8.0.100-11.centos.8-x64.noextract 5c1fd9e250e7f08d996b7b335134973624a8d1afc331f7fda3a81eee7d2170e39905be20b8786e99078892b21d1582092aeee45d49c5feae3b2bd5374c306fec microsoft.netcore.app.host.linux-musl-x64.7.0.2.nupkg c5bb986179b4789a24cc4552fa33bee2015acba1c9775ff8fe2295797dd7114f244df2c133e8cee8a3de392c5c47530ba9ef87939cc55660f8c937146b98e1fb microsoft.netcore.app.host.linux-musl-arm64.7.0.2.nupkg 2f35742d74255dd6e7a39e48f29e01cead2b410dabd9e4192d724186a8bd2e04f970b5015229045c732e6c7bcd89a8e9787d19fc50f09fcaab8cd94516f5a0ce microsoft.netcore.app.host.linux-musl-arm.7.0.2.nupkg -f3296b92c91ff76d3238af8414e5e1b4729f641b7c9d25539e5399a472c828b23851fb3241b7c3ba9fc691be0ac2dacd3f7efefc66207920574eda066d76cb9d Microsoft.NETCore.App.Host.linux-musl-ppc64le.7.0.2.nupkg -8e8dfc7184516f3e4ef4e43540fb403ec6066237e0596953cff5c49accaa811ad72f0286c52b2f03871adb9b24194cf4922bbcce05c2bb5caa8bcbd790013dde Microsoft.NETCore.App.Host.linux-musl-s390x.7.0.2.nupkg +da9139d1f7097ba6b97bdf58f7f2a36aa1c8903e19080455027182f7b36b032827dc9b7fdd61310ff8cb8b5f04b7214571a5fa50337dc4bfc1671c9d61310efd microsoft.netcore.app.host.linux-musl-ppc64le.7.0.3.nupkg +e2612038939dd74664742d648954d352011b449c3fa0038123e98bfaddd9b52864d296a1ea43fa63545022bc33ba94460bac474f22397936a7c548342b8f13d9 microsoft.netcore.app.host.linux-musl-s390x.7.0.3.nupkg 9c2f5410c2983ae1d073a5efb78afa56b212165a18252400a42696e10d8cb6016fde5941d1f453eb5332a77f5e209bcb5d40b8ee142609232be95b0cdca1e060 aspnetcore_use-linux-musl-crossgen-on-non-x64.patch ead38430e54530819ecdb7ab5b087707eee97c4e77b5011a42758352e8265417c65f07b4eec2488708d932de240877695b474e07b8984d34086ef539d5022830 build_set-local-repo.patch 9fe4494b291128469874147e5f28f8fbd023b014114f0aa151fa5cf57821318fa88b834a131eeb77478c8c87adca8c1c0ff3e8c59264c7394fd0621a520eb014 installer_runtimepacks.patch d1811c1364d9ce4d180d61adf8a9074cf71cf854776959a6db98740f17ed75beec8536602cfb335f534a703d3917e43c3cd91f0f6aed68b5d40c1c80396f5908 roslyn_allow-extra-params.patch ba9c66b5bb8b8d2de87922717b8a7a6f880eed2a38b5208a554ebd64841c6053658692463471a26442c85cb9adb94043a9d91190786d46c0f45ff4e7cc9c707e runtime_76500-properly-set-toolchain-for-alpine.patch 77fa6d9987a7c43725582c9c493e9d4d5965a611a1d795dad4e3d46cd730caced095f994d93f91a131df7fa4b6a7277bcd3d915bae2dcd869559f22076fbc575 runtime_79856-save-errno-when-using-posix-semaphores.patch -86e805b5d0d85294b3ac4866dee00b906a35d064e988e5b48591aeabf29e34ddd8fccb4770cf2bd66437ce4f704fdda43a7522baa9f23ad9353ce010f884d1c5 runtime_82173-add-cmake-check-for-ioclt-prototype.patch 18f2be488e4d6c667b90f6b6faed12a84f8c5748c6da91a291542e0a9e8b43effc3bba92a6b38da1b2a904466e3e9bd66b01ad0d3f521bd27a067eb362e2add6 runtime_82676-make-pal-console-c-use-int.patch +5452b7c5037210fd273476c58fb8bf30ec9f0e6824489808c6d2af82057c5401bbd244a5aa8aa20a0c6ae122dd55a76cda40ccfd7838530fd23b5ad7bbd5550f runtime_82678-add-stub-for-mini-is-gsharedvt-inst.patch 946f7ddc979bced4e2991f0fe768476b537c97d864362d105fcaec9e6f9f312a798e5e19312966f29fdd80593aa88870be5747b74172d9a70bb1b173c3c75a43 runtime_make-lld-use-depend-on-existing-on-target.patch d732df247c721c9f677baabdd7f36dbf4b564814ff64164361065bb1c196b767494a1d39f634eadf01a23032c7b3e64102614b7213065c81096bbf3f8022e6a0 runtime_mono-thread-coop-undefine-fortify-source.patch 1de4459522525e1d570e219c9ef067fbbf8745ad369602a006ea62cbafa0f64d2b01b63e00147cf8fed0ea9764373fb4c66aae2323b43a34447990a24f9f29c3 runtime_no-additional-runtime-id.patch diff --git a/user/dotnet8-stage0/runtime_82173-add-cmake-check-for-ioclt-prototype.patch b/user/dotnet8-stage0/runtime_82173-add-cmake-check-for-ioclt-prototype.patch deleted file mode 100644 index d429eeb..0000000 --- a/user/dotnet8-stage0/runtime_82173-add-cmake-check-for-ioclt-prototype.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 8d085a4867cb28a24a6f87379df7b4eac6f4712d Mon Sep 17 00:00:00 2001 -Patch-Source: https://github.com/dotnet/runtime/pull/82173 -From: Adeel <3840695+am11@users.noreply.github.com> -Date: Wed, 15 Feb 2023 17:53:20 +0200 -Subject: [PATCH 1/2] Add cmake check for ioclt prototype - ---- - src/native/libs/Common/pal_config.h.in | 1 + - src/native/libs/System.Native/pal_io.c | 4 ++++ - src/native/libs/configure.cmake | 7 +++++++ - 3 files changed, 12 insertions(+) - -diff --git a/src/runtime/src/native/libs/Common/pal_config.h.in b/src/runtime/src/native/libs/Common/pal_config.h.in -index 7b592d10326f6..a5ce0ce2a46d4 100644 ---- a/src/runtime/src/native/libs/Common/pal_config.h.in -+++ b/src/runtime/src/native/libs/Common/pal_config.h.in -@@ -43,6 +43,7 @@ - #cmakedefine01 PRIORITY_REQUIRES_INT_WHO - #cmakedefine01 KEVENT_REQUIRES_INT_PARAMS - #cmakedefine01 HAVE_IOCTL -+#cmakedefine01 HAVE_IOCTL_WITH_INT_REQUEST - #cmakedefine01 HAVE_TIOCGWINSZ - #cmakedefine01 HAVE_TIOCSWINSZ - #cmakedefine01 HAVE_SCHED_GETAFFINITY -diff --git a/src/runtime/src/native/libs/System.Native/pal_io.c b/src/runtime/src/native/libs/System.Native/pal_io.c -index 22fcf3a4f7691..b89bbbbeeaf4b 100644 ---- a/src/runtime/src/native/libs/System.Native/pal_io.c -+++ b/src/runtime/src/native/libs/System.Native/pal_io.c -@@ -1325,7 +1325,11 @@ int32_t SystemNative_CopyFile(intptr_t sourceFd, intptr_t destinationFd, int64_t - // Try copying data using a copy-on-write clone. This shares storage between the files. - if (sourceLength != 0) - { -+#if HAVE_IOCTL_WITH_INT_REQUEST - while ((ret = ioctl(outFd, (int)FICLONE, inFd)) < 0 && errno == EINTR); -+#elif -+ while ((ret = ioctl(outFd, FICLONE, inFd)) < 0 && errno == EINTR); -+#endif - copied = ret == 0; - } - #endif -diff --git a/src/runtime/src/native/libs/configure.cmake b/src/runtime/src/native/libs/configure.cmake -index 0b86bd6df64ed..cbaac692f2630 100644 ---- a/src/runtime/src/native/libs/configure.cmake -+++ b/src/runtime/src/native/libs/configure.cmake -@@ -790,6 +790,13 @@ check_prototype_definition( - ${STATFS_INCLUDES} - HAVE_NON_LEGACY_STATFS) - -+check_prototype_definition( -+ ioctl -+ "int ioctl(int fd, int request, ...)" -+ 0 -+ "sys/ioctl.h" -+ HAVE_IOCTL_WITH_INT_REQUEST) -+ - check_c_source_compiles( - " - #include - -From 349e0494a215a372538f6671d6f671c18f594f53 Mon Sep 17 00:00:00 2001 -From: Adeel Mujahid <3840695+am11@users.noreply.github.com> -Date: Wed, 15 Feb 2023 18:07:42 +0200 -Subject: [PATCH 2/2] . - ---- - src/native/libs/System.Native/pal_io.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/runtime/src/native/libs/System.Native/pal_io.c b/src/runtime/src/native/libs/System.Native/pal_io.c -index b89bbbbeeaf4b..7551b426d0b84 100644 ---- a/src/runtime/src/native/libs/System.Native/pal_io.c -+++ b/src/runtime/src/native/libs/System.Native/pal_io.c -@@ -1327,7 +1327,7 @@ int32_t SystemNative_CopyFile(intptr_t sourceFd, intptr_t destinationFd, int64_t - { - #if HAVE_IOCTL_WITH_INT_REQUEST - while ((ret = ioctl(outFd, (int)FICLONE, inFd)) < 0 && errno == EINTR); --#elif -+#else - while ((ret = ioctl(outFd, FICLONE, inFd)) < 0 && errno == EINTR); - #endif - copied = ret == 0; diff --git a/user/dotnet8-stage0/runtime_82678-add-stub-for-mini-is-gsharedvt-inst.patch b/user/dotnet8-stage0/runtime_82678-add-stub-for-mini-is-gsharedvt-inst.patch new file mode 100644 index 0000000..8161072 --- /dev/null +++ b/user/dotnet8-stage0/runtime_82678-add-stub-for-mini-is-gsharedvt-inst.patch @@ -0,0 +1,66 @@ +From 30a1cfa37f87fc1100022ca82b833f3f486e84bb Mon Sep 17 00:00:00 2001 +Patch-Source: https://github.com/dotnet/runtime/pull/82678 +From: Adeel Mujahid <3840695+am11@users.noreply.github.com> +Date: Sat, 25 Feb 2023 23:32:43 +0200 +Subject: [PATCH 1/2] Add guard around mini_is_gsharedvt_inst call + +--- + src/mono/mono/mini/aot-runtime.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/runtime/src/mono/mono/mini/aot-runtime.c b/src/runtime/src/mono/mono/mini/aot-runtime.c +index 683fee00852e7..edc401a5fada2 100644 +--- a/src/runtime/src/mono/mono/mini/aot-runtime.c ++++ b/src/runtime/src/mono/mono/mini/aot-runtime.c +@@ -4530,8 +4530,10 @@ mono_aot_can_dedup (MonoMethod *method) + !mini_is_gsharedvt_signature (mono_method_signature_internal (method)) && + !mini_is_gsharedvt_klass (method->klass)) { + MonoGenericContext *context = mono_method_get_context (method); ++#ifdef MONO_ARCH_GSHAREDVT_SUPPORTED + if (context->method_inst && mini_is_gsharedvt_inst (context->method_inst)) + return FALSE; ++#endif + /* No point in dedup-ing private instances */ + if ((context->class_inst && inst_is_private (context->class_inst)) || + (context->method_inst && inst_is_private (context->method_inst))) + +From f8f685624d361a76bb425f91c2ab2558dd67ace6 Mon Sep 17 00:00:00 2001 +From: Adeel Mujahid <3840695+am11@users.noreply.github.com> +Date: Sun, 26 Feb 2023 06:22:08 +0200 +Subject: [PATCH 2/2] Add stub for mini_is_gsharedvt_inst + +--- + src/mono/mono/mini/aot-runtime.c | 2 -- + src/mono/mono/mini/mini-generic-sharing.c | 6 ++++++ + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/runtime/src/mono/mono/mini/aot-runtime.c b/src/runtime/src/mono/mono/mini/aot-runtime.c +index edc401a5fada2..683fee00852e7 100644 +--- a/src/runtime/src/mono/mono/mini/aot-runtime.c ++++ b/src/runtime/src/mono/mono/mini/aot-runtime.c +@@ -4530,10 +4530,8 @@ mono_aot_can_dedup (MonoMethod *method) + !mini_is_gsharedvt_signature (mono_method_signature_internal (method)) && + !mini_is_gsharedvt_klass (method->klass)) { + MonoGenericContext *context = mono_method_get_context (method); +-#ifdef MONO_ARCH_GSHAREDVT_SUPPORTED + if (context->method_inst && mini_is_gsharedvt_inst (context->method_inst)) + return FALSE; +-#endif + /* No point in dedup-ing private instances */ + if ((context->class_inst && inst_is_private (context->class_inst)) || + (context->method_inst && inst_is_private (context->method_inst))) +diff --git a/src/runtime/src/mono/mono/mini/mini-generic-sharing.c b/src/runtime/src/mono/mono/mini/mini-generic-sharing.c +index 6b81872c4f307..3f4823477e115 100644 +--- a/src/runtime/src/mono/mono/mini/mini-generic-sharing.c ++++ b/src/runtime/src/mono/mono/mini/mini-generic-sharing.c +@@ -4859,4 +4859,10 @@ mini_method_to_shared (MonoMethod *method) + return NULL; + } + ++gboolean ++mini_is_gsharedvt_inst (MonoGenericInst *inst) ++{ ++ return FALSE; ++} ++ + #endif /* !MONO_ARCH_GSHAREDVT_SUPPORTED */