dotnet7-stage0: upgrade to 7.0.105

This commit is contained in:
Antoine Martin 2023-04-11 20:35:52 -04:00
parent 1bf8f62a59
commit f8aa44801f
Signed by: forge
GPG key ID: D62A472A4AA7D541
15 changed files with 356 additions and 437 deletions

View file

@ -2,19 +2,19 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=dotnet7-stage0
pkgver=7.0.104
pkgver=7.0.105
pkgrel=0
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
# Tag of tarball generator.
_gittag=v7.0.104
_gittag=v$pkgver
# Versions of prebuilt artifacts and bootstrap tar
_artifactsver=7.0.102
_bootstrapver="7.0.104"
_bootstraprel=1
_installerver=$_bootstrapver
_bootstrapver="7.0.105"
_bootstraprel=0
_installerver=${_gittag/v}
# Version of packages that aren't defined in git-info or badly defined
_iltoolsver=7.0.2-servicing.22607.1
@ -24,19 +24,15 @@ _aspnetver=7.0.4
# 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_allow-extra-params.patch
installer_set-crossgen2rid-using-buildarchitecture.patch
runtime_76500-mono-musl-support.patch
runtime_76500-properly-set-toolchain-for-alpine.patch
runtime_81573-suppress-clang-16-warnings.patch
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
runtime_83682-specify-notext-on-linux-musl-x86.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_make-lld-use-depend-on-existing-on-target.patch
runtime_musl-x86-build-fix.patch
runtime_no-additional-runtime-id.patch
sdk_dummyshim-fix.patch
sdk_fix-sdk-download.patch
runtime_remove-usage-of-off64-t.patch
"
_extra_nupkgs="https://globalcdn.nuget.org/packages/stylecop.analyzers.1.2.0-beta.435.nupkg"
@ -49,7 +45,7 @@ pkgdesc="The .NET Core stage0 bits for dotnet build"
# riscv64: port WIP https://github.com/dotnet/runtime/issues/36748
arch="all !x86 !armhf !riscv64"
url=https://dotnet.microsoft.com
_giturl=https://lab.ilot.io/dotnet/installer
_giturl=https://github.com/dotnet/installer
license="MIT"
options="!check" # Testsuite in main -build aport
subpackages="
@ -81,7 +77,6 @@ makedepends_host="
gcc
grep
icu-dev
jq
krb5-dev
libintl
libstdc++
@ -186,6 +181,7 @@ prepare() {
# Parallel restore is broken on mono-based builds since dotnet7
# see https://github.com/dotnet/runtime/issues/77364
# fixed by https://github.com/dotnet/runtime/pull/79856 on dotnet8
# A workaround via runtime_enable-runtime-marshalling.diff
case $CARCH in
s390x|ppc64le)
@ -194,6 +190,10 @@ prepare() {
;;
esac
# sdk insists on downloading its own dotnet unless ArcadeBuildFromSource
# is true, which opens up a can of worms
sed 's|ArcadeBuildFromSource=true|Architecture|' -i src/sdk/eng/restore-toolset.sh
mkdir -p "$_cli_root"
mkdir -p $_packagesdir $_downloaddir $_outputdir $_nugetdir $_logdir
@ -244,15 +244,21 @@ _runtime() {
/p:NoPgoOptimize=true
/p:EnableNgenOptimization=false
/p:ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch=none
/p:RunApiCompat=false
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/runtime.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
"
if [ "$CBUILD" != "$CHOST" ]; then
local args="$args -cross"
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
DotNetBuildFromSource=false 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"
@ -274,7 +280,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
@ -308,9 +313,7 @@ _sdk() {
local args="$args /p:VersionSuffix=${_sdkver##*-}"
fi
# ArgumentsReflector doesn't build correctly when built from source
DotNetBuildFromSource=false dotnet build src/Tests/ArgumentsReflector/ArgumentsReflector.csproj $args
./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"
@ -335,14 +338,16 @@ _aspnetcore() {
-arch $_dotnet_target
-no-build-nodejs
/consoleLoggerParameters:ShowTimestamp
/p:BuildOSName=linux-musl
/p:BuildNodeJs=false
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/aspnetcore.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
/p:DotNetAssetRootUrl=file://$_downloaddir/
/p:EnablePackageValidation=false
"
if [ "$_dotnet_target" = "x86" ] || [ "$_dotnet_target" = "ppc64le" ]; then
local args="$args /p:CrossgenOutput=false"
fi
# x86 crossgen broken; ppc64le insists on using crossgen
case $_dotnet_target in
x86|ppc64le) local args="$args /p:DISABLE_CROSSGEN=True";;
esac
if [ "$_aspnetver" != "${_aspnetver##*-}" ]; then
local args="$args /p:VersionSuffix=${_aspnetver##*-}"
fi
@ -378,9 +383,12 @@ _installer() {
if [ "$_installerver" != "${_installerver##*-}" ]; then
local args="$args /p:VersionSuffix=${_installerver##*-}"
fi
if [ "$_dotnet_target" = "x86" ]; then
local args="$args /p:DISABLE_CROSSGEN=True"
fi
# x86 crossgen broken
case $_dotnet_target in
x86) local args="$args /p:DISABLE_CROSSGEN=True";;
esac
./build.sh $args
mkdir -p "$_downloaddir"/installer/$_installerver
@ -510,25 +518,21 @@ artifacts() {
}
sha512sums="
3adb3cfe451e04c56265306869c3023c281322510d6e0eb182f233e549bdd4b9c738f41bb60470fce09cc386be4d1ea47d78846842f35e4bd9047b04bef16286 dotnet-v7.0.104.tar.xz
b622027eb455388d9401f7df9d9d1259659739ebda109b24c2a478113bcfe8f588ac9bf1856c5b7ba125e30351aff7ef4eb8f465da13fa1cef0b0d41a07aad38 dotnet-sdk-7.0.104-linux-musl-x64.noextract
c0b0326e1d00fe0f989a3b81953057d5f1d84f1f33c2d7116ddcb64bd628755f1b4d3912f86a7423b45f27fed2f17e3ecef0292c37f9bb61b52b5632da429c7e dotnet-sdk-7.0.104-linux-musl-arm64.noextract
073fbba13f539e4d784e7368afa7ff28b7f477ddc786b007763fe1d46d6501a07a5fdf96b78bfda1e5cefcaf0e66724b1037f1f469c2b6b8750945034752061b dotnet-sdk-7.0.104-linux-musl-arm.noextract
1e8670787f517a0fa360a5dfb4176b58efad53f92d78fdd1c357eae2c0d4b3490d13629ea696217ebdca309695e9e90a6ef0180c7fb51599b43fdd2ed95d1da5 dotnet-sdk-7.0.104-r1-linux-musl-s390x.noextract
956f7f22d01df953c939b5ca38d8a756cc55915ba31b28e953aea86baf61f4317c6023d1f2978417143f27a1f1d41bd1c543a8edc278327913208dced3e1983f dotnet-sdk-7.0.104-r1-linux-musl-ppc64le.noextract
bfc122f316673fe4014e891eb101ecf40efc2ed4ecaff0cbd4bb5c17f547ccaa867ae8af22f41813565630cdb68e2972633703a88478fadde39584f91588589d dotnet-v7.0.105.tar.xz
8fb7d1754359e3fda35b7a07e13d2a5e9e723196b980dd922b30919aedaddbedd4d82e28b37471437b69cb93e4b1d136ac701e221924e44d0be6b6ba94dc3654 dotnet-sdk-7.0.105-linux-musl-x64.noextract
c8120c20939232b53a3cdc607d812d93fadd6dea9466f9454df559f8b7eb334c69fdfd31bc60e4c70b6cf4fc519a25a0439902b04cf5c5bd0c29de020024fbe2 dotnet-sdk-7.0.105-linux-musl-arm64.noextract
9ffa724ccc02dc3e40afe22f0546a9bdf68b6314cf6da03d9387fb010fe3e5935154a5c06c4a2d588ff4ac77f34120a4ae9bc0237fb24452d78e6698435acf72 dotnet-sdk-7.0.105-linux-musl-arm.noextract
0d6a0f394d53043ffe9aca972a9a4d173f9eb3cad4660422d377080e46cf8cc91f3cbdd05d33095b479c465756d44afe264adb6bdf84d7b05ebc420c3e938837 dotnet-sdk-7.0.105-r0-linux-musl-s390x.noextract
7b29bce712237634cfcb5fb96c74254736d2279c78e7c74f4471a16391f4af16754819f1a93ac4f24e7dd199a91264c6b398e930020f264dfb4e894acca0e452 dotnet-sdk-7.0.105-r0-linux-musl-ppc64le.noextract
e5d8f11d5da842309c1e7cf9936eb0cf3cfb56aaa17aeee64fe264b3e6771ee56dd6c405a4c16950b4e4607dab21bc0ec40783f69b0865a6112d7d03b1b57487 Private.SourceBuilt.Artifacts.7.0.102.noextract
2ede8d9352a51861a5b2550010ff55da8241381a6fa6cc49e025f1c289b230b8c0177e93850de4ea8b6f702c1f2d50d81a9f4d890ca9441c257b614f2a5e05dd stylecop.analyzers.1.2.0-beta.435.nupkg
ae8588bf0ee3c60d2d511241a9acdef209218390e9609cbd920c9d88b9180519f5dfba430534d1f97a7efbf891c57265403e13db2d23730c0a4d6a75a9c5602d aspnetcore_use-linux-musl-crossgen-on-non-x64.patch
1fe84c55f63c3b32fe7c58aa23ba25e2e9ddeee21acd664947206b8a9678bf38e2c1a95252243d7981dd9423bda49f40dd463fa6e619fe7f329a31794829ee88 installer_runtimepacks.patch
ead82bb2276acc273d661e42597c76661984143bb7736cd6a64241f51b2da3b9b8625b6232e24c7f9a6965436f65a5b7bf1ba7669a01e6b9774ebd3a62f7ebe0 roslyn_allow-extra-params.patch
b6a2dfeccac329546f87f1019c1f2cf07e2f294dd33914449ad08d92269c8713b6fa1e330ef257c24e189023fd0b824df97688b0ba6e578a6d0292b07a72b4c1 installer_set-crossgen2rid-using-buildarchitecture.patch
43355fdb9531a08a9a141b016c049cc61d779e797f182456f56e5dc3af76fd31643d84d7ad7982080921681d2bbfc7bbaaa64f50c3899b023222eb0d841fbb2a runtime_76500-mono-musl-support.patch
24f3fed752922d2ca3c151f21fedf6a257c7c74a155105a1aa09cdc847ba24e496212cb2d8548b134a8901c7da8d78c27fa93579211f7bdeadc598f808fed4a8 runtime_76500-properly-set-toolchain-for-alpine.patch
3d241fce16038a4790151342dd95c77c39c8a63aeba75921bb6cd6a1b9698668b99dceb89e993b30d0087e56c5d3fecd272c016d03f22bf5b25a41d5fa62f3fc runtime_81573-suppress-clang-16-warnings.patch
d732df247c721c9f677baabdd7f36dbf4b564814ff64164361065bb1c196b767494a1d39f634eadf01a23032c7b3e64102614b7213065c81096bbf3f8022e6a0 runtime_82269-mono-thread-coop-undefine-fortify-source.patch
2dd195d5275245fe85bea2f75019fd3cbadcef7f5691b44c08db470265c6e7fcb2a50b3276a96df7547af76953623fdc92bd1ad51ccef6738813b78d22327fa3 runtime_83682-specify-notext-on-linux-musl-x86.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
2ff8b42bce25b8389177bb6389bfdc796c104c5d992e72a6e7c8af0cda8f70f26f480071db380df78db745eee72e4343220f79ec6b22aa880fa2531eda8c8593 runtime_make-lld-use-depend-on-existing-on-target.patch
87e726cc4677213cace34df5eb50881d88ed0e618ba5eb9dc27c1f75d09a1eec8a9e8b4b7940714d4c9f74ce6dfa142882e642311cb45e33339aed65347dbb3e runtime_musl-x86-build-fix.patch
ce7496f734aed63009f25a12b8588e23d1714bd05ac0ea1d744f096dbd5787afb6ccd29f79ef0f14abb43fe0fb6d1ad00e4fbd488678b616a8bbe50dc42e7eed runtime_no-additional-runtime-id.patch
b5f28aa8bdbd24c589276a60893859965eb78b0abfbdac7a6e86715ac87e3bbd8bc271852ff62a41ea83b53af02e1c1814abcccc8862c07b3ac74633d1be0a32 sdk_dummyshim-fix.patch
5fe72c206564ad6a3d96e7a32cf76509819cdbe2620f67266e100e7426c04a3e861985ffd0999afc6baf28a04606e1124482b8a0f46dae3095da59bd57e31697 sdk_fix-sdk-download.patch
d972e77df27748a80c9b23eca12f9fbd78be97f9034b79cc5703ba58eb6750171d9a115314300f883620ccbca89c65a99ca7a45d54a421b028b590190b4bed80 runtime_remove-usage-of-off64-t.patch
"

View file

@ -1,29 +0,0 @@
From 451aa3e9544b0214d0e8e844c27af3847f5bf391 Mon Sep 17 00:00:00 2001
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
---
.../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
@@ -103,7 +103,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,76 +0,0 @@
From 46382e01243e30156660f6efe84a9afee0c5c1aa Mon Sep 17 00:00:00 2001
From: Antoine Martin <dev@ayakael.net>
Date: Sun, 28 Aug 2022 05:19:20 +0000
Subject: [PATCH 2/2] aspnetcore_set-local-repo
Patch necessary for stage0, as each component requires the artifacts
from previously built component. This patch (along with a prepare step
in aport) adds a "local" nupkg repository that artifacts are pushed to
at end of component build
---
src/aspnetcore/NuGet.config | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/runtime/NuGet.config b/src/runtime/NuGet.config
index 71e79dd377..c14909e175 100644
--- a/src/runtime/NuGet.config
+++ b/src/runtime/NuGet.config
@@ -7,6 +7,7 @@
</fallbackPackageFolders>
<packageSources>
<clear />
+ <add key="local" value="@@PACKAGESDIR@@" />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-emsdk -->
<add key="darc-pub-dotnet-emsdk-6b7d1f4" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-6b7d1f47/nuget/v3/index.json" />
diff --git a/src/aspnetcore/NuGet.config b/src/aspnetcore/NuGet.config
index a26b4ca86..1f40b8f06 100644
--- a/src/aspnetcore/NuGet.config
+++ b/src/aspnetcore/NuGet.config
@@ -2,6 +2,7 @@
<configuration>
<packageSources>
<clear />
+ <add key="local" value="@@PACKAGESDIR@@" />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-efcore -->
<add key="darc-int-dotnet-efcore-865c6a8" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-efcore-865c6a89/nuget/v3/index.json" />
diff --git a/src/installer/NuGet.config b/src/installer/NuGet.config
index 8cac51c22..c07e44968 100644
--- a/src/installer/NuGet.config
+++ b/src/installer/NuGet.config
@@ -5,6 +5,7 @@
</solution>
<packageSources>
<clear />
+ <add key="local" value="@@PACKAGESDIR@@" />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-windowsdesktop -->
<add key="darc-pub-dotnet-windowsdesktop-8a65067" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-windowsdesktop-8a650675/nuget/v3/index.json" />
diff --git a/src/roslyn/NuGet.config b/src/roslyn/NuGet.config
index a26b4ca86..1f40b8f06 100644
--- a/src/roslyn/NuGet.config
+++ b/src/roslyn/NuGet.config
@@ -3,6 +3,7 @@
<configuration>
<packageSources>
<clear />
+ <add key="local" value="@@PACKAGESDIR@@" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
diff --git a/src/sdk/NuGet.config b/src/sdk/NuGet.config
index 2773a4d0b..9aab732f7 100644
--- a/src/sdk/NuGet.config
+++ b/src/sdk/NuGet.config
@@ -2,6 +2,7 @@
<configuration>
<packageSources>
<clear />
+ <add key="local" value="@@PACKAGESDIR@@" />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-aspnetcore -->
<add key="darc-int-dotnet-aspnetcore-6a01dd1" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-aspnetcore-6a01dd1e/nuget/v3/index.json" />
--
2.37.1

View file

@ -1,45 +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
@@ -134,6 +134,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>
@@ -146,6 +153,13 @@
<PackageVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</PackageVersion>
<TargetFramework>$(TargetFramework)</TargetFramework>
<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">
--
2.36.3

View file

@ -0,0 +1,13 @@
diff --git a/src/installer/src/redist/targets/GenerateLayout.targets.orig b/src/installer/src/redist/targets/GenerateLayout.targets
index a27834f..0c899d4 100644
--- a/src/installer/src/redist/targets/GenerateLayout.targets.orig
+++ b/src/installer/src/redist/targets/GenerateLayout.targets
@@ -85,7 +85,7 @@
<WinFormsAndWpfSharedFxArchiveFileName>windowsdesktop-runtime-$(MicrosoftWindowsDesktopAppRuntimePackageVersion)-$(SharedFrameworkRid)$(ArchiveExtension)</WinFormsAndWpfSharedFxArchiveFileName>
<Crossgen2Rid>$(HostOSName)-$(BuildArchitecture)</Crossgen2Rid>
- <Crossgen2Rid Condition="'$(DotNetBuildFromSource)' == 'true'">$(SharedFrameworkRid)</Crossgen2Rid>
+ <Crossgen2Rid Condition="'$(DotNetBuildFromSource)' == 'true'">$(SharedFrameworkRid.SubString(0, $(SharedFrameworkRid.LastIndexOf('-'))))-$(BuildArchitecture)</Crossgen2Rid>
<AspNetCoreInstallerRid Condition="'$(AspNetCoreInstallerRid)' == ''">$(SharedFrameworkRid)</AspNetCoreInstallerRid>
<AspNetCoreInstallerRid Condition="'$(SharedFrameworkRid)' == 'rhel.6-x64'">linux-x64</AspNetCoreInstallerRid>

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,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()

View file

@ -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);

View file

@ -1,21 +1,22 @@
From 0ca07a2faf1e97b37893e8c8868280bd7052f09d Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/runtime/pull/81573
From: Adeel <3840695+am11@users.noreply.github.com>
Date: Fri, 3 Feb 2023 01:01:10 +0200
Subject: [PATCH 1/3] Suppress clang-16 warnings
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 | 8 ++++++++
src/coreclr/dlls/mscordbi/CMakeLists.txt | 1 +
src/native/corehost/apphost/static/CMakeLists.txt | 4 ++--
...t_OSXexports.src => singlefilehost_freebsdexports.src} | 4 ++++
.../apphost/static/singlefilehost_unixexports.src | 4 ----
6 files changed, 16 insertions(+), 7 deletions(-)
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 41a26d8..f13b740 100644
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
@ -28,10 +29,10 @@ index 41a26d8..f13b740 100644
for version in "${versions[@]}"; do
diff --git a/src/runtime/eng/native/configurecompiler.cmake b/src/runtime/eng/native/configurecompiler.cmake
index 867e9ea9862e6..34fb9a51a7055 100644
index 9090289f50e34..eaf5a867c5f6d 100644
--- a/src/runtime/eng/native/configurecompiler.cmake
+++ b/src/runtime/eng/native/configurecompiler.cmake
@@ -453,6 +453,15 @@ if (CLR_CMAKE_HOST_UNIX)
@@ -447,6 +447,15 @@ if (CLR_CMAKE_HOST_UNIX)
add_compile_options(-Wno-incompatible-ms-struct)
add_compile_options(-Wno-reserved-identifier)
@ -48,22 +49,49 @@ index 867e9ea9862e6..34fb9a51a7055 100644
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..ee41919ffaa6b 100644
index c24a90cf70409..95e92034e238f 100644
--- a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
+++ b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
@@ -109,6 +109,7 @@ elseif(CLR_CMAKE_HOST_UNIX)
@@ -100,10 +100,7 @@ elseif(CLR_CMAKE_HOST_UNIX)
mscordaccore
)
if(CLR_CMAKE_HOST_LINUX)
add_dependencies(mscordbi pal_redefines_file)
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--undefined-version")
endif(CLR_CMAKE_HOST_LINUX)
- # 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})
endif(CLR_CMAKE_HOST_WIN32)
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 395293a41784f..89c51af5645dd 100644
index c37885bf5691c..a632d993c0f2a 100644
--- a/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
+++ b/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
@@ -66,8 +66,8 @@ if(CLR_CMAKE_TARGET_WIN32)
@@ -65,8 +65,8 @@ if(CLR_CMAKE_TARGET_WIN32)
add_linker_flag("/DEF:${CMAKE_CURRENT_SOURCE_DIR}/singlefilehost.def")
else()
@ -102,74 +130,63 @@ index 1f9c517821855..18d5697e84580 100644
-__progname
-environ
From a95105f744a4e60a67a4b1258c1bae5d67d6a23d Mon Sep 17 00:00:00 2001
From: Adeel <3840695+am11@users.noreply.github.com>
Date: Fri, 3 Feb 2023 23:54:13 +0200
Subject: [PATCH 2/3] Remove a strange (one-of-a-kind) workaround
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 | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
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 ee41919ffaa6b..fccc4e7c6fa62 100644
index 95e92034e238f..c577651141e5c 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)
@@ -100,7 +100,21 @@ 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})
- 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)
From dced5d027248be11e8916a181b0f0358dcc1b086 Mon Sep 17 00:00:00 2001
From: Adeel <3840695+am11@users.noreply.github.com>
Date: Fri, 3 Feb 2023 02:05:49 +0200
Subject: [PATCH 3/3] Add thunk for PAL_{Unr,R}egisterModule
---
src/coreclr/dlls/mscordbi/CMakeLists.txt | 1 -
src/coreclr/dlls/mscordbi/mscordbi.cpp | 15 +++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
index fccc4e7c6fa62..95e92034e238f 100644
--- a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
+++ b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
@@ -106,7 +106,6 @@ elseif(CLR_CMAKE_HOST_UNIX)
if(CLR_CMAKE_HOST_LINUX)
add_dependencies(mscordbi pal_redefines_file)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--undefined-version")
endif(CLR_CMAKE_HOST_LINUX)
endif(CLR_CMAKE_HOST_WIN32)
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
index 891c01e144f5c..109fe6a5b5417 100644
index 109fe6a5b5417..891c01e144f5c 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)
@@ -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
-
-#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,25 +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/native/init-compiler.sh b/src/runtime/eng/common/native/init-compiler.sh
index 41a26d802..f81f3257f 100644
--- a/src/runtime/eng/common/native/init-compiler.sh
+++ b/src/runtime/eng/common/native/init-compiler.sh
@@ -135,7 +135,7 @@ fi
# Only lld version >= 9 can be considered stable
if [[ "$compiler" == "clang" && "$majorVersion" -ge 9 ]]; 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
--
2.37.1

