about summary refs log tree commit diff homepage
path: root/scripts/build
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2018-08-09 21:58:07 +0100
committerMartinNowack <martin.nowack@gmail.com>2018-09-06 11:56:40 +0100
commitd2285e097656936c866ae6518e0a496cf4499517 (patch)
treed4a51460f32c9827888510638458a01279c663f2 /scripts/build
parent21380e5201f235a5f9ee9676785d08d39743aa4e (diff)
downloadklee-d2285e097656936c866ae6518e0a496cf4499517.tar.gz
llvm36.patch: fix build for newer glibc/gcc versions
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/patches/llvm36.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/scripts/build/patches/llvm36.patch b/scripts/build/patches/llvm36.patch
new file mode 100644
index 00000000..b5b84b09
--- /dev/null
+++ b/scripts/build/patches/llvm36.patch
@@ -0,0 +1,39 @@
+diff --git include/llvm/IR/ValueMap.h include/llvm/IR/ValueMap.h
+index f2ea405f..a1ab2a50 100644
+--- include/llvm/IR/ValueMap.h
++++ include/llvm/IR/ValueMap.h
+@@ -104 +104 @@ public:
+-  bool hasMD() const { return MDMap; }
++  bool hasMD() const { return bool(MDMap); }
+diff --git projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
+index 0e776b90..5088f2d0 100644
+--- projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
++++ projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
+@@ -588,2 +588 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
+-uptr internal_sigaltstack(const struct sigaltstack *ss,
+-                         struct sigaltstack *oss) {
++uptr internal_sigaltstack(const void *ss, void *oss) {
+diff --git projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.h projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.h
+index 3013c25f..d7d4db89 100644
+--- projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.h
++++ projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.h
+@@ -23 +22,0 @@ struct link_map;  // Opaque type returned by dlopen().
+-struct sigaltstack;
+@@ -32,2 +31 @@ uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
+-uptr internal_sigaltstack(const struct sigaltstack* ss,
+-                          struct sigaltstack* oss);
++uptr internal_sigaltstack(const void* ss, void* oss);
+diff --git projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+index d20b5248..33894054 100644
+--- projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
++++ projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+@@ -239 +239 @@ static int TracerThread(void* argument) {
+-  struct sigaltstack handler_stack;
++  stack_t handler_stack;
+diff --git projects/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc projects/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
+index 4dcfa558..8ce75be1 100644
+--- projects/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
++++ projects/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
+@@ -358 +358 @@ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+-  __res_state *statp = (__res_state*)state;
++  struct __res_state *statp = (struct __res_state*)state;