commit 3a980ab4bd71d83f5524270baf598f4864e43c32
Author: Jan Rękorajski <bagg...@pld-linux.org>
Date:   Mon Feb 19 14:54:53 2018 +0100

    - fix building with latest glibc https://reviews.llvm.org/D35246

 D35246.diff | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 llvm.spec   |  2 ++
 2 files changed, 68 insertions(+)
---
diff --git a/llvm.spec b/llvm.spec
index 57a76ac..2e5359a 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -49,6 +49,7 @@ Patch2:               libdir.patch
 Patch3:                x32-gcc-toolchain.patch
 Patch4:                cmake-buildtype.patch
 Patch5:                %{name}-ocaml-shared.patch
+Patch6:                D35246.diff
 URL:           http://llvm.org/
 BuildRequires: bash
 BuildRequires: bison
@@ -506,6 +507,7 @@ Dokumentacja HTML wiÄ…zania OCamla do LLVM-a.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p0
 
 grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
        s,^#!.*bin/env python,#!%{__python},
diff --git a/D35246.diff b/D35246.diff
new file mode 100644
index 0000000..2b9ee56
--- /dev/null
+++ b/D35246.diff
@@ -0,0 +1,66 @@
+--- projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.h
++++ projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.h
+@@ -21,17 +21,15 @@
+ #include "sanitizer_platform_limits_posix.h"
+ 
+ struct link_map;  // Opaque type returned by dlopen().
+-struct sigaltstack;
+ 
+ namespace __sanitizer {
+ // Dirent structure for getdents(). Note that this structure is different from
+ // the one in <dirent.h>, which is used by readdir().
+ struct linux_dirent;
+ 
+ // Syscall wrappers.
+ 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);
+ uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
+     __sanitizer_sigset_t *oldset);
+ 
+--- projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
++++ projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
+@@ -631,8 +631,7 @@
+ }
+ #endif
+ 
+-uptr internal_sigaltstack(const struct sigaltstack *ss,
+-                         struct sigaltstack *oss) {
++uptr internal_sigaltstack(const void *ss, void *oss) {
+   return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
+ }
+ 
+--- 
projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
++++ 
projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+@@ -287,7 +287,7 @@
+ 
+   // Alternate stack for signal handling.
+   InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
+-  struct sigaltstack handler_stack;
++  stack_t handler_stack;
+   internal_memset(&handler_stack, 0, sizeof(handler_stack));
+   handler_stack.ss_sp = handler_stack_memory.data();
+   handler_stack.ss_size = kHandlerStackSize;
+--- projects/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
++++ projects/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
+@@ -288,7 +288,7 @@
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   int cnt = 0;
+-  __res_state *statp = (__res_state*)state;
++  struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
+       fds[cnt++] = statp->_u._ext.nssocks[i];
+--- projects/compiler-rt/lib/esan/esan_sideline_linux.cpp
++++ projects/compiler-rt/lib/esan/esan_sideline_linux.cpp
+@@ -70,7 +70,7 @@ int SidelineThread::runSideline(void *Arg) {
+ 
+   // Set up a signal handler on an alternate stack for safety.
+   InternalScopedBuffer<char> StackMap(SigAltStackSize);
+-  struct sigaltstack SigAltStack;
++  stack_t SigAltStack;
+   SigAltStack.ss_sp = StackMap.data();
+   SigAltStack.ss_size = SigAltStackSize;
+   SigAltStack.ss_flags = 0;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/llvm.git/commitdiff/3a980ab4bd71d83f5524270baf598f4864e43c32

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to