-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
further haiku support initial compile and link #8862
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
Conversation
| } | ||
| }, | ||
| .linux, .netbsd, .freebsd, .dragonfly, .openbsd => struct { | ||
| .linux, .netbsd, .freebsd, .dragonfly, .openbsd, .haiku => struct { |
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.
You won't get any meaningful stack trace until getModuleForAddress is implemented using get_next_image_info.
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.
Good point, that has been an item I have been planning to get to (most likely as a separate item).
src/link/Elf.zig
Outdated
| } else { | ||
| break :o "crt1.o"; | ||
| } | ||
| } else if (target.os.tag == .haiku) { |
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.
Depending on which PR is merged first this conflicts with #8730 or the other way around.
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.
Thank you for the heads up on this. I will keep an eye out and handle updating the PR if needed.
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.
Thanks, both of you. #8730 is merged now. Once this is rebased I think it is ready to be merged. Nice progress on Haiku support!
b33a4e8 to
f342dee
Compare
* for some reason part of the linkable bits for the crt libraries are split in different locations for haiku. this changeset accomodates this situation (crtbegin_dir lookup)
f342dee to
156b968
Compare
|
hi @hoanga - the 0.8.0 release is on June 4 (in 5 days from now). Would you like me to put anything about Haiku into the release notes? If so, please type up some release notes as a comment below, and I will copy+paste it into the Zig 0.8.0 release notes 🙂 |
|
hi @andrewrk, my deepest apologies on not getting back in time regarding your question about including Haiku support for the new release (big congrats btw! wish i was available for the party). the notes as added, are just fine as far as i can see. i really appreciate the added note about Haiku support and hoping to get it even more ready in the future! |
Hello again,
I have made some more progress in getting Zig to work under Haiku. The following changes should get Zig to compile and build a (simple) Zig program that runs under Haiku. This is compiled with a llvm12 installation (can use pkgman under Haiku for this. relevant packages are llvm12, llvm12_clang, llvm12_libs, llvm12_lld). This was tested on nightly build hrev55081.
Things I have been able to confirm now functional that wasn't previously (previous commands that were working under Haiku should still be):
When running zig build on a sample project I am seeing an error returned along the lines of Unable to dump stack trace: Unable to open debug info: UnsupportedDebugInfo which is to be expected at this time. This most likely also affects make install target as well.
This update also adds an extra returned parameter when running zig libc (crtbegin_dir) to note the extra directory that needs to be returned for what appears to be other bits of the c runtime for Haiku. I am not sure about this change but verified that it is functional at the moment. I would be open to suggestions to better approaches for handling this.