Skip to content
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

Add initial support for FreeBSD.arm64 #71486

Merged
merged 29 commits into from
Jan 10, 2023
Merged

Add initial support for FreeBSD.arm64 #71486

merged 29 commits into from
Jan 10, 2023

Conversation

sec
Copy link
Contributor

@sec sec commented Jun 30, 2022

Based on discussion started in #71338, this PR integrate changes needed to start building runtime for FreeBSD arm64 (aka aarch64) host. Work is still in progress, but it would be nice to hear any feedback if changes are done in alignment with current build system.

cc @wfurt @Thefrank @janvorli @am11

@sec sec requested a review from marek-safar as a code owner June 30, 2022 12:39
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Jun 30, 2022
@am11
Copy link
Member

am11 commented Jun 30, 2022

@sec, great progress!

Please revert eng/native/configuretools.cmake changes as they are not needed after #71446.

Q: Do we want to add FreeBSD 12 RID as well? We are adding support for both 12 and 13 in arcade.

@sec
Copy link
Contributor Author

sec commented Jun 30, 2022

Changes reverted. As for 12 vs 13 - starting from 13, arm64 is Tier1 support, 12 is Tier2 - don't know if the question was to me though :)

@wfurt wfurt requested review from janvorli and am11 and removed request for marek-safar June 30, 2022 13:31
@wfurt wfurt added the os-freebsd FreeBSD OS label Jun 30, 2022
Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally looks good to me but it seems to break current FreeBSD pipeline....

@sec
Copy link
Contributor Author

sec commented Jun 30, 2022

generally looks good to me but it seems to break current FreeBSD pipeline....

Looks like fixed by c0c5dea :)

@sec sec closed this Jun 30, 2022
@sec sec reopened this Jun 30, 2022
Copy link
Member

@am11 am11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👍

@sec
Copy link
Contributor Author

sec commented Jun 30, 2022

Would it also be OK to include those changes - https://gist.github.com/sec/150cda0763a2b9ddc45429ee942ff3c0 - they add arm64 RID is similar places as freebsd-x64 ones and also bring back crossgen2 package generation for FreeBSD which was disabled in recent commits (maybe there was a reason for that - introduced in here 7ff3ac6#diff-115c40d5f6cdfb8ebea1490c13581e76b60c3430cbf13f45c270fc5ec383daff) ?

@am11
Copy link
Member

am11 commented Jun 30, 2022

I think it is reasonable to include those changes. crossgen2 build now has three modes, one of which is selected based on the platform:

  • NativeAOT - build compiles clr, nativeaot and crossgen2 then publishes CG2 with -p:PublishAot=true.
  • SingleFile - on platforms where NativeAOT is not yet supported (macOS, FreeBSD, illumos), build compiles clr, nativeaot and CG2 then publishes CG2 with -p:PublishSingleFile=true.
  • Disabled: on platforms where CG2 is not yet ported (illumos), build skips CG2 and steps which depend on CG2 altogether.

On FreeBSD, we should be publishing CG2 as a singlefilehost executable.

@am11
Copy link
Member

am11 commented Jun 30, 2022

You can also enable CG2 in a separate PR, if you want (will give you more time to test with docker image, once dotnet/arcade#9834 is merged and dotnet/dotnet-buildtools-prereqs-docker produces the image).

@sec
Copy link
Contributor Author

sec commented Oct 6, 2022

Doing simple return 0 inside this method also makes SDK work, but, does this block this changes to be merged? It's still not supported, same as x64.

@Thefrank I can provide you SSH access to real ARM64 box with FreeBSD on it - if you have time, just email me public key and I will get you up and running :)

@sec
Copy link
Contributor Author

sec commented Jan 6, 2023

Any chance to get this merged, shouldn't break anything, but will help me having arm64 builds in sync without doing constant merge/conflicts fix between branches :) ?

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you! I am sorry for the long delay.

@janvorli
Copy link
Member

janvorli commented Jan 6, 2023

I'm re-running the CI tests to get it green so that it can be merged.

@janvorli janvorli closed this Jan 6, 2023
@janvorli janvorli reopened this Jan 6, 2023
@sec
Copy link
Contributor Author

sec commented Jan 7, 2023

@janvorli Thanks! I see there are some failures regarding --targetos, something I broke, pushed change that should fix that.

edit: looks like fixed, builds are green :)

@sec sec changed the title Add initial support for Freebsd.arm64 Add initial support for FreeBSD.arm64 Jan 7, 2023
@sec
Copy link
Contributor Author

sec commented Jan 10, 2023

Is there anything more needed in this PR to make it happen, @MichalStrehovsky?

@MichalStrehovsky
Copy link
Member

Is there anything more needed in this PR to make it happen, @MichalStrehovsky?

I'm only pinged as a code owner because of the change to src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets. That change looks okay to me although I don't understand why we need it without #80323 (those targets are NativeAOT specific).

@janvorli janvorli merged commit 4ece8f0 into dotnet:main Jan 10, 2023
@teo-tsirpanis teo-tsirpanis added this to the 8.0.0 milestone Jan 10, 2023
jkotas added a commit to jkotas/runtime that referenced this pull request Jan 18, 2023
mdh1418 pushed a commit to mdh1418/runtime that referenced this pull request Jan 24, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 10, 2023
@sec sec deleted the freebsd.arm64 branch February 18, 2024 12:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 area-PAL-coreclr community-contribution Indicates that the PR has been added by a community member os-freebsd FreeBSD OS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants