ayaports/user/dotnet6-build/build_13378-arm-build.patch

71 lines
3.6 KiB
Diff

From 75c3e74ea35219f257c80daf9a236e0f518a7875 Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/installer/pull/13378
From: Antoine Martin <dev@ayakael.net>
Date: Wed, 9 Mar 2022 20:16:03 +0000
Subject: [PATCH 1/1] arm support
By default, build does not support arm. This patch introduces all the logics
to parse platform information.
---
Directory.Build.props | 2 +-
repos/known-good.proj | 2 +-
repos/runtime.common.props | 2 +-
tools-local/init-build.proj | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 61cc6ff67..d921eda93 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -17,7 +17,7 @@
<PropertyGroup>
<Platform Condition="'$(Platform)' == 'AnyCPU'"></Platform>
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
- <Platform Condition="'$(Platform)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Platform>
+ <Platform Condition="'$(Platform)' == '' AND ( '$(BuildArchitecture)' == 'arm64' OR '$(BuildArchitecture)' == 'arm') ">$(BuildArchitecture)</Platform>
<Platform Condition="'$(Platform)' == '' AND '$(BuildArchitecture)' == 's390x'">$(BuildArchitecture)</Platform>
<Platform Condition="'$(Platform)' == ''">x64</Platform>
diff --git a/repos/known-good.proj b/repos/known-good.proj
index eab516290..c04cdac70 100644
--- a/repos/known-good.proj
+++ b/repos/known-good.proj
@@ -18,7 +18,7 @@
<RepositoryReference Include="runtime" />
</ItemGroup>
</When>
- <When Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64'">
+ <When Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64' AND '$(BuildArchitecture)' != 'arm'">
<ItemGroup>
<RepositoryReference Include="runtime" />
</ItemGroup>
diff --git a/repos/runtime.common.props b/repos/runtime.common.props
index b1e9e6adb..037c3d94a 100644
--- a/repos/runtime.common.props
+++ b/repos/runtime.common.props
@@ -13,7 +13,7 @@
<BuildCommandArgs>$(StandardSourceBuildArgs.Replace('-bl', '-nobl'))</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
- <BuildCommand Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64'">$(ArmEnvironmentVariables) $(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
+ <BuildCommand Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64' AND '$(BuildArchitecture)' != 'arm'">$(ArmEnvironmentVariables) $(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<CleanCommand>$(ProjectDirectory)/clean$(ShellExtension)</CleanCommand>
</PropertyGroup>
diff --git a/tools-local/init-build.proj b/tools-local/init-build.proj
index 701f76c0c..b2c3beed1 100644
--- a/tools-local/init-build.proj
+++ b/tools-local/init-build.proj
@@ -138,7 +138,7 @@
</Target>
<Target Name="GenerateRootFs" Condition="'$(OS)' != 'Windows_NT'">
- <Exec Condition="$(Platform.Contains('arm')) AND '$(Platform)' != 'armel' AND '$(BuildArchitecture)' != 'arm64'" Command="$(ArmEnvironmentVariables) $(ProjectDir)cross/build-rootfs.sh" />
+ <Exec Condition="$(Platform.Contains('arm')) AND '$(Platform)' != 'armel' AND '$(BuildArchitecture)' != 'arm64' AND '$(BuildArchitecture)' != 'arm'" Command="$(ArmEnvironmentVariables) $(ProjectDir)cross/build-rootfs.sh" />
<Exec Condition="'$(Platform)' == 'armel'" Command="$(ArmEnvironmentVariables) $(ProjectDir)cross/armel/tizen-build-rootfs.sh" />
</Target>
--
2.35.1