-
-
Notifications
You must be signed in to change notification settings - Fork 22.5k
(Partially) fix compilation for OpenBSD
#101588
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
base: master
Are you sure you want to change the base?
Conversation
I'd say any fix should really be a complete one, especially if things depend on other, potentially controversial changes, or we risk going back and forth, at minimum the remaining fixes should have their own PR before this can be merged |
Well, if that's the case, I can easily cherry-pick the commits from those branches and integrate them into this one. I did it this way because as I said, I had to touch third party code and critical engine code, so I thought maybe having them separated would be better overall and more focused. |
Keeping them as separate commits would be great! But it's hard to review an incomplete PR |
OpenBSD
- P1OpenBSD
OK. I have merged all of the fixes into this branch for review. |
#elif defined(__OpenBSD__) | ||
#define JPH_PLATFORM_OPENBSD | ||
#elif defined(__APPLE__) |
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.
At some point upstream these changes to jolt.
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.
|
||
- Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git | ||
- Version: 5.15 | ||
- License: GPL-2 |
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.
- License: GPL-2 | |
- License: GPL-2 |
We can't include GPL-2 code.
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.
Note that the header included has the GPL-2.0-only WITH Linux-syscall-note
SPDX identifier. From what I can read that notes implies that system headers can be included with no issues and arguably, since these are all constants, this is permitted anyways. I do agree though that this entry could perhaps have some more clarification added.
https://spdx.org/licenses/Linux-syscall-note.html
NOTE! This copyright does not cover user programs that use kernel services by normal system calls - this is merely considered normal use of the kernel, and does not fall under the heading of "derived work". Also note that the GPL below is copyrighted by the Free Software Foundation, but the instance of code that it refers to (the Linux kernel) is copyrighted by me and others who actually wrote it.
Also note that the only valid version of the GPL as far as the kernel is concerned is this particular version of the license (ie v2, not v2.2 or v3.x or whatever), unless explicitly otherwise stated.
Linus Torvalds
This (partially) fixes #92130, implementing most of the recommended fixes. This touches a lot of systems and even critical engine code
variant.h
which that was a best-guess fix and probably not the best solution (so any help there would be great, not al all experienced touching core engine code).The TLDR of the fixes:
freebsd
, oropenbsd
, ornetbsd
, etc.).raycast
module.quick_exit
to OpenBSD's_Exit
where its used, see this comment.Directly includedCan't include GPL-v2 code.input-event-codes.h
from the Linux kernel. The rationale is that this saves us the hassle of having to figure out if the file is in the BSD variant and where (what I had to do for FreeBSD). Should be safe since the Wayland platform code is the only bit that uses it in all of Godot.Jolt
.variant.h
usingtype_traits
.Also, I could only get the export templates to compile, the compiler would crash compiling the file
editor/editor_translation.cpp
with aout of memory
error. Not sure why.