user/dotnet6-stage0: upgrade to 6.0.116

This commit is contained in:
Antoine Martin 2023-04-11 20:26:54 -04:00 committed by Antoine Martin
parent 85a13f2bec
commit e945a45a24
13 changed files with 372 additions and 341 deletions

View file

@ -2,7 +2,7 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=dotnet6-stage0
pkgver=6.0.115
pkgver=6.0.116
pkgrel=0
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
@ -12,9 +12,9 @@ _gittag=v$pkgver
# Versions of prebuilt artifacts and bootstrap tar
_artifactsver=6.0.112
_bootstrapver="6.0.115"
_bootstrapver="6.0.116"
_bootstraprel=0
_installerver=$_bootstrapver
_installerver=${_gittag/v}
# Version of packages that aren't defined in git-info
_iltoolsver=6.0.12-servicing.22579.1
@ -23,19 +23,14 @@ _iltoolsver=6.0.12-servicing.22579.1
# Look for patch notes within each patch for what they fix / where they come from
# build_* patches applies directly to $builddir
_patches="
aspnetcore_use-linux-musl-crossgen-on-non-x64.patch
installer_runtimepacks.patch
roslyn_57003-mono-namedmutex.patch
roslyn_allow-extra-params.patch
roslyn_revert-lift-version-codeanalysis.patch
runtime_76500-mono-musl-support.patch
runtime_81573-suppress-clang-16-warnings.patch
runtime_76500-properly-set-toolchain-for-crossbuilding-on-alpine.patch
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
runtime_build-with-no-strict-prototypes.patch
runtime_lld-fix.patch
runtime_no-additional-runtime-id.patch
runtime_s390x-build.patch
sdk_dummyshim-fix.patch
runtime_84442-support-adding-rids-with-dash-in-base-part.patch
runtime_84443-suppress-clang-16-warnings.patch
runtime_remove-usage-of-off64-t.patch
"
_extra_nupkgs="
https://globalcdn.nuget.org/packages/system.reactive.core.4.1.1.nupkg
@ -179,7 +174,6 @@ snapshot() {
abuild checksum
}
prepare() {
default_prepare
@ -240,11 +234,17 @@ _runtime() {
"
if [ "$CBUILD" != "$CHOST" ]; then
local args="$args -cross"
# https://github.com/dotnet/runtime/pull/75597 broke crossbuilding when true
local DotNetBuildFromSource=false
# x86 build of mono broken, thus do not build mono
case $_dotnet_target in
x86) local args="$args /p:DefaultSubsets=clr+libs+host+packs";;
esac
fi
if [ "$_runtimever" != "${_runtimever##*-}" ]; then
local args="$args /p:VersionSuffix=${_runtimever##*-}"
fi
ROOTFS_DIR="$CBUILDROOT" ./build.sh $args
DotNetBuildFromSource=$DotNetBuildFromSource ROOTFS_DIR="$CBUILDROOT" ./build.sh $args
for i in artifacts/packages/*/*/*.nupkg; do
$_nuget push $i --source="$_packagesdir"
@ -266,7 +266,6 @@ _roslyn() {
local args="
-c Release
-bl
/consoleLoggerParameters:ShowTimestamp
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/roslyn.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
"
if [ "$_roslynver" != "${_roslynver##*-}" ]; then
@ -289,12 +288,6 @@ _sdk() {
msg "[$(date)] Building sdk version $_sdkver"
cd "$builddir"/src/sdk
# ArgumentsReflector doesn't build correctly when built from source
cd ./src/Tests/ArgumentsReflector
DotNetBuildFromSource=false dotnet restore
DotNetBuildFromSource=false dotnet build --configuration Release
cd ../../..
local args="
-c Release
-bl
@ -305,7 +298,7 @@ _sdk() {
if [ "$_sdkver" != "${_sdkver##*-}" ]; then
local args="$args /p:VersionSuffix=${_sdkver##*-}"
fi
./build.sh --pack $args
./build.sh --pack /p:Projects=$builddir/src/sdk/source-build.slnf $args
for i in artifacts/packages/*/*/*.nupkg; do
$_nuget push $i --source="$_packagesdir"
@ -332,7 +325,9 @@ _aspnetcore() {
/consoleLoggerParameters:ShowTimestamp
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/aspnetcore.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
/p:DotNetAssetRootUrl=file://$_downloaddir/
/p:BuildOSName=linux-musl
"
# x86 crossgen broken
case $CARCH in
x86) local args="$args /p:CrossgenOutput=false";;
esac
@ -372,6 +367,8 @@ _installer() {
if [ "$_installerver" != "${_installerver##*-}" ]; then
local args="$args /p:VersionSuffix=${_installerver##*-}"
fi
# x86 crossgen broken
case $CARCH in
x86) local args="$args /p:DISABLE_CROSSGEN=True";;
esac
@ -499,28 +496,23 @@ artifacts() {
}
sha512sums="
d205bd65e5d51b9471805553c2a8a4c34cf81df72eaede9072541061c78109356b8b77d0b2fdc85eb33b3907facf7d06aca9247e03830df66f91385e62237ec1 dotnet-v6.0.115.tar.xz
025f21c494ed0c63e3c5acb17d4c95b51d049b9ecf6c9bde0700368fe63cf0067d74777c020f6e497cd148c68ddc0c1d807cb074aff7b520be88e6309ad1cce3 dotnet-sdk-6.0.115-linux-musl-x64.noextract
ff98fe117814e2e623be5c5d273e1d9cc22c0694e7e042212e4cd91605fbacc9a37cb5ca62b070abd520769511c52e9887ea3c47e9ac7d7762088787b544cef5 dotnet-sdk-6.0.115-linux-musl-arm64.noextract
4f693041514bb1344b1c1a5144bf0aa1fd5a2965db768df79f6d0760208944eb98d281af080e4c181a29ecaddedcfdde82f03678204cc27895cef5c5e1dd5bf1 dotnet-sdk-6.0.115-linux-musl-arm.noextract
c2053bff25e8634a3f6cf58d12a23921d55ff88a3a7c86fcc75450d2887f56bf43fe93d7da735b01b94fa822866fe8b9a060477501248eb25b9f705aa6a138b8 dotnet-sdk-6.0.115-r0-linux-musl-s390x.noextract
8c03186212149ba38df996068d511c29bd9be31e40fd1d7d21fc15fd2c0f6272479e8145ccb9544bb48c2c90bc8001ba05af1a7d92a60018ba7a983bc6187731 dotnet-v6.0.116.tar.xz
3b6f37aee5698d7ef794c74a6d914b914f0220346a2f37e66e4a29db63e284747d02856ea6cd461c76f2a9e18ab047f40cc739e7f8227d69ea7316bce2020201 dotnet-sdk-6.0.116-linux-musl-x64.noextract
dd3ec888e0d6644f2d6ef17ca7ce540d62226bb459cc0bbfe938229e757a8f4a10fc314a078f9898143c2271b8a70de77ffbdaecfa8c4c87921421e729f53a64 dotnet-sdk-6.0.116-linux-musl-arm64.noextract
a35480c68e9f156a33225e80dc166db3a2fbe860f0f35497357fa6b5594df16dad9cbc8b5a7569ee4b6262070e100bf3c9d57721c68bac5bfc83abf61e4ace5d dotnet-sdk-6.0.116-linux-musl-arm.noextract
086e269b3784d28c928f8eb82978d40b49eaac966b47e6f33b08424364204b6938ac2c69c8cbfd536c3da195f7d948bf6718fa6f078d23a2a5a2216805248a5d dotnet-sdk-6.0.116-r0-linux-musl-s390x.noextract
64fffa28143c28ceefbae08e8086746e177a11242f6a5b778bc5597190748c9d3e869020d7d3f4b74efaad7fbb73258765e227c9bdd098501fdbbc7e7e6ec05b Private.SourceBuilt.Artifacts.6.0.112.noextract
0eb771d7e23607a256f209c958a8025af6a7c1e20948b244f2903941aad5e1c0f130a9285ee29086d6188090e8692f5f129329a88da54d3f0a7e7e5b7e4257ef runtime.linux-musl-x64.microsoft.netcore.ilasm.6.0.0.nupkg
5ad26a79b5ba3ebdc6932dde50218d2c0669377dcb628debbb448e0dfc5d001d7e07b121f18ecd50b667ab372e10ec0bfe166a6e2103faf2f824995fdad0c355 runtime.linux-musl-arm64.microsoft.netcore.ilasm.6.0.0.nupkg
2a24e56ddf0f3e3ef7cb64523b7c6ebf02b91a73287c342783eb66e43a9bbe0cd23eb4b26f435e6b194bf1a40017e6aae60333ff087b18657672b243e8c8ce76 runtime.linux-musl-arm.microsoft.netcore.ilasm.6.0.0.nupkg
efdc9097028d11ddc2e9e052c57d62af333705b5108093077238d8b98fb5e250d75ac62cec5842bd9989bf6d737736a70ed4f512c69b356314805c24f3f1d698 runtime.linux-musl-s390x.microsoft.netcore.ilasm.6.0.0.nupkg
a24efb7578e2020e17c877ffe00b49f8f476b0845fdc55c16404008a9566d8628a72c2208bd23df745c88592ebe9c922b0cf1bc1f95f834b539bbcc2cbf516c5 system.reactive.core.4.1.1.nupkg
7462305c0aed05c0d18ea5ebf8a9d04c7e15d826ff5682d14ce256393e8d05094d3be244fdc550cb1ab9fa45400c4d92783faac03960ef156fa25b4073728fdb aspnetcore_use-linux-musl-crossgen-on-non-x64.patch
53194e107801ae36668599697fa42d7bf6ef24baff63987a3289e95b971f83a9c50ed1815efeb67ba86afbd1172ae6db964022d0f4a85ba4409a1d622c6c999f installer_runtimepacks.patch
42779a7bf1004fe0f7054cfa4f09f49d7f2a57c0543ec994ffbd54fb349abb508295476098ed35d60e9676be8bcc15aa8a9ec5c814cd1e058357530b5cdfb2b6 roslyn_57003-mono-namedmutex.patch
ead82bb2276acc273d661e42597c76661984143bb7736cd6a64241f51b2da3b9b8625b6232e24c7f9a6965436f65a5b7bf1ba7669a01e6b9774ebd3a62f7ebe0 roslyn_allow-extra-params.patch
cf40e37b4adfc61e24e3b48a397b4d813726d190f271869d946035279bf662a694a0fca448f5ae06ad2bb2300595223109ad64f60f65dac5cddf9308e12147a3 roslyn_revert-lift-version-codeanalysis.patch
e67e0114bd324dae65eb19f6fa8c74414bee77cd30e299931b0d82b4ca1b6b6f88358a0c47ffb180f46c5cb28f61f79bb4a59d43c1ae3011bfe491e757de293a runtime_76500-mono-musl-support.patch
eb957e55c39b6adc9de079861e6e2279c8fa9d65aab019fb9a02de1549136f511f8d4b39d689aef3c73a7a86a90a9e8372c34a934a500afa0325bedf3ee9f97c runtime_81573-suppress-clang-16-warnings.patch
6c614a48565c0e10f8714244e538bb453f7914ff58d01e9fd1255ad24698be916fd9e0a438c732737576fde6c0d68bec8f8958ce1b1b11b70c4a3b8663bdb8e2 runtime_76500-properly-set-toolchain-for-crossbuilding-on-alpine.patch
827e899a83103f666dc3d57c1ec695bebc659a574f4a1d754da0cafe8c18d7db79c3950267e905fa078f94612ee1101fbddd0ea62b3c08947d8bcd7d9c8de41c runtime_82269-mono-thread-coop-undefine-fortify-source.patch
f1960cb573ca33437d29a5a98fa05df848c95fde2f9e0dd3344be8583c1cc98d3034b6b4d8fea2643ae29046fe312529651207da33b66e892b76b62e637dfbc2 runtime_build-with-no-strict-prototypes.patch
5f465f6e3bfbff66551a5690eb41be46735f8e0b1e6e6503038521a8cc60cd66b7839426319ec304f785c9f074ef588b1f189ad6dbb6ced53257af28b09388f2 runtime_lld-fix.patch
521f47ffcd6120722588718aee99952f90cc5e6940bc8e0bcd460bdc05df33b4380b3fca9adb42a0e6abe8516c4d93d6f318bb21c7f091c7b248c18081453fc4 runtime_no-additional-runtime-id.patch
173105cf8e63f2e15c8b46d598f1338416a0da1ce77e0862cfb774c41e7883c70d0d733ed56fae5ab091ea96f8d6dd70e0e873b5dac6edb4e1266a08f68f2986 runtime_s390x-build.patch
b5f28aa8bdbd24c589276a60893859965eb78b0abfbdac7a6e86715ac87e3bbd8bc271852ff62a41ea83b53af02e1c1814abcccc8862c07b3ac74633d1be0a32 sdk_dummyshim-fix.patch
bfa4fca9987b4a1369e59abb3f872841ae994d47e5f873db43d9a0563f5e720cd85714e73aada912997da55077262e01f1ae120f8d32043d661ba89d12384caa runtime_84442-support-adding-rids-with-dash-in-base-part.patch
153255e80c2d2a131c2985041132417573ee98fa4b90153a1417080dbfb4d9bd03db9d5e241e54f5e664c4136eaf7facca9d4dad7ededf99a8f9068f26283fdb runtime_84443-suppress-clang-16-warnings.patch
d972e77df27748a80c9b23eca12f9fbd78be97f9034b79cc5703ba58eb6750171d9a115314300f883620ccbca89c65a99ca7a45d54a421b028b590190b4bed80 runtime_remove-usage-of-off64-t.patch
"

View file

@ -1,34 +0,0 @@
From 451aa3e9544b0214d0e8e844c27af3847f5bf391 Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/installer/pull/13410
From: Antoine Martin <dev@ayakael.net>
Date: Fri, 18 Feb 2022 05:14:39 +0000
Subject: [PATCH 1/1] musl build fix
Line causes build of aspnetcore on arm to look for linux version of
CrossGen2 rather than linux-musl. This removes the line so that
BuildOsName is pulled from TargetOsName as expected
This is now only necessary for portable
builds, as https://github.com/dotnet/installer/pull/14549 has fixed
issues relating to musl build on full source-build
---
.../App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
index aeb3c08f13..380fc5fbac 100644
--- a/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
+++ b/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
@@ -104,7 +104,6 @@ This package is an internal implementation of the .NET Core SDK and is not meant
Special case the crossgen2 package reference on Windows to avoid the x86 package when building in Visual Studio.
-->
<BuildOsName>$(TargetOsName)</BuildOsName>
- <BuildOsName Condition="'$(TargetOsName)' == 'linux-musl' and '$(TargetArchitecture)'!='x64'">linux</BuildOsName>
<BuildOsName Condition=" '$(PortableBuild)' == 'false' ">$(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-'))))</BuildOsName>
<Crossgen2BuildArchitecture Condition=" '$(BuildOsName)' == 'win' ">x64</Crossgen2BuildArchitecture>
<Crossgen2BuildArchitecture Condition=" '$(Crossgen2BuildArchitecture)' == '' ">$(BuildArchitecture)</Crossgen2BuildArchitecture>
--
2.34.1

View file

@ -1,46 +0,0 @@
From fb558e038ac3cf78b2c26ed24b99586fc97d82f1 Mon Sep 17 00:00:00 2001
From: Antoine Martin <dev@ayakael.net>
Date: Fri, 21 Oct 2022 13:44:04 -0400
Subject: [PATCH 1/1] runtimepacks
Necessary for stage0, as installer doesn't pull runtime packs.
---
src/redist/targets/GenerateLayout.targets | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/installer/src/redist/targets/GenerateLayout.targets b/src/installer/src/redist/targets/GenerateLayout.targets
index 88a053b61..47aa38571 100644
--- a/src/installer/src/redist/targets/GenerateLayout.targets
+++ b/src/installer/src/redist/targets/GenerateLayout.targets
@@ -135,6 +135,13 @@
<RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath>
</BundledLayoutPackage>
+ <BundledLayoutPackage Include="MicrosoftNetCoreAppRuntimePackNupkg">
+ <PackageName>Microsoft.NETCore.App.Runtime.$(SharedFrameworkRid)</PackageName>
+ <PackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</PackageVersion>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ <RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath>
+ </BundledLayoutPackage>
+
<BundledLayoutPackage Include="MicrosoftNetStandardTargetingPackNupkg">
<PackageName>NETStandard.Library.Ref</PackageName>
<PackageVersion>$(NETStandardLibraryRefPackageVersion)</PackageVersion>
@@ -149,6 +156,13 @@
<RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath>
</BundledLayoutPackage>
+ <BundledLayoutPackage Include="MicrosoftAspNetCoreAppRuntimePackNupkg">
+ <PackageName>Microsoft.AspNetCore.App.Runtime.$(SharedFrameworkRid)</PackageName>
+ <PackageVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</PackageVersion>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ <RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath>
+ </BundledLayoutPackage>
+
<BundledLayoutPackage Include="MicrosoftNetCoreAppHostPackNupkg">
<PackageName>Microsoft.NETCore.App.Host.$(SharedFrameworkRid)</PackageName>
<PackageVersion>$(MicrosoftNETCoreAppHostPackageVersion)</PackageVersion>
--
2.36.3

View file

@ -1,13 +0,0 @@
diff --git a/src/roslyn/eng/build.sh b/src/roslyn/eng/build.sh
index a08cbea099d..d3ec235732f 100755
--- a/src/roslyn/eng/build.sh
+++ b/src/roslyn/eng/build.sh
@@ -167,7 +167,7 @@ while [[ $# > 0 ]]; do
args="$args $1"
shift
;;
- /p:*)
+ /*)
properties="$properties $1"
;;
*)

View file

@ -0,0 +1,56 @@
From d36fdab8d7ebc3dc18fddf6fd70af765b2717bd5 Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/arcade/pull/11608
From: Antoine Martin <dev@ayakael.net>
Date: Thu, 6 Apr 2023 18:39:03 -0400
Subject: [PATCH 1/1] properly set toolchain for crossbuilding on Alpine Linux
---
eng/common/cross/toolchain.cmake | 19 +-
3 files changed, 325 insertions(+), 2 deletions(-)
diff --git a/src/runtime/eng/common/cross/toolchain.cmake b/src/runtime/eng/common/cross/toolchain.cmake
index 51f30e53dd4..b1369a2aa37 100644
--- a/src/runtime/eng/common/cross/toolchain.cmake
+++ b/src/runtime/eng/common/cross/toolchain.cmake
@@ -45,10 +45,18 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "s390x")
set(CMAKE_SYSTEM_PROCESSOR s390x)
- set(TOOLCHAIN "s390x-linux-gnu")
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl)
+ set(TOOLCHAIN "s390x-alpine-linux-musl")
+ else()
+ set(TOOLCHAIN "s390x-linux-gnu")
+ endif()
elseif(TARGET_ARCH_NAME STREQUAL "x86")
set(CMAKE_SYSTEM_PROCESSOR i686)
- set(TOOLCHAIN "i686-linux-gnu")
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
+ set(TOOLCHAIN "i586-alpine-linux-musl")
+ else()
+ set(TOOLCHAIN "i686-linux-gnu")
+ endif()
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(triple "x86_64-unknown-freebsd11")
@@ -173,6 +181,10 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "x86")
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
+ add_toolchain_linker_flag("--target=${TOOLCHAIN}")
+ add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
+ endif()
add_toolchain_linker_flag(-m32)
elseif(ILLUMOS)
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64")
@@ -204,6 +216,9 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
add_compile_options(-mfloat-abi=softfp)
endif()
elseif(TARGET_ARCH_NAME STREQUAL "x86")
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
+ add_compile_options(--target=${TOOLCHAIN})
+ endif()
add_compile_options(-m32)
add_compile_options(-Wno-error=unused-command-line-argument)
endif()

View file

@ -0,0 +1,164 @@
From abc761c2c5694e4029fea1a60dc1934951c66e26 Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/runtime/pull/84442
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);

View file

@ -1,36 +1,23 @@
From 9e1945b03c7dd7772f2b97a1149f07f7cbd63ed8 Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/runtime/pull/81573
From da120986f17d4016b44fdc91741ae1d999083eeb Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/runtime/pull/84443
From: Antoine Martin <dev@ayakael.net>
Date: Tue, 28 Mar 2023 13:58:40 -0400
Subject: [PATCH 1/1] Suppress clang-16 warnings
Date: Thu, 6 Apr 2023 15:46:31 -0400
Subject: [PATCH 1/2] Suppress clang-16 warnings (#81573)
---
eng/native/configurecompiler.cmake | 8 ++++++++
eng/native/configurecompiler.cmake | 9 +++++++++
eng/native/init-compiler.sh | 4 ++--
src/coreclr/dlls/mscordbi/CMakeLists.txt | 5 +----
src/coreclr/dlls/mscordbi/mscordbi.cpp | 15 +++++++++++++++
src/libraries/Native/Unix/CMakeLists.txt | 9 +++++++++
src/native/corehost/apphost/static/CMakeLists.txt | 4 ++--
.../apphost/static/singlefilehost_OSXexports.src | 11 -----------
.../apphost/static/singlefilehost_unixexports.src | 4 ----
6 files changed, 26 insertions(+), 21 deletions(-)
8 files changed, 38 insertions(+), 23 deletions(-)
delete mode 100644 src/native/corehost/apphost/static/singlefilehost_OSXexports.src
diff --git a/src/runtime/eng/native/init-compiler.sh b/src/runtime/eng/native/init-compiler.sh
index 883c7c5..4555cbe 100755
--- a/src/runtime/eng/native/init-compiler.sh
+++ b/src/runtime/eng/native/init-compiler.sh
@@ -46,8 +46,8 @@ 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=( 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=( 11 10 9 8 7 6 5 4.9 ); fi
+ 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
parts=(${version//./ })
diff --git a/src/runtime/eng/native/configurecompiler.cmake b/src/runtime/eng/native/configurecompiler.cmake
index f3526deb19f..6cf0577a774 100644
index f3526deb19fa0..1a43b710c618b 100644
--- a/src/runtime/eng/native/configurecompiler.cmake
+++ b/src/runtime/eng/native/configurecompiler.cmake
@@ -367,6 +367,15 @@ if (CLR_CMAKE_HOST_UNIX)
@ -49,8 +36,23 @@ index f3526deb19f..6cf0577a774 100644
else()
add_compile_options(-Wno-unknown-pragmas)
add_compile_options(-Wno-uninitialized)
diff --git a/src/runtime/eng/native/init-compiler.sh b/src/runtime/eng/native/init-compiler.sh
index 567d18da4747a..e215bd75ff158 100755
--- a/src/runtime/eng/native/init-compiler.sh
+++ b/src/runtime/eng/native/init-compiler.sh
@@ -46,8 +46,8 @@ 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=( 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=( 11 10 9 8 7 6 5 4.9 ); fi
+ 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
parts=(${version//./ })
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
index c7a23c9923f..4a03a788a71 100644
index c7a23c9923fe1..4a03a788a71a5 100644
--- a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
+++ b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
@@ -99,10 +99,7 @@ elseif(CLR_CMAKE_HOST_UNIX)
@ -66,7 +68,7 @@ index c7a23c9923f..4a03a788a71 100644
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 afd2cfe8002..489c552a0bd 100644
index afd2cfe800225..489c552a0bd3e 100644
--- a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
+++ b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
@@ -26,3 +26,18 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
@ -88,8 +90,28 @@ index afd2cfe8002..489c552a0bd 100644
+ DAC_PAL_UnregisterModule(hInstance);
+}
+#endif
diff --git a/src/runtime/src/libraries/Native/Unix/CMakeLists.txt b/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
index 6931f62d24c87..e9ebefcf8243a 100644
--- a/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
+++ b/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
@@ -51,6 +51,15 @@ if(CMAKE_C_COMPILER_ID STREQUAL Clang)
add_compile_options(-Wthread-safety)
add_compile_options(-Wno-thread-safety-analysis)
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)
elseif(CMAKE_C_COMPILER_ID STREQUAL GNU)
add_compile_options(-Wno-stringop-truncation)
endif()
diff --git a/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt b/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
index a00c7913986..6d491c086da 100644
index a00c79139863f..6d491c086da98 100644
--- a/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
+++ b/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
@@ -73,8 +73,8 @@ if(CLR_CMAKE_TARGET_WIN32)
@ -105,7 +127,7 @@ index a00c7913986..6d491c086da 100644
endif()
diff --git a/src/runtime/src/native/corehost/apphost/static/singlefilehost_OSXexports.src b/src/runtime/src/native/corehost/apphost/static/singlefilehost_OSXexports.src
deleted file mode 100644
index 18d5697e845..00000000000
index 18d5697e84580..0000000000000
--- a/src/runtime/src/native/corehost/apphost/static/singlefilehost_OSXexports.src
+++ /dev/null
@@ -1,11 +0,0 @@
@ -121,7 +143,7 @@ index 18d5697e845..00000000000
-; Used by profilers
-MetaDataGetDispenser
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 1f9c5178218..18d5697e845 100644
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
@ -132,26 +154,64 @@ index 1f9c5178218..18d5697e845 100644
-; FreeBSD needs to reexport these
-__progname
-environ
--
diff --git a/src/runtime/src/libraries/Native/Unix/CMakeLists.txt b/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
index 6931f62d24c..4f7375a59c6 100644
--- a/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
+++ b/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
@@ -51,6 +51,15 @@ if(CMAKE_C_COMPILER_ID STREQUAL Clang)
add_compile_options(-Wthread-safety)
add_compile_options(-Wno-thread-safety-analysis)
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)
elseif(CMAKE_C_COMPILER_ID STREQUAL GNU)
add_compile_options(-Wno-stringop-truncation)
endif()
2.38.4
From a6d9fbff551de1164ec9cc14bdd48f2ffad77d81 Mon Sep 17 00:00:00 2001
From: Antoine Martin <dev@ayakael.net>
Date: Thu, 6 Apr 2023 16:39:27 -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 4a03a788a71a5..b7618b324c260 100644
--- a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
+++ b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
@@ -99,7 +99,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 489c552a0bd3e..afd2cfe800225 100644
--- a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
+++ b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
@@ -26,18 +26,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

View file

@ -1,12 +0,0 @@
diff --git a/src/runtime/src/libraries/Native/Unix/CMakeLists.txt.orig b/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
index 6931f62d24c..25abeecd5b6 100644
--- a/src/runtime/src/libraries/Native/Unix/CMakeLists.txt.orig
+++ b/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
@@ -38,6 +38,7 @@ add_compile_options(-Wno-c11-extensions)
add_compile_options(-Wno-unknown-pragmas)
add_compile_options(-Wno-unknown-warning-option)
add_compile_options(-Wno-unused-but-set-variable)
+add_compile_options(-Wno-strict-prototypes)
check_c_compiler_flag(-Wimplicit-fallthrough COMPILER_SUPPORTS_W_IMPLICIT_FALLTHROUGH)
if (COMPILER_SUPPORTS_W_IMPLICIT_FALLTHROUGH)

View file

@ -1,31 +0,0 @@
From 91988b0241a77f1f6524c19e2ce55dda06de7242 Mon Sep 17 00:00:00 2001
Patch-Source: https://src.fedoraproject.org/rpms/dotnet6.0/blob/src/runtime/rawhide/f/runtime-arm64-lld-fix.patch
From: Omair Majid <omajid@redhat.com>
Date: Wed, 16 Feb 2022 18:08:22 +0000
Subject: [PATCH 1/1] arm64 lld fix
---
eng/native/init-compiler.sh | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/runtime/eng/native/init-compiler.sh b/src/runtime/eng/native/init-compiler.sh
index 567d18da474..05245c7b9f8 100755
--- a/src/runtime/eng/native/init-compiler.sh
+++ b/src/runtime/eng/native/init-compiler.sh
@@ -108,11 +108,8 @@ if [[ -z "$CC" ]]; then
fi
if [[ "$compiler" == "clang" ]]; then
- if command -v "lld$desired_version" > /dev/null; then
- # Only lld version >= 9 can be considered stable
- if [[ "$majorVersion" -ge 9 ]]; then
- LDFLAGS="-fuse-ld=lld"
- fi
+ if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
+ LDFLAGS="-fuse-ld=lld"
fi
fi
--
2.34.1

View file

@ -1,25 +0,0 @@
From 79f02a53316f90543d60269d7c06727c376f423b Mon Sep 17 00:00:00 2001
From: Antoine Martin <dev@ayakael.net>
Date: Wed, 24 Aug 2022 18:41:08 +0000
Subject: [PATCH 1/1] No additional runtime id
For some reason, AdditionalRuntimeIdentifiers gets set as '$arch' rather than 'linux-musl-$arch'
Since we know our portable RID exists, just skip ensuring RID existence
---
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj.orig b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
index 84d4bb8..58f7e01 100644
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj.orig
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
@@ -17,8 +17,6 @@
<NoWarn>$(NoWarn);NU5128</NoWarn> <!-- No Dependencies-->
<PackageDescription>Provides runtime information required to resolve target framework, platform, and runtime specific implementations of .NETCore packages.</PackageDescription>
- <!-- When building from source, ensure the RID we're building for is part of the RID graph -->
- <AdditionalRuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' == 'true'">$(AdditionalRuntimeIdentifiers);$(OutputRID)</AdditionalRuntimeIdentifiers>
<ServicingVersion>8</ServicingVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
--
2.37.1

View 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)

View file

@ -1,40 +0,0 @@
From b99f2106370e1af3ecd116576341b94319cbd332 Mon Sep 17 00:00:00 2001
From: Antoine Martin <dev@ayakael.net>
Date: Sun, 18 Sep 2022 00:45:20 +0000
Subject: [PATCH 1/1] s390x fixes
---
src/runtime/eng/common/cross/toolchain.cmake | 7 ++++++-
.../eng/common/native/init-compiler.sh | 2 +-
6 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/src/runtime/eng/common/cross/toolchain.cmake b/src/runtime/eng/common/cross/toolchain.cmake
index 561576be9..8a81d0387 100644
--- a/src/runtime/eng/common/cross/toolchain.cmake
+++ b/src/runtime/eng/common/cross/toolchain.cmake
@@ -38,7 +38,11 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "s390x")
set(CMAKE_SYSTEM_PROCESSOR s390x)
- set(TOOLCHAIN "s390x-linux-gnu")
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl)
+ set(TOOLCHAIN "s390x-alpine-linux-musl")
+ else()
+ set(TOOLCHAIN "s390x-linux-gnu")
+ endif()
elseif(TARGET_ARCH_NAME STREQUAL "x86")
set(CMAKE_SYSTEM_PROCESSOR i686)
set(TOOLCHAIN "i686-linux-gnu")
diff --git a/src/runtime/eng/native/init-compiler.sh b/src/runtime/eng/native/init-compiler.sh
index 567d18da474..62f6db47959 100755
--- a/src/runtime/eng/native/init-compiler.sh
+++ b/src/runtime/eng/native/init-compiler.sh
@@ -109,7 +109,7 @@
if [[ "$compiler" == "clang" ]]; then
if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
- LDFLAGS="-fuse-ld=lld"
+ [ -f "$ROOTFS_DIR/usr/bin/lld" ] && LDFLAGS="-fuse-ld=lld"
fi
fi

View file

@ -1,55 +0,0 @@
From 79f02a53316f90543d60269d7c06727c376f423b Mon Sep 17 00:00:00 2001
From: Antoine Martin <dev@ayakael.net>
Date: Wed, 24 Aug 2022 18:41:08 +0000
Subject: [PATCH 1/1] dummy-shim-fix
Hack for building sdk within stage0, which expects to be built using the
whole stack.
---
build/GenerateResxSource.targets | 1 -
scripts/register-completions.zsh | 13 +++----------
.../Microsoft.DotNet.PackageInstall.Tests.csproj | 1 -
.../SampleGlobalToolWithShim/includepublish.nuspec | 4 +---
4 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/sdk/build/GenerateResxSource.targets b/src/sdk/build/GenerateResxSource.targets
index 239665655d..b47510d901 100644
--- a/src/sdk/build/GenerateResxSource.targets
+++ b/src/sdk/build/GenerateResxSource.targets
@@ -1,7 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="_CustomizeXlfSourceNames"
- DependsOnTargets="_CustomizeResourceNames"
BeforeTargets="PrepareResourceNames;GatherXlf"
>
<ItemGroup>
index a147870bcb..f673e4e21b 100644
--- a/src/sdk/src/Tests/Microsoft.DotNet.PackageInstall.Tests/Microsoft.DotNet.PackageInstall.Tests.csproj
+++ b/src/sdk/src/Tests/Microsoft.DotNet.PackageInstall.Tests/Microsoft.DotNet.PackageInstall.Tests.csproj
@@ -107,7 +107,6 @@
</PropertyGroup>
<Copy SourceFiles="SampleGlobalToolWithShim/DotnetToolSettings.xml" DestinationFolder="$(testAssetSourceRoot)" />
<Copy SourceFiles="SampleGlobalToolWithShim/dummyshim" DestinationFolder="$(testAssetSourceRoot)" />
- <Copy SourceFiles="SampleGlobalToolWithShim/dummyshim.exe" DestinationFolder="$(testAssetSourceRoot)" />
<MSBuild BuildInParallel="False" Projects="SampleGlobalToolWithShim/consoledemo.csproj" Targets="Restore" Properties="Configuration=Release;BaseOutputPath=$(testAssetSourceRoot)/bin/;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false;ForceRestoreToEvaluateSeparately=1"
RemoveProperties="TargetFramework">
</MSBuild>
diff --git a/src/sdk/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/includepublish.nuspec b/src/sdk/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/includepublish.nuspec
index b2ed9d349c..d760d5f772 100644
--- a/src/sdk/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/includepublish.nuspec
+++ b/src/sdk/src/Tests/Microsoft.DotNet.PackageInstall.Tests/SampleGlobalToolWithShim/includepublish.nuspec
@@ -12,9 +12,7 @@
<files>
<file src="bin\Release\netcoreapp2.1\publish\*.*" target="tools\netcoreapp2.1\any\" />
<file src="DotnetToolSettings.xml" target="tools\netcoreapp2.1\any\DotnetToolSettings.xml" />
- <file src="dummyshim.exe" target="tools\netcoreapp2.1\any\shims\win-x64\demo.exe" />
- <file src="dummyshim.exe" target="tools\netcoreapp2.1\any\shims\win-x86\demo.exe" />
<file src="dummyshim" target="tools\netcoreapp2.1\any\shims\osx-x64\demo" />
<file src="dummyshim" target="tools\netcoreapp2.1\any\shims\linux\demo" />
</files>
</package>
--
2.37.1