-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Support libspl build using llvm-libunwind #17230
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
@spauka |
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.
This is a great start. I didn't realise there was two different libunwinds, good to know!
I tested locally with libunwind-19, and it seems to do the right thing. It's not working with my gcc unwind, see review comments. I suspect probably it would make more sense to do that test in autoconf, where we can do more complicated tests.
I reckon not too far to go to get it over the line, good stuff!
Thanks so much for the detailed review. I appreciate your time helping me get started :) I agree that a configure time check is more appropriate - I'll make the changes and update in the next few days. |
This commit adds support for using llvm-libunwind for kernels built using llvm and clang. The two differences are that the largest register index is given by _LIBUNWIND_HIGHEST_DWARF_REGISTER, we need to check whether the register is a floating point register and the prototype for unw_regname takes the unwind cursor as the first argument. Signed-off-by: Sebastian Pauka <me@spauka.se>
@robn The latest revision moves the test into the configure file, which tests for the It builds successfully using both on my system, let me know if there are any other changes you would suggest. P.S. I read the style guide as suggesting a force-push to maintain a single commit per PR, did I read this correctly? |
Correct - single commits are the easiest to merge and cherry-pick back to point releases. We don't forbid multi-commit PRs though. A PR this small makes sense as a single commit. |
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.
Sorry for the delay! This looks really good. I've only done light testing, but it seems to compile and work ok with both kinds of libunwind locally, and on FreeBSD with neither around. Good stuff!
This commit adds support for using llvm-libunwind for kernels built using llvm and clang. The two differences are that the largest register index is given by _LIBUNWIND_HIGHEST_DWARF_REGISTER, we need to check whether the register is a floating point register and the prototype for unw_regname takes the unwind cursor as the first argument. Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Sebastian Pauka <me@spauka.se> Closes openzfs#17230
This commit adds support for using llvm-libunwind for kernels built using llvm and clang. The two differences are that the largest register index is given by _LIBUNWIND_HIGHEST_DWARF_REGISTER, we need to check whether the register is a floating point register and the prototype for unw_regname takes the unwind cursor as the first argument. Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Sebastian Pauka <me@spauka.se> Closes openzfs#17230 (cherry picked from commit 1b4826b)
This commit adds support for using llvm-libunwind for kernels built using llvm and clang. The two differences are that the largest register index is given by _LIBUNWIND_HIGHEST_DWARF_REGISTER, we need to check whether the register is a floating point register and the prototype for unw_regname takes the unwind cursor as the first argument. Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Sebastian Pauka <me@spauka.se> Closes openzfs#17230 (cherry picked from commit 1b4826b)
This commit adds support for using llvm-libunwind for kernels built using llvm and clang. The two differences are that the largest register index is given by _LIBUNWIND_HIGHEST_DWARF_REGISTER, we need to check whether the register is a floating point register and the prototype for unw_regname takes the unwind cursor as the first argument. Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Sebastian Pauka <me@spauka.se> Closes #17230 (cherry picked from commit 1b4826b)
Motivation and Context
This commit adds support for using llvm-libunwind for kernels built using llvm and clang. In particular, some clang versions will link to llvm-libunwind which has some small differences compared to gcc-libunwind that will prevent zfs from building.
Description
The two differences are that the largest register index is given by _LIBUNWIND_HIGHEST_DWARF_REGISTER, we need to check whether the register is a floating point register and the prototype for unw_regname takes the unwind cursor as the first argument.
How Has This Been Tested?
Built and ran zfs on aarch64. Tested the changes to libspl manually using a small test c program, but didn't cause an assertion failure on the loaded module.
Types of changes
Checklist:
Signed-off-by
.