-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[compiler-rt] Avoid depending on the libnvmm header for NetBSD #153534
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
Use the system headers instead since we don't actually need anything from libnvmm; we only care about ioctls and related structures. This makes it possible to cross-compile TSan for NetBSD with zig cc which does not provide libnvmm when cross-compiling. I also removed a term.h include (ncurses) which appeared to be unnecessary and likewise prevented cross-compilation with zig cc from working.
|
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Alex Rønne Petersen (alexrp) ChangesUse the system headers instead since we don't actually need anything from libnvmm; we only care about ioctls and related structures. This makes it possible to cross-compile TSan for NetBSD with I also removed a Full diff: https://github.com/llvm/llvm-project/pull/153534.diff 1 Files Affected:
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cpp
index aacd28c55ceaa..435f3b2861dc9 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cpp
@@ -498,7 +498,6 @@ struct urio_command {
#include <md5.h>
#include <rmd160.h>
#include <soundcard.h>
-#include <term.h>
#include <termios.h>
#include <time.h>
#include <ttyent.h>
@@ -515,7 +514,7 @@ struct urio_command {
#include <stringlist.h>
#if defined(__x86_64__)
-#include <nvmm.h>
+#include <dev/nvmm/nvmm_ioctl.h>
#endif
// clang-format on
|
|
ping |
devnexen
left a comment
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.
lgtm
|
/cherry-pick 9ec771b |
|
/pull-request #155717 |
…153534) Use the system headers instead since we don't actually need anything from libnvmm; we only care about ioctls and related structures. This makes it possible to cross-compile TSan for NetBSD with `zig cc` which does not provide libnvmm when cross-compiling. I also removed a `term.h` include (ncurses) which appeared to be unnecessary and likewise prevented cross-compilation with `zig cc` from working. (cherry picked from commit 9ec771b)
Use the system headers instead since we don't actually need anything from libnvmm; we only care about ioctls and related structures.
This makes it possible to cross-compile TSan for NetBSD with
zig ccwhich does not provide libnvmm when cross-compiling.I also removed a
term.hinclude (ncurses) which appeared to be unnecessary and likewise prevented cross-compilation withzig ccfrom working.