-
Notifications
You must be signed in to change notification settings - Fork 138
Initial support for FreeBSD. #1362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
aca9dc8
9471b34
f9f3d45
8fefb1a
c9bf890
34d7398
d1dbb1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| From 457e4bcc40228d64bb98c4e35937d31b4cc76599 Mon Sep 17 00:00:00 2001 | ||
| From: Tomas Weinfurt <[email protected]> | ||
| Date: Wed, 13 Nov 2019 22:32:02 -0800 | ||
| Subject: [PATCH] Add FreeBSD | ||
|
|
||
| --- | ||
| Directory.Build.props | 2 ++ | ||
| 1 file changed, 2 insertions(+) | ||
|
|
||
| diff --git a/Directory.Build.props b/Directory.Build.props | ||
| index 80e6bb14f0..76b1b4451b 100644 | ||
| --- a/Directory.Build.props | ||
| +++ b/Directory.Build.props | ||
| @@ -115,6 +115,7 @@ | ||
| <PropertyGroup> | ||
| <TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Windows'))">win</TargetOsName> | ||
| <TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">osx</TargetOsName> | ||
| + <TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('FreeBSD'))">freebsd</TargetOsName> | ||
| <TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Linux'))">linux</TargetOsName> | ||
| <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture> | ||
| <TargetRuntimeIdentifier>$(TargetOsName)-$(TargetArchitecture)</TargetRuntimeIdentifier> | ||
| @@ -125,6 +126,7 @@ | ||
| win-x86; | ||
| win-arm; | ||
| osx-x64; | ||
| + freebsd-x64; | ||
| linux-musl-x64; | ||
| linux-musl-arm64; | ||
| linux-x64; | ||
| -- | ||
| 2.23.0 | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| From 9847f667b05b577cf98f92cb32f38beff95ea504 Mon Sep 17 00:00:00 2001 | ||
| From: Tomas Weinfurt <[email protected]> | ||
| Date: Wed, 13 Nov 2019 00:53:31 -0800 | ||
| Subject: [PATCH] add freebsd support | ||
|
|
||
| --- | ||
| src/Directory.Build.props | 4 ++-- | ||
| src/pkg/projects/netcoreappRIDs.props | 1 + | ||
| 3 files changed, 4 insertions(+), 5 deletions(-) | ||
|
|
||
| diff --git a/src/Directory.Build.props b/src/Directory.Build.props | ||
| index c22e11fa..1fc24b41 100644 | ||
| --- a/src/Directory.Build.props | ||
| +++ b/src/Directory.Build.props | ||
| @@ -12,7 +12,7 @@ | ||
| <CrossGenSymbolExtension>.map</CrossGenSymbolExtension> | ||
| <CrossGenSymbolExtension Condition="'$(OSGroup)' == 'Windows_NT'">.ni.pdb</CrossGenSymbolExtension> | ||
| <!-- OSX doesn't have crossgen symbols, yet --> | ||
| - <CrossGenSymbolExtension Condition="'$(OSGroup)' == 'OSX'"></CrossGenSymbolExtension> | ||
| + <CrossGenSymbolExtension Condition="'$(OSGroup)' == 'OSX' OR '$(OSGroup)' == 'FreeBSD'"></CrossGenSymbolExtension> | ||
| </PropertyGroup> | ||
|
|
||
| -</Project> | ||
| \ No newline at end of file | ||
| +</Project> | ||
| diff --git a/src/pkg/projects/netcoreappRIDs.props b/src/pkg/projects/netcoreappRIDs.props | ||
| index 7483d182..5561842f 100644 | ||
| --- a/src/pkg/projects/netcoreappRIDs.props | ||
| +++ b/src/pkg/projects/netcoreappRIDs.props | ||
| @@ -35,6 +35,7 @@ | ||
| <!-- The following RIDs are not officically supported and are not | ||
| built during official builds, however we wish to include them | ||
| in our runtime.json to enable others to provide them. --> | ||
| + <UnofficialBuildRID Include="freebsd-x64" /> | ||
| <UnofficialBuildRID Include="tizen.4.0.0-armel"> | ||
| <Platform>armel</Platform> | ||
| </UnofficialBuildRID> | ||
| -- | ||
| 2.23.0 | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| From 63218afeff61a044c6482c5cd119a17bdb59de09 Mon Sep 17 00:00:00 2001 | ||
| From: Tomas Weinfurt <[email protected]> | ||
| Date: Wed, 13 Nov 2019 14:07:57 -0800 | ||
| Subject: [PATCH] Fix OSGroup on FreeBSD | ||
|
|
||
| --- | ||
| Directory.Build.props | 1 + | ||
| 1 file changed, 1 insertion(+) | ||
|
|
||
| diff --git a/Directory.Build.props b/Directory.Build.props | ||
| index 890012bf..a2539d51 100644 | ||
| --- a/Directory.Build.props | ||
| +++ b/Directory.Build.props | ||
| @@ -111,6 +111,7 @@ | ||
| --> | ||
| <PropertyGroup> | ||
| <OSGroup Condition="'$(OS)'=='Unix' AND Exists('/Applications')">OSX</OSGroup> | ||
| + <OSGroup Condition="'$(OS)'=='Unix' and $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</OSGroup> | ||
| <OSGroup Condition="'$(OSGroup)' == ''">$(OS)</OSGroup> | ||
| </PropertyGroup> | ||
|
|
||
| -- | ||
| 2.23.0 | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,196 @@ | ||
| From 32d103eecf9d1e9648e6b1ed063860fed00bcc8f Mon Sep 17 00:00:00 2001 | ||
| From: Tomas Weinfurt <[email protected]> | ||
| Date: Thu, 24 Oct 2019 10:19:39 -0700 | ||
| Subject: [PATCH] add entries for new FreeBSD releases (#41794) | ||
|
|
||
| --- | ||
| .../runtime.compatibility.json | 81 +++---------------- | ||
| pkg/Microsoft.NETCore.Platforms/runtime.json | 38 ++------- | ||
| .../runtimeGroups.props | 2 +- | ||
| 3 files changed, 22 insertions(+), 99 deletions(-) | ||
|
|
||
| diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json | ||
| index 1e5c380a7a6a..2a196ecc9fc7 100644 | ||
| --- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json | ||
| +++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json | ||
| @@ -984,17 +984,17 @@ | ||
| "any", | ||
| "base" | ||
| ], | ||
| - "freebsd.11.0": [ | ||
| - "freebsd.11.0", | ||
| + "freebsd.12": [ | ||
| + "freebsd.12", | ||
| "freebsd.11", | ||
| "freebsd", | ||
| "unix", | ||
| "any", | ||
| "base" | ||
| ], | ||
| - "freebsd.11.0-x64": [ | ||
| - "freebsd.11.0-x64", | ||
| - "freebsd.11.0", | ||
| + "freebsd.12-x64": [ | ||
| + "freebsd.12-x64", | ||
| + "freebsd.12", | ||
| "freebsd.11-x64", | ||
| "freebsd.11", | ||
| "freebsd-x64", | ||
| @@ -1004,75 +1004,20 @@ | ||
| "any", | ||
| "base" | ||
| ], | ||
| - "freebsd.11.1": [ | ||
| - "freebsd.11.1", | ||
| - "freebsd.11.0", | ||
| + "freebsd.13": [ | ||
| + "freebsd.13", | ||
| + "freebsd.12", | ||
| "freebsd.11", | ||
| "freebsd", | ||
| "unix", | ||
| "any", | ||
| "base" | ||
| ], | ||
| - "freebsd.11.1-x64": [ | ||
| - "freebsd.11.1-x64", | ||
| - "freebsd.11.1", | ||
| - "freebsd.11.0-x64", | ||
| - "freebsd.11.0", | ||
| - "freebsd.11-x64", | ||
| - "freebsd.11", | ||
| - "freebsd-x64", | ||
| - "freebsd", | ||
| - "unix-x64", | ||
| - "unix", | ||
| - "any", | ||
| - "base" | ||
| - ], | ||
| - "freebsd.11.2": [ | ||
| - "freebsd.11.2", | ||
| - "freebsd.11.1", | ||
| - "freebsd.11.0", | ||
| - "freebsd.11", | ||
| - "freebsd", | ||
| - "unix", | ||
| - "any", | ||
| - "base" | ||
| - ], | ||
| - "freebsd.11.2-x64": [ | ||
| - "freebsd.11.2-x64", | ||
| - "freebsd.11.2", | ||
| - "freebsd.11.1-x64", | ||
| - "freebsd.11.1", | ||
| - "freebsd.11.0-x64", | ||
| - "freebsd.11.0", | ||
| - "freebsd.11-x64", | ||
| - "freebsd.11", | ||
| - "freebsd-x64", | ||
| - "freebsd", | ||
| - "unix-x64", | ||
| - "unix", | ||
| - "any", | ||
| - "base" | ||
| - ], | ||
| - "freebsd.11.3": [ | ||
| - "freebsd.11.3", | ||
| - "freebsd.11.2", | ||
| - "freebsd.11.1", | ||
| - "freebsd.11.0", | ||
| - "freebsd.11", | ||
| - "freebsd", | ||
| - "unix", | ||
| - "any", | ||
| - "base" | ||
| - ], | ||
| - "freebsd.11.3-x64": [ | ||
| - "freebsd.11.3-x64", | ||
| - "freebsd.11.3", | ||
| - "freebsd.11.2-x64", | ||
| - "freebsd.11.2", | ||
| - "freebsd.11.1-x64", | ||
| - "freebsd.11.1", | ||
| - "freebsd.11.0-x64", | ||
| - "freebsd.11.0", | ||
| + "freebsd.13-x64": [ | ||
| + "freebsd.13-x64", | ||
| + "freebsd.13", | ||
| + "freebsd.12-x64", | ||
| + "freebsd.12", | ||
| "freebsd.11-x64", | ||
| "freebsd.11", | ||
| "freebsd-x64", | ||
| diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json | ||
| index b2f286ea2479..e70f2da7e668 100644 | ||
| --- a/pkg/Microsoft.NETCore.Platforms/runtime.json | ||
| +++ b/pkg/Microsoft.NETCore.Platforms/runtime.json | ||
| @@ -510,48 +510,26 @@ | ||
| "freebsd-x64" | ||
| ] | ||
| }, | ||
| - "freebsd.11.0": { | ||
| + "freebsd.12": { | ||
| "#import": [ | ||
| "freebsd.11" | ||
| ] | ||
| }, | ||
| - "freebsd.11.0-x64": { | ||
| + "freebsd.12-x64": { | ||
| "#import": [ | ||
| - "freebsd.11.0", | ||
| + "freebsd.12", | ||
| "freebsd.11-x64" | ||
| ] | ||
| }, | ||
| - "freebsd.11.1": { | ||
| + "freebsd.13": { | ||
| "#import": [ | ||
| - "freebsd.11.0" | ||
| + "freebsd.12" | ||
| ] | ||
| }, | ||
| - "freebsd.11.1-x64": { | ||
| + "freebsd.13-x64": { | ||
| "#import": [ | ||
| - "freebsd.11.1", | ||
| - "freebsd.11.0-x64" | ||
| - ] | ||
| - }, | ||
| - "freebsd.11.2": { | ||
| - "#import": [ | ||
| - "freebsd.11.1" | ||
| - ] | ||
| - }, | ||
| - "freebsd.11.2-x64": { | ||
| - "#import": [ | ||
| - "freebsd.11.2", | ||
| - "freebsd.11.1-x64" | ||
| - ] | ||
| - }, | ||
| - "freebsd.11.3": { | ||
| - "#import": [ | ||
| - "freebsd.11.2" | ||
| - ] | ||
| - }, | ||
| - "freebsd.11.3-x64": { | ||
| - "#import": [ | ||
| - "freebsd.11.3", | ||
| - "freebsd.11.2-x64" | ||
| + "freebsd.13", | ||
| + "freebsd.12-x64" | ||
| ] | ||
| }, | ||
| "gentoo": { | ||
| diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props | ||
| index eeb8130b54fb..6c95b67819be 100644 | ||
| --- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props | ||
| +++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props | ||
| @@ -99,7 +99,7 @@ | ||
| <RuntimeGroup Include="freebsd"> | ||
| <Parent>unix</Parent> | ||
| <Architectures>x64</Architectures> | ||
| - <Versions>11;11.0;11.1;11.2;11.3</Versions> | ||
| + <Versions>11;12;13</Versions> | ||
| </RuntimeGroup> | ||
|
|
||
| <!-- rhel 6 is independent --> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| From ef90f9473a5b2b24d9c1a523aefa7d6478bd3335 Mon Sep 17 00:00:00 2001 | ||
| From: Tomas Weinfurt <[email protected]> | ||
| Date: Tue, 12 Nov 2019 13:24:37 -0800 | ||
| Subject: [PATCH] do not fail on test chmod | ||
|
|
||
| --- | ||
| external/runtime/runtime.depproj | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/external/runtime/runtime.depproj b/external/runtime/runtime.depproj | ||
| index 3ce0ed89bc..1298019efd 100644 | ||
| --- a/external/runtime/runtime.depproj | ||
| +++ b/external/runtime/runtime.depproj | ||
| @@ -60,7 +60,7 @@ | ||
| SkipUnchangedFiles="true" | ||
| UseHardlinksIfPossible="$(UseHardlink)" /> | ||
|
|
||
| - <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension)" Condition="'$(OS)' != 'Windows_NT'"/> | ||
| + <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension) || true" Condition="'$(OS)' != 'Windows_NT'"/> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (In foreseeable future) Would it be possible to prepare TestHostRoot directory before executing the I had to figure out what constituents are required in this directory to execute corefx tests.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This normally comes from TestHost and matching runtime entry. The problem is that if you get standard package (or if it lives in your nuget cache) it does not have platform reference and then dotnet is not restored and chmod fails. |
||
|
|
||
| <Copy SourceFiles="@(HostSdkFile)" | ||
| DestinationFolder="$(TestHostRootPath)sdk\$(DotNetVersion)\%(RecursiveDir)" | ||
| -- | ||
| 2.23.0 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| From 1e30a5ac24a020a16848d535a5905b192371203b Mon Sep 17 00:00:00 2001 | ||
| From: Adeel Mujahid <[email protected]> | ||
| Date: Fri, 15 Nov 2019 02:33:07 +0200 | ||
| Subject: [PATCH] P/invoke Kernel32.dll only on Windows (#7858) | ||
|
|
||
| --- | ||
| src/fsharp/lib.fs | 5 +++-- | ||
| 1 file changed, 3 insertions(+), 2 deletions(-) | ||
|
|
||
| diff --git a/src/fsharp/lib.fs b/src/fsharp/lib.fs | ||
| index 6c4599f8a..2cec1e666 100755 | ||
| --- a/src/fsharp/lib.fs | ||
| +++ b/src/fsharp/lib.fs | ||
| @@ -4,6 +4,7 @@ module internal FSharp.Compiler.Lib | ||
|
|
||
| open System.IO | ||
| open System.Collections.Generic | ||
| +open System.Runtime.InteropServices | ||
| open Internal.Utilities | ||
| open FSharp.Compiler.AbstractIL | ||
| open FSharp.Compiler.AbstractIL.Internal | ||
| @@ -515,7 +516,7 @@ module UnmanagedProcessExecutionOptions = | ||
| // Translation of C# from http://swikb/v1/DisplayOnlineDoc.aspx?entryID=826 and copy in bug://5018 | ||
| [<System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true)>] | ||
| let EnableHeapTerminationOnCorruption() = | ||
| - if (System.Environment.OSVersion.Version.Major >= 6 && // If OS is Vista or higher | ||
| + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && System.Environment.OSVersion.Version.Major >= 6 && // If OS is Vista or higher | ||
| System.Environment.Version.Major < 3) then // and CLR not 3.0 or higher | ||
| // "The flag HeapSetInformation sets is available in Windows XP SP3 and later. | ||
| // The data structure used for heap information is available on earlier versions of Windows. | ||
| @@ -544,4 +545,4 @@ module StackGuard = | ||
|
|
||
| let EnsureSufficientExecutionStack recursionDepth = | ||
| if recursionDepth > MaxUncheckedRecursionDepth then | ||
| - RuntimeHelpers.EnsureSufficientExecutionStack () | ||
| \ No newline at end of file | ||
| + RuntimeHelpers.EnsureSufficientExecutionStack () | ||
| -- | ||
| 2.23.0 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has someone from corefx looked at this change? We are (or were) hitting this on Fedora 32 and Arch Linux as well: #1310 (comment). Maybe this should be merged into corefx if it's the correct general fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that is my plan. but I'll do it after repo merge. I did testing and we don't need it at all any more. The dotnet is executable as it should on its own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the build work without this change? I wouldn't expect test code to be getting hit in our normal build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crummel The build fails here for Fedora 32 and Arch Linux too: #1310 (comment). This code path is definitely invoked in source-build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it does not build @crummel
It seems like it got moved to Arcade in master.
I'll take a look after repo merge is over.
cc: @safern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW I think this is old time paranoia when we did not know how to set and preserve executable bits on Unix.