user/dotnet7-build: upgrade to 7.0.105
This commit is contained in:
parent
f8aa44801f
commit
1d3e1b74df
9 changed files with 428 additions and 72 deletions
|
@ -4,24 +4,28 @@
|
|||
# secfixes:
|
||||
# 7.0.103-r0:
|
||||
# - CVE-2023-21808
|
||||
# 7.0.105-r0:
|
||||
# - CVE-2023-28260
|
||||
|
||||
pkgname=dotnet7-build
|
||||
pkgver=7.0.104
|
||||
pkgver=7.0.105
|
||||
pkgrel=0
|
||||
_gittag=v$pkgver
|
||||
_giturl="https://github.com/dotnet/installer"
|
||||
_testtag=16c3c04f3ae6620a474fa0474e8b298190e506c1
|
||||
_testtag=e1cc0f181ffd4d755756d30d985513897d592ba4
|
||||
_bunnytag=v12
|
||||
_patches="
|
||||
build_disable-package-validation.patch
|
||||
build_disable-source-link.patch
|
||||
build_enable-timestamps.patch
|
||||
build_shutdown-build-servers-at-each-build-step.patch
|
||||
check_rid-alpine-generation.diff
|
||||
roslyn-analyzer_disable-apphost.patch
|
||||
runtime_76500-mono-musl-support.patch
|
||||
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
runtime_84413-support-adding-rids-with-dash-in-base-part.patch
|
||||
runtime_84444-suppress-clang-16-warnings.patch
|
||||
runtime_enable-runtime-marshalling.diff
|
||||
runtime_enable-system-libunwind.diff
|
||||
runtime_mono-thread-coop-undefine-fortify-source.patch
|
||||
runtime_remove-usage-of-off64-t.patch
|
||||
sdk_14239-add-zsh-compdef-completion-script.patch
|
||||
"
|
||||
|
||||
|
@ -57,8 +61,8 @@ makedepends="
|
|||
bash
|
||||
clang
|
||||
cmake
|
||||
dotnet$_pkgver_name-bootstrap
|
||||
dotnet$_pkgver_name-bootstrap-artifacts
|
||||
dotnet$_pkgver_name-stage0-bootstrap
|
||||
dotnet$_pkgver_name-stage0-artifacts
|
||||
dotnet$_pkgver_name-stage0
|
||||
findutils
|
||||
git
|
||||
|
@ -192,10 +196,6 @@ snapshot() {
|
|||
prepare() {
|
||||
default_prepare
|
||||
|
||||
# check patches
|
||||
msg "check_rid-alpine-generation.diff"
|
||||
patch -p1 -d "$_testdir" -i "$srcdir"/check_rid-alpine-generation.diff
|
||||
|
||||
# Parallel restore is broken on mono-based builds since dotnet7
|
||||
# see https://github.com/dotnet/runtime/issues/77364
|
||||
# A workaround via runtime_enable-runtime-marshalling.diff
|
||||
|
@ -312,11 +312,13 @@ check() {
|
|||
*) local _disabled_tests="$_disabled_tests bundled-libunwind";;
|
||||
esac
|
||||
# test unit broken currently
|
||||
_disabled_tests="$_disabled_tests system-libunwind"
|
||||
local _disabled_tests="$_disabled_tests system-libunwind"
|
||||
# nativeaot is not supported on armv7
|
||||
case $CARCH in
|
||||
armv7) local _disabled_tests="$_disabled_tests nativeaot"
|
||||
esac
|
||||
# test unit hangs
|
||||
local _disabled_tests="$_disabled_tests debugging-via-dotnet-dump"
|
||||
|
||||
msg "Unpacking produced dotnet"
|
||||
export DOTNET_ROOT="$_checkdir/release"
|
||||
|
@ -513,17 +515,19 @@ doc() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
3adb3cfe451e04c56265306869c3023c281322510d6e0eb182f233e549bdd4b9c738f41bb60470fce09cc386be4d1ea47d78846842f35e4bd9047b04bef16286 dotnet-v7.0.104.tar.xz
|
||||
81428356e4b9691c54cacd242368a42d3939732918a608c2a5ae3f23fff45af2d9e981ead70a977f34f4e498c422f708e523bfbbf590cfdafb5c16ef1f0fed8a dotnet-testsuite-16c3c04f3ae6620a474fa0474e8b298190e506c1.tar.gz
|
||||
bfc122f316673fe4014e891eb101ecf40efc2ed4ecaff0cbd4bb5c17f547ccaa867ae8af22f41813565630cdb68e2972633703a88478fadde39584f91588589d dotnet-v7.0.105.tar.xz
|
||||
e9f3df13d093fac214778c1137857e065f58d4e0d2a48d540d8ed7bb41e2fd73b2b3f62a0aa5b0e80fa80a5b58ba77ff19b9d10a492802f8539e3a6ed79d299d dotnet-testsuite-e1cc0f181ffd4d755756d30d985513897d592ba4.tar.gz
|
||||
0028d5d97b814b122d73137b4e0d64ca5d788aa0ae5fde500de722e23522827f2538f06e75acb17cc39b8917961ee78d1f0bbc84b2b624ae0e9bf88adca2ba6f dotnet-bunny-v12.tar.gz
|
||||
429033f5f6a8e33eb849c29c1d6628faca13751e1b1e536179b491041034dcdee107cbff12f7e9f1ef68a178a0818c534113f63bc8bbc37de67ec900c23cacf4 build_disable-package-validation.patch
|
||||
ebab0364deab5d99131e2724b7fbac668bc27ddf74958623af1913e49850df98b2d077d27324b2bbabbbcdf77ea48bf7a7ca83d0ced6f48bdb66cc1e8bbce4a4 build_disable-source-link.patch
|
||||
86fbaa058f78bba100f534f4c4bd6d7254181909f70d264c0390d3dd89c878a14ba9b5d2de05271b2c07b73ead70e029488c926221f676d59e27e387e3e579e9 build_enable-timestamps.patch
|
||||
0049b27fad32f35ee99ef620aeee518600c24bde28c7a146261c7ae4313d747f3bdbe3e8b74a3154e025a80d5c62d545aa226c20c9376599e11091a31390abe6 build_shutdown-build-servers-at-each-build-step.patch
|
||||
941b430b55e323f723bbc5160447f060f40d18ce32e5803ab7dda16bfc60a0f5ec1dccd246e68475d7115ee265a9433824d8a5d997c302531311194a90deeca9 check_rid-alpine-generation.diff
|
||||
4ac92d2d9190a55ee20d3e145a28a6953c98d3eb838c8acfb808b8839316443cb64da4a2c5787df0171fce7ef96ff6381043085ed90c23ec09ce9ac81571e675 roslyn-analyzer_disable-apphost.patch
|
||||
7a3291a05c94986d631a37870f573aca8603e9464cb632b3e5b93eca8a358fc7dcc98a8a8017f566885ceafe462bec734b7d31c7a974270e83c6d2ae54f51902 runtime_76500-mono-musl-support.patch
|
||||
d732df247c721c9f677baabdd7f36dbf4b564814ff64164361065bb1c196b767494a1d39f634eadf01a23032c7b3e64102614b7213065c81096bbf3f8022e6a0 runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
2ed962096eb9d8ae61831d224ceb05b8f77f5692f38a3457048d1b4abef705e8e4f676b81bb1a833e338e75ac8dc80b0631b1a45ad9a15c5597740b7320bfbb5 runtime_84413-support-adding-rids-with-dash-in-base-part.patch
|
||||
929d5be2e4a213ad726652c24478e45abe1bf1d444c01a8975da007f246cb056916ad4681e541436faa89447e35c5e0a6101ae4ecaecc8083155b04e7138beb8 runtime_84444-suppress-clang-16-warnings.patch
|
||||
1f7be536c4826638853f110ee88bbd554be015cc88c6491c1066830789be18ad324f8ed2b1b75ed7aad74457dcafc812730059cb25d36d6344bfae8a517c00c4 runtime_enable-runtime-marshalling.diff
|
||||
293742ab307bef459a21deadcc4ad7c7996cc4b490910a36c2763b8ad25cc8a91c4e03b6290567cd1030f69638d0156c5b6970887858fb091f8482b67356065d runtime_enable-system-libunwind.diff
|
||||
d732df247c721c9f677baabdd7f36dbf4b564814ff64164361065bb1c196b767494a1d39f634eadf01a23032c7b3e64102614b7213065c81096bbf3f8022e6a0 runtime_mono-thread-coop-undefine-fortify-source.patch
|
||||
d972e77df27748a80c9b23eca12f9fbd78be97f9034b79cc5703ba58eb6750171d9a115314300f883620ccbca89c65a99ca7a45d54a421b028b590190b4bed80 runtime_remove-usage-of-off64-t.patch
|
||||
d1b4ebcbb1a6815fc0ce4c471485c232618e60968a879309fb8336821a9351d2e0028d9f7726c0c041c750b497a0baa47400c78c9ceff550b91b4a6c2816fc41 sdk_14239-add-zsh-compdef-completion-script.patch
|
||||
"
|
||||
|
|
12
user/dotnet7-build/build_disable-package-validation.patch
Normal file
12
user/dotnet7-build/build_disable-package-validation.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/repos/aspnetcore.proj.orig b/repos/aspnetcore.proj
|
||||
index cea712c1bfa..cf5099da788 100644
|
||||
--- a/repos/aspnetcore.proj.orig
|
||||
+++ b/repos/aspnetcore.proj
|
||||
@@ -10,6 +10,7 @@
|
||||
<BuildCommandArgs>$(BuildCommandArgs) --no-build-nodejs</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:PublishCompressedFilesPathPrefix=$(SourceBuiltAspNetCoreRuntime)</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:PortableBuild=false /p:TargetRuntimeIdentifier=$(TargetRid)</BuildCommandArgs>
|
||||
+ <BuildCommandArgs>$(BuildCommandArgs) /p:EnablePackageValidation=false </BuildCommandArgs>
|
||||
<!-- Update to 1.0.0 version of reference assemblies which are built in SBRP instead of the preview.2 version
|
||||
included by Arcade -->
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:MicrosoftNetFrameworkReferenceAssembliesVersion=1.0.0</BuildCommandArgs>
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/repos/Directory.Build.targets.orig b/repos/Directory.Build.targets
|
||||
index 9a61647b4d5..115cd213641 100644
|
||||
--- a/repos/Directory.Build.targets.orig
|
||||
+++ b/repos/Directory.Build.targets
|
||||
@@ -376,6 +376,7 @@
|
||||
DependsOnTargets="BuildRepoReferences"
|
||||
Inputs="$(MSBuildProjectFullPath)"
|
||||
Outputs="$(RepoCompletedSemaphorePath)Build.complete">
|
||||
+ <Exec Command="$(DotnetToolCommand) build-server shutdown" />
|
||||
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Building $(ProjectBuildReason)" />
|
||||
<Message Importance="High" Text="Running command:" />
|
||||
<Message Importance="High" Text=" $(BuildCommand) $(RepoApiArgs)" Condition="'$(BuildCommand)' != ''" />
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
From 5bbd0366f3caa6281fbafb49882a226453371b6a Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
Date: Wed, 10 Aug 2022 00:57:30 +0000
|
||||
Subject: [PATCH 1/1] fix-runtme-id
|
||||
|
||||
General fix for RID normalisation in testing suite
|
||||
|
||||
---
|
||||
runtime-id | 19 +++++++++++--------
|
||||
1 file changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/runtime-id b/runtime-id
|
||||
index 5673bba..7369776 100755
|
||||
--- a/runtime-id
|
||||
+++ b/runtime-id
|
||||
@@ -44,12 +44,15 @@ if [[ ${portable_rid} == 1 ]]; then
|
||||
echo "linux-${arch}"
|
||||
fi
|
||||
else
|
||||
- case "${ID}" in
|
||||
- # Remove the minor version
|
||||
- alpine|ol|rhel|rocky) rid_version=${VERSION_ID%.*} ;;
|
||||
-
|
||||
- *) rid_version=${VERSION_ID} ;;
|
||||
- esac
|
||||
-
|
||||
- echo "${ID}.${rid_version}-${arch}"
|
||||
+ VERSION_ID_DOT="${VERSION_ID//[^.]}"
|
||||
+ while [[ ${#VERSION_ID_DOT} -gt 1 ]]; do
|
||||
+ VERSION_ID="${VERSION_ID%.*}"
|
||||
+ VERSION_ID_DOT="${VERSION_ID//[^.]}"
|
||||
+ done
|
||||
+ VERSION_ID_DASH="${VERSION_ID//[^_]}"
|
||||
+ while [[ ${#VERSION_ID_DASH} -ge 1 ]]; do
|
||||
+ VERSION_ID="${VERSION_ID%_*}"
|
||||
+ VERSION_ID_DASH="${VERSION_ID//[^_]}"
|
||||
+ done
|
||||
+ echo "${ID}.${VERSION_ID}-${arch}"
|
||||
fi
|
||||
--
|
||||
2.37.1
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
From 65877a9c1260c1c37d1c3355703b1951b6754cdf Mon Sep 17 00:00:00 2001
|
||||
From: Adeel <3840695+am11@users.noreply.github.com>
|
||||
Date: Mon, 20 Mar 2023 19:36:14 +0200
|
||||
Subject: [PATCH] Specify -z notext on linux-musl-x86
|
||||
|
||||
---
|
||||
src/coreclr/CMakeLists.txt | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/CMakeLists.txt.orig b/src/runtime/src/coreclr/CMakeLists.txt
|
||||
index 7d1ce8d..5cacc78 100644
|
||||
--- a/src/runtime/src/coreclr/CMakeLists.txt.orig
|
||||
+++ b/src/runtime/src/coreclr/CMakeLists.txt
|
||||
@@ -105,6 +105,10 @@ if(CLR_CMAKE_HOST_UNIX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+ if(CLR_CMAKE_TARGET_ALPINE_LINUX AND CLR_CMAKE_TARGET_ARCH_I386)
|
||||
+ add_linker_flag(-Wl,-z,notext)
|
||||
+ endif()
|
||||
+
|
||||
add_subdirectory(pal)
|
||||
add_subdirectory(hosts)
|
||||
else()
|
|
@ -0,0 +1,164 @@
|
|||
From abc761c2c5694e4029fea1a60dc1934951c66e26 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/runtime/pull/84413
|
||||
From: Tom Deseyn <tom.deseyn@gmail.com>
|
||||
Date: Thu, 6 Apr 2023 13:18:11 +0200
|
||||
Subject: [PATCH 1/2] Microsoft.NETCore.Platforms: support adding rids with '-'
|
||||
in the base part.
|
||||
|
||||
Currently when trying to add a rid like 'linux-musl-x64'
|
||||
the rid is not understood to be base = 'linux-musl', arch = 'x64'.
|
||||
|
||||
Instead the parser considers a potential optional qualifier.
|
||||
This causes the rid to be parsed as base = 'linux', arch = 'musl',
|
||||
and qualifier = 'x64'.
|
||||
|
||||
We know the rids being added won't have a qualifier. If we take
|
||||
this into account while parsing, we can parse the rid correctly.
|
||||
---
|
||||
.../Microsoft.NETCore.Platforms/src/RID.cs | 11 +++-
|
||||
.../src/RuntimeGroupCollection.cs | 2 +-
|
||||
.../tests/RidTests.cs | 50 +++++++++++++------
|
||||
3 files changed, 47 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
||||
index 6457fd29cadf0..b464d5f0f54e3 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
||||
@@ -56,7 +56,7 @@ private enum RIDPart : int
|
||||
Max = Qualifier
|
||||
}
|
||||
|
||||
- public static RID Parse(string runtimeIdentifier)
|
||||
+ public static RID Parse(string runtimeIdentifier, bool noQualifier)
|
||||
{
|
||||
string[] parts = new string[(int)RIDPart.Max + 1];
|
||||
bool omitVersionDelimiter = true;
|
||||
@@ -90,6 +90,15 @@ public static RID Parse(string runtimeIdentifier)
|
||||
// version might be omitted
|
||||
else if (current == ArchitectureDelimiter)
|
||||
{
|
||||
+ // The qualifier delimiter and architecture delimiter are the same.
|
||||
+ // When there is no qualifier, there will be one delimiter past the base part
|
||||
+ // for the architecture.
|
||||
+ // So if we see another delimiter later in the string (for the architecture),
|
||||
+ // extend the base part instead of starting the architecture part.
|
||||
+ if (noQualifier && runtimeIdentifier.IndexOf(ArchitectureDelimiter, i + 1) != -1)
|
||||
+ {
|
||||
+ break;
|
||||
+ }
|
||||
// ensure there's no version later in the string
|
||||
if (runtimeIdentifier.IndexOf(VersionDelimiter, i) != -1)
|
||||
{
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
index e069508053105..31009a8d28e5e 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
@@ -34,7 +34,7 @@ public RuntimeGroupCollection(ICollection<RuntimeGroup> runtimeGroups)
|
||||
/// <param name="parent"></param>
|
||||
public void AddRuntimeIdentifier(string runtimeIdentifier, string parent)
|
||||
{
|
||||
- RID rid = RID.Parse(runtimeIdentifier);
|
||||
+ RID rid = RID.Parse(runtimeIdentifier, noQualifier: true);
|
||||
|
||||
AddRuntimeIdentifier(rid, parent);
|
||||
}
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
||||
index 227bcbdd10d4d..8dee0ebeda17a 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
||||
@@ -10,35 +10,57 @@ public class RidTests
|
||||
{
|
||||
public static IEnumerable<object[]> ValidRIDData()
|
||||
{
|
||||
- yield return new object[] { "win10-x64", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10"), Architecture = "x64" } };
|
||||
- yield return new object[] { "win10", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10")} };
|
||||
- yield return new object[] { "linux", new RID() { BaseRID = "linux" } };
|
||||
- yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" } };
|
||||
- yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" } };
|
||||
- yield return new object[] { "debian.10-x64", new RID() { BaseRID = "debian", Version = new RuntimeVersion("10"), Architecture = "x64" } };
|
||||
- yield return new object[] { "linuxmint.19.2-x64", new RID() { BaseRID = "linuxmint", Version = new RuntimeVersion("19.2"), Architecture = "x64" } };
|
||||
- yield return new object[] { "ubuntu.14.04-x64", new RID() { BaseRID = "ubuntu", Version = new RuntimeVersion("14.04"), Architecture = "x64" } };
|
||||
- yield return new object[] { "foo-bar.42-arm", new RID() { BaseRID = "foo-bar", Version = new RuntimeVersion("42"), Architecture = "arm" } };
|
||||
- yield return new object[] { "foo-bar-arm", new RID() { BaseRID = "foo", Architecture = "bar", Qualifier = "arm" } }; // demonstrates ambiguity, avoid using `-` in base
|
||||
- yield return new object[] { "linux-musl-x64", new RID() { BaseRID = "linux", Architecture = "musl", Qualifier = "x64" } }; // yes, we already have ambiguous RIDs
|
||||
+ yield return new object[] { "win10-x64", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "win10", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10")}, null };
|
||||
+ yield return new object[] { "linux", new RID() { BaseRID = "linux" }, null };
|
||||
+ yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "debian.10-x64", new RID() { BaseRID = "debian", Version = new RuntimeVersion("10"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "linuxmint.19.2-x64", new RID() { BaseRID = "linuxmint", Version = new RuntimeVersion("19.2"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "ubuntu.14.04-x64", new RID() { BaseRID = "ubuntu", Version = new RuntimeVersion("14.04"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "foo-bar.42-arm", new RID() { BaseRID = "foo-bar", Version = new RuntimeVersion("42"), Architecture = "arm" }, null };
|
||||
+ yield return new object[] { "foo-bar-arm", new RID() { BaseRID = "foo", Architecture = "bar", Qualifier = "arm" }, // demonstrates ambiguity, avoid using `-` in base
|
||||
+ new RID() { BaseRID = "foo-bar", Architecture = "arm" } };
|
||||
+ yield return new object[] { "linux-musl-x64", new RID() { BaseRID = "linux", Architecture = "musl", Qualifier = "x64" }, // yes, we already have ambiguous RIDs
|
||||
+ new RID() { BaseRID = "linux-musl", Architecture = "x64" } };
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(ValidRIDData))]
|
||||
- internal void ParseCorrectly(string input, RID expected)
|
||||
+ internal void ParseCorrectly(string input, RID expected, RID? expectedNoQualifier)
|
||||
{
|
||||
- RID actual = RID.Parse(input);
|
||||
+ _ = expectedNoQualifier; // unused
|
||||
+
|
||||
+ RID actual = RID.Parse(input, noQualifier: false);
|
||||
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(ValidRIDData))]
|
||||
- internal void ToStringAsExpected(string expected, RID rid)
|
||||
+ internal void ParseCorrectlyNoQualifier(string input, RID expected, RID? expectedNoQualifier)
|
||||
+ {
|
||||
+ expectedNoQualifier ??= expected;
|
||||
+
|
||||
+ RID actual = RID.Parse(input, noQualifier: true);
|
||||
+
|
||||
+ Assert.Equal(expectedNoQualifier, actual);
|
||||
+ }
|
||||
+
|
||||
+ [Theory]
|
||||
+ [MemberData(nameof(ValidRIDData))]
|
||||
+ internal void ToStringAsExpected(string expected, RID rid, RID? expectedNoQualifierRid)
|
||||
{
|
||||
string actual = rid.ToString();
|
||||
|
||||
Assert.Equal(expected, actual);
|
||||
+
|
||||
+ if (expectedNoQualifierRid is not null)
|
||||
+ {
|
||||
+ actual = expectedNoQualifierRid.ToString();
|
||||
+
|
||||
+ Assert.Equal(expected, actual);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
From f70da467ca94291039e0ea5b0723cb9db5e090e7 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Deseyn <tom.deseyn@gmail.com>
|
||||
Date: Thu, 6 Apr 2023 18:14:31 +0200
|
||||
Subject: [PATCH 2/2] Update
|
||||
src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
|
||||
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
|
||||
---
|
||||
.../Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
index 31009a8d28e5e..ec4762d71424c 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
@@ -34,6 +34,7 @@ public RuntimeGroupCollection(ICollection<RuntimeGroup> runtimeGroups)
|
||||
/// <param name="parent"></param>
|
||||
public void AddRuntimeIdentifier(string runtimeIdentifier, string parent)
|
||||
{
|
||||
+ // don't parse qualifier since we don't use them and they are ambiguous with `-` in base RID
|
||||
RID rid = RID.Parse(runtimeIdentifier, noQualifier: true);
|
||||
|
||||
AddRuntimeIdentifier(rid, parent);
|
|
@ -0,0 +1,192 @@
|
|||
From 4b82b0b1173981ea5f2c7baf003a66fad31208c9 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/runtime/pull/84443
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Thu, 6 Apr 2023 16:01:47 -0400
|
||||
Subject: [PATCH 1/2] Suppress clang-16 warnings (#81573)
|
||||
|
||||
---
|
||||
eng/common/native/init-compiler.sh | 2 +-
|
||||
eng/native/configurecompiler.cmake | 9 +++++++++
|
||||
src/coreclr/dlls/mscordbi/CMakeLists.txt | 5 +----
|
||||
src/coreclr/dlls/mscordbi/mscordbi.cpp | 15 +++++++++++++++
|
||||
src/native/corehost/apphost/static/CMakeLists.txt | 4 ++--
|
||||
...orts.src => singlefilehost_freebsdexports.src} | 4 ++++
|
||||
.../apphost/static/singlefilehost_unixexports.src | 4 ----
|
||||
7 files changed, 32 insertions(+), 11 deletions(-)
|
||||
rename src/native/corehost/apphost/static/{singlefilehost_OSXexports.src => singlefilehost_freebsdexports.src} (81%)
|
||||
|
||||
diff --git a/src/runtime/eng/common/native/init-compiler.sh b/src/runtime/eng/common/native/init-compiler.sh
|
||||
index 41a26d802a93f..f13b74080edf9 100644
|
||||
--- a/src/runtime/eng/common/native/init-compiler.sh
|
||||
+++ b/src/runtime/eng/common/native/init-compiler.sh
|
||||
@@ -71,7 +71,7 @@ if [[ -z "$CLR_CC" ]]; then
|
||||
# Set default versions
|
||||
if [[ -z "$majorVersion" ]]; then
|
||||
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
|
||||
- if [[ "$compiler" == "clang" ]]; then versions=( 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
|
||||
+ if [[ "$compiler" == "clang" ]]; then versions=( 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
|
||||
elif [[ "$compiler" == "gcc" ]]; then versions=( 12 11 10 9 8 7 6 5 4.9 ); fi
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
diff --git a/src/runtime/eng/native/configurecompiler.cmake b/src/runtime/eng/native/configurecompiler.cmake
|
||||
index 9090289f50e34..eaf5a867c5f6d 100644
|
||||
--- a/src/runtime/eng/native/configurecompiler.cmake
|
||||
+++ b/src/runtime/eng/native/configurecompiler.cmake
|
||||
@@ -447,6 +447,15 @@ if (CLR_CMAKE_HOST_UNIX)
|
||||
add_compile_options(-Wno-incompatible-ms-struct)
|
||||
|
||||
add_compile_options(-Wno-reserved-identifier)
|
||||
+
|
||||
+ # clang 16.0 introduced buffer hardening https://discourse.llvm.org/t/rfc-c-buffer-hardening/65734
|
||||
+ # which we are not conforming to yet.
|
||||
+ add_compile_options(-Wno-unsafe-buffer-usage)
|
||||
+
|
||||
+ # other clang 16.0 suppressions
|
||||
+ add_compile_options(-Wno-single-bit-bitfield-constant-conversion)
|
||||
+ add_compile_options(-Wno-cast-function-type-strict)
|
||||
+ add_compile_options(-Wno-incompatible-function-pointer-types-strict)
|
||||
else()
|
||||
add_compile_options(-Wno-uninitialized)
|
||||
add_compile_options(-Wno-strict-aliasing)
|
||||
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
index c24a90cf70409..95e92034e238f 100644
|
||||
--- a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
+++ b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
@@ -100,10 +100,7 @@ elseif(CLR_CMAKE_HOST_UNIX)
|
||||
mscordaccore
|
||||
)
|
||||
|
||||
- # COREDBI_LIBRARIES is mentioned twice because ld is one pass linker and will not find symbols
|
||||
- # if they are defined after they are used. Having all libs twice makes sure that ld will actually
|
||||
- # find all symbols.
|
||||
- target_link_libraries(mscordbi ${COREDBI_LIBRARIES} ${COREDBI_LIBRARIES})
|
||||
+ target_link_libraries(mscordbi ${COREDBI_LIBRARIES})
|
||||
|
||||
add_dependencies(mscordbi mscordaccore)
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
index 891c01e144f5c..109fe6a5b5417 100644
|
||||
--- a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
+++ b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
@@ -32,3 +32,18 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
|
||||
// Defer to the main debugging code.
|
||||
return DbgDllMain(hInstance, dwReason, lpReserved);
|
||||
}
|
||||
+
|
||||
+#if defined(HOST_LINUX) && defined(TARGET_LINUX)
|
||||
+PALIMPORT HINSTANCE PALAPI DAC_PAL_RegisterModule(IN LPCSTR lpLibFileName);
|
||||
+PALIMPORT VOID PALAPI DAC_PAL_UnregisterModule(IN HINSTANCE hInstance);
|
||||
+
|
||||
+HINSTANCE PALAPI PAL_RegisterModule(IN LPCSTR lpLibFileName)
|
||||
+{
|
||||
+ return DAC_PAL_RegisterModule(lpLibFileName);
|
||||
+}
|
||||
+
|
||||
+VOID PALAPI PAL_UnregisterModule(IN HINSTANCE hInstance)
|
||||
+{
|
||||
+ DAC_PAL_UnregisterModule(hInstance);
|
||||
+}
|
||||
+#endif
|
||||
diff --git a/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt b/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
|
||||
index c37885bf5691c..a632d993c0f2a 100644
|
||||
--- a/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
|
||||
+++ b/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
|
||||
@@ -65,8 +65,8 @@ if(CLR_CMAKE_TARGET_WIN32)
|
||||
add_linker_flag("/DEF:${CMAKE_CURRENT_SOURCE_DIR}/singlefilehost.def")
|
||||
|
||||
else()
|
||||
- if(CLR_CMAKE_TARGET_OSX)
|
||||
- set(DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/singlefilehost_OSXexports.src)
|
||||
+ if(CLR_CMAKE_TARGET_FREEBSD)
|
||||
+ set(DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/singlefilehost_freebsdexports.src)
|
||||
else()
|
||||
set(DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/singlefilehost_unixexports.src)
|
||||
endif()
|
||||
diff --git a/src/runtime/src/native/corehost/apphost/static/singlefilehost_OSXexports.src b/src/runtime/src/native/corehost/apphost/static/singlefilehost_freebsdexports.src
|
||||
similarity index 81%
|
||||
rename from src/native/corehost/apphost/static/singlefilehost_OSXexports.src
|
||||
rename to src/native/corehost/apphost/static/singlefilehost_freebsdexports.src
|
||||
index 18d5697e84580..1f9c517821855 100644
|
||||
--- a/src/runtime/src/native/corehost/apphost/static/singlefilehost_OSXexports.src
|
||||
+++ b/src/runtime/src/native/corehost/apphost/static/singlefilehost_freebsdexports.src
|
||||
@@ -9,3 +9,7 @@ g_dacTable
|
||||
|
||||
; Used by profilers
|
||||
MetaDataGetDispenser
|
||||
+
|
||||
+; FreeBSD needs to reexport these
|
||||
+__progname
|
||||
+environ
|
||||
diff --git a/src/runtime/src/native/corehost/apphost/static/singlefilehost_unixexports.src b/src/runtime/src/native/corehost/apphost/static/singlefilehost_unixexports.src
|
||||
index 1f9c517821855..18d5697e84580 100644
|
||||
--- a/src/runtime/src/native/corehost/apphost/static/singlefilehost_unixexports.src
|
||||
+++ b/src/runtime/src/native/corehost/apphost/static/singlefilehost_unixexports.src
|
||||
@@ -9,7 +9,3 @@ g_dacTable
|
||||
|
||||
; Used by profilers
|
||||
MetaDataGetDispenser
|
||||
-
|
||||
-; FreeBSD needs to reexport these
|
||||
-__progname
|
||||
-environ
|
||||
|
||||
From b5b3114e6866ac0058b5e18da52f92a1738a915b Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Thu, 6 Apr 2023 16:35:18 -0400
|
||||
Subject: [PATCH 2/2] Fix DBI loading problem on Linux (#82461)
|
||||
|
||||
---
|
||||
src/coreclr/dlls/mscordbi/CMakeLists.txt | 16 +++++++++++++++-
|
||||
src/coreclr/dlls/mscordbi/mscordbi.cpp | 15 ---------------
|
||||
2 files changed, 15 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
index 95e92034e238f..c577651141e5c 100644
|
||||
--- a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
+++ b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
@@ -100,7 +100,21 @@ elseif(CLR_CMAKE_HOST_UNIX)
|
||||
mscordaccore
|
||||
)
|
||||
|
||||
- target_link_libraries(mscordbi ${COREDBI_LIBRARIES})
|
||||
+ # Before llvm 16, lld was setting `--undefined-version` by default. The default was
|
||||
+ # flipped to `--no-undefined-version` in lld 16, so we will explicitly set it to
|
||||
+ # `--undefined-version` for our use-case.
|
||||
+ include(CheckLinkerFlag OPTIONAL)
|
||||
+ if(COMMAND check_linker_flag)
|
||||
+ check_linker_flag(CXX -Wl,--undefined-version LINKER_SUPPORTS_UNDEFINED_VERSION)
|
||||
+ if (LINKER_SUPPORTS_UNDEFINED_VERSION)
|
||||
+ add_linker_flag(-Wl,--undefined-version)
|
||||
+ endif(LINKER_SUPPORTS_UNDEFINED_VERSION)
|
||||
+ endif(COMMAND check_linker_flag)
|
||||
+
|
||||
+ # COREDBI_LIBRARIES is mentioned twice because ld is one pass linker and will not find symbols
|
||||
+ # if they are defined after they are used. Having all libs twice makes sure that ld will actually
|
||||
+ # find all symbols.
|
||||
+ target_link_libraries(mscordbi ${COREDBI_LIBRARIES} ${COREDBI_LIBRARIES})
|
||||
|
||||
add_dependencies(mscordbi mscordaccore)
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
index 109fe6a5b5417..891c01e144f5c 100644
|
||||
--- a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
+++ b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
@@ -32,18 +32,3 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
|
||||
// Defer to the main debugging code.
|
||||
return DbgDllMain(hInstance, dwReason, lpReserved);
|
||||
}
|
||||
-
|
||||
-#if defined(HOST_LINUX) && defined(TARGET_LINUX)
|
||||
-PALIMPORT HINSTANCE PALAPI DAC_PAL_RegisterModule(IN LPCSTR lpLibFileName);
|
||||
-PALIMPORT VOID PALAPI DAC_PAL_UnregisterModule(IN HINSTANCE hInstance);
|
||||
-
|
||||
-HINSTANCE PALAPI PAL_RegisterModule(IN LPCSTR lpLibFileName)
|
||||
-{
|
||||
- return DAC_PAL_RegisterModule(lpLibFileName);
|
||||
-}
|
||||
-
|
||||
-VOID PALAPI PAL_UnregisterModule(IN HINSTANCE hInstance)
|
||||
-{
|
||||
- DAC_PAL_UnregisterModule(hInstance);
|
||||
-}
|
||||
-#endif
|
15
user/dotnet7-build/runtime_remove-usage-of-off64-t.patch
Normal file
15
user/dotnet7-build/runtime_remove-usage-of-off64-t.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
index 03712c3b684..99d8a457957 100644
|
||||
--- a/src/runtimr/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
+++ b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
@@ -395,7 +395,7 @@ CrashInfo::ReadProcessMemory(void* address, void* buffer, size_t size, size_t* r
|
||||
// performance optimization.
|
||||
m_canUseProcVmReadSyscall = false;
|
||||
assert(m_fd != -1);
|
||||
- *read = pread64(m_fd, buffer, size, (off64_t)address);
|
||||
+ *read = pread(m_fd, buffer, size, (off_t)address);
|
||||
}
|
||||
|
||||
if (*read == (size_t)-1)
|
||||
|
||||
|
Loading…
Reference in a new issue