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
more haiku support #10073
more haiku support #10073
Conversation
patches applied to (zig-bootstrap) LLVM |
CI is failing on |
CC @waddlesplash who gave me permission on IRC to ask for help reviewing :-) |
oops, sorry about the fmt miss. i have gone through and double checked that all files that have been changed have had fmt applied to them and pushed updates, hopefully CI will find that more agreeable. |
lib/std/c/haiku.zig
Outdated
@@ -535,9 +569,6 @@ pub const O = struct { | |||
pub const RDWR = 0x0002; | |||
pub const ACCMODE = 0x0003; | |||
|
|||
pub const SHLOCK = 0x0010; | |||
pub const EXLOCK = 0x0020; | |||
|
|||
pub const CREAT = 0x0200; | |||
pub const EXCL = 0x0800; | |||
pub const NOCTTY = 0x8000; |
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.
These constants, also, do not seem to properly correspond to ours. They should probably all be fixed. (I think a lot of the constants not touched in these commits have similar problems, maybe a general review of the constants in this file is in order.)
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.
see above
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.
updated
Let's please correct all the constants in this PR, and delete any constants that have not been audited. I don't want any incorrect haiku constants in the zig standard library. Let me know when that's done and I'll look into merging the PR. |
thank you for the feedback. when i get some time (hopefully this weekend), i will try to look over the constants and get some updates in. |
* add team_info, area_info * update signature for get_next_image_info * add error checks for haiku system calls * update and cleanup of haiku constants
f9c9ccf
to
4ec8313
Compare
have went through and cleaned up as many of the constants so they should match the haiku definitions that i could find. i think it is ready for review (assuming the build is okay with it too) |
Thanks @hoanga! |
Hello and happy halloween!
I was able to finally get some time to sit down and do some more continued work on improving Haiku support for Zig. The following changesets should allow
zig build in a (simple) zig project works
Running make install to install Zig after compiling probably doesn't work and is on the list of things todo. Debug still remains on the open list of items to tackle at some point but wanted to attempt with smaller changesets. Also included in the changes are some better error checking for some syscalls to Haiku and an attempted cleanup of some defines and constants in the Haiku support section that came across from an older copy and paste.
Getting Zig to compile on Haiku also meant using the current used version of LLVM (13) which is currently a (hopefully) pending port for Haiku. I am attaching some patches that I used to get LLVM to build on Haiku as well for reference but not including it in the PR changesets directly.
Sample Runs