[PATCH] D157189: [llvm-exegesis] Don't try to use SYS_rseq if it's not defined.
Romain Geissler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 5 03:38:41 PDT 2023
Romain-Geissler-1A created this revision.
Romain-Geissler-1A added reviewers: MaskRay, aidengrossman, courbet.
Herald added a subscriber: mstojanovic.
Herald added a project: All.
Romain-Geissler-1A requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
When compiling against recent glibc (>= 2.35) but old kernel headers (< 4.18), `SYS_rseq` is not defined and thus llvm-exegesis fails to build. So also check that `SYS_rseq` is defined before trying to use it.
Fixes https://github.com/llvm/llvm-project/issues/64456
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D157189
Files:
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
Index: llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
===================================================================
--- llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
@@ -41,7 +41,7 @@
#if defined(__GLIBC__) && __has_include(<sys/rseq.h>) && defined(HAVE_BUILTIN_THREAD_POINTER)
#include <sys/rseq.h>
-#ifdef RSEQ_SIG
+#if defined(RSEQ_SIG) && defined(SYS_rseq)
#define GLIBC_INITS_RSEQ
#endif
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157189.547471.patch
Type: text/x-patch
Size: 471 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230805/af071f6e/attachment.bin>
More information about the llvm-commits
mailing list