View file

@ -1,28 +0,0 @@
diff --git a/src/runtime/eng/Subsets.props b/src/runtime/eng/Subsets.props
index cd5f39e..4addef7 100644
--- a/src/runtime/eng/Subsets.props
+++ b/src/runtime/eng/Subsets.props
@@ -35,7 +35,7 @@
<DefaultSubsets Condition="'$(TargetsMobile)' == 'true'">mono+libs+packs</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetsLinuxBionic)' == 'true'">mono+libs+host+packs</DefaultSubsets>
<!-- In source build, mono is only supported as primary runtime flavor. On Windows mono is supported for x86/x64 only. -->
- <DefaultSubsets Condition="('$(DotNetBuildFromSource)' == 'true' and '$(PrimaryRuntimeFlavor)' != 'Mono') or ('$(TargetOS)' == 'windows' and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'x64')">clr+libs+host+packs</DefaultSubsets>
+ <DefaultSubsets Condition="'$(PrimaryRuntimeFlavor)' != 'Mono' or ('$(TargetOS)' == 'windows' and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'x64')">clr+libs+host+packs</DefaultSubsets>
</PropertyGroup>
<!-- Init _subset here to allow RuntimeFlavor to be set as early as possible -->
diff --git a/src/runtime/eng/native/configurecompiler.cmake b/src/runtime/eng/native/configurecompiler.cmake
index 9090289..b37864c 100644
--- a/src/runtime/eng/native/configurecompiler.cmake
+++ b/src/runtime/eng/native/configurecompiler.cmake
@@ -575,6 +575,10 @@ endif(CLR_CMAKE_HOST_UNIX_ARMV6)
if(CLR_CMAKE_HOST_UNIX_X86)
add_compile_options(-msse2)
+ if(CLR_CMAKE_HOST_ALPINE_LINUX)
+ add_linker_flag(-Wl,-z,notext)
+ add_compile_options(-Wno-ignored-attributes)
+ endif()
endif()
if(CLR_CMAKE_HOST_UNIX)

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 b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
index 46850f9..e7d861e 100644
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
@@ -21,8 +21,6 @@
<_generateRuntimeGraphTargetFramework Condition="'$(MSBuildRuntimeType)' == 'core'">$(NetCoreAppToolCurrent)</_generateRuntimeGraphTargetFramework>
<_generateRuntimeGraphTargetFramework Condition="'$(MSBuildRuntimeType)' != 'core'">net472</_generateRuntimeGraphTargetFramework>
<_generateRuntimeGraphTask>$([MSBuild]::NormalizePath('$(BaseOutputPath)', $(Configuration), '$(_generateRuntimeGraphTargetFramework)', '$(AssemblyName).dll'))</_generateRuntimeGraphTask>
- <!-- 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>1</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,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

View file

@ -1,22 +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] fix-sdk-download
Sdk insists on downloading SDK rather than using previously unpacked ones.
This patch reverts to old behavior
---
diff --git a/src/sdk/eng/restore-toolset.sh b/src/sdk/eng/restore-toolset.sh
index 2426dac65b0..9e3f38f8536 100644
--- a/src/sdk/eng/restore-toolset.sh
+++ b/src/sdk/eng/restore-toolset.sh
@@ -7,7 +7,7 @@ function InitializeCustomSDKToolset {
# The following frameworks and tools are used only for testing.
# Do not attempt to install them in source build.
- if [[ $properties == *"ArcadeBuildFromSource=true"* ]]; then
+ if [[ "${DotNetBuildFromSource:-}" == "true" ]]; then
return
fi