-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fixes issue with linking lib_unwind on OpenBSD #5282
Fixes issue with linking lib_unwind on OpenBSD #5282
Conversation
src/callstack/lib_unwind.cr
Outdated
@@ -1,3 +1,6 @@ | |||
{% if flag?(:openbsd) %} | |||
@[Link("stdc++")] |
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.
Are we sure that libunwind doesn't exist as a seperate library to libstdc++
?
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
Yes, switching from GCC to clang by default is probably the reason it broke. I guess if you switch to GCC it links libgcc or something approaching. I'm not sure we have to link libstdc++. Maybe rely on libunwind? |
Looking at a binary linked on OpenBSD 6.0, I notice it linked to |
On FreeBSD 12 (LLVM 5.0 in base), Crystal links to
Did OpenBSD keep |
|
I booted an OpenBSD 6.2 box and found out that Unwind symbols are in Maybe we can just link |
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.
Presuming you've tested this, this is fine.
Yes, its been tested |
Thank you! |
Fixes #5280
I'm not sure but I think the problem may be related to OpenBSD's change of default compiler to Clang, and the update of LLVM to v5 in ports.