Submitted By: Bruce Dubbs Date: 2017-08-19 Initial Package Version: 4.0.1 Upstream Status: Probably fixed in latest repository. Origin: https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=250200 Description: Fixes issues when building with glibc-2.26 diff -Naur compiler-rt-4.0.1.src-orig/lib/esan/esan_sideline_linux.cpp compiler-rt-4.0.1.src/lib/esan/esan_sideline_linux.cpp --- compiler-rt-4.0.1.src-orig/lib/esan/esan_sideline_linux.cpp 2016-07-19 05:03:38.000000000 +0000 +++ compiler-rt-4.0.1.src/lib/esan/esan_sideline_linux.cpp 2017-08-08 09:15:53.896379481 +0000 @@ -70,7 +70,7 @@ // Set up a signal handler on an alternate stack for safety. InternalScopedBuffer StackMap(SigAltStackSize); - struct sigaltstack SigAltStack; + stack_t SigAltStack; SigAltStack.ss_sp = StackMap.data(); SigAltStack.ss_size = SigAltStackSize; SigAltStack.ss_flags = 0; diff -Naur compiler-rt-4.0.1.src-orig/lib/sanitizer_common/sanitizer_linux.cc compiler-rt-4.0.1.src/lib/sanitizer_common/sanitizer_linux.cc --- compiler-rt-4.0.1.src-orig/lib/sanitizer_common/sanitizer_linux.cc 2017-01-06 20:57:47.000000000 +0000 +++ compiler-rt-4.0.1.src/lib/sanitizer_common/sanitizer_linux.cc 2017-08-08 08:01:35.269733714 +0000 @@ -607,8 +607,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); } diff -Naur compiler-rt-4.0.1.src-orig/lib/sanitizer_common/sanitizer_linux.h compiler-rt-4.0.1.src/lib/sanitizer_common/sanitizer_linux.h --- compiler-rt-4.0.1.src-orig/lib/sanitizer_common/sanitizer_linux.h 2016-10-06 09:58:11.000000000 +0000 +++ compiler-rt-4.0.1.src/lib/sanitizer_common/sanitizer_linux.h 2017-08-08 07:37:11.253073912 +0000 @@ -21,7 +21,6 @@ #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 @@ -30,8 +29,8 @@ // 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); diff -Naur compiler-rt-4.0.1.src-orig/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc compiler-rt-4.0.1.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc --- compiler-rt-4.0.1.src-orig/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2016-10-13 22:34:13.000000000 +0000 +++ compiler-rt-4.0.1.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2017-08-08 07:54:15.786402442 +0000 @@ -275,7 +275,7 @@ // Alternate stack for signal handling. InternalScopedBuffer 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; diff -Naur compiler-rt-4.0.1.src-orig/lib/tsan/rtl/tsan_platform_linux.cc compiler-rt-4.0.1.src/lib/tsan/rtl/tsan_platform_linux.cc --- compiler-rt-4.0.1.src-orig/lib/tsan/rtl/tsan_platform_linux.cc 2016-11-30 20:41:59.000000000 +0000 +++ compiler-rt-4.0.1.src/lib/tsan/rtl/tsan_platform_linux.cc 2017-08-08 07:58:02.773068043 +0000 @@ -289,7 +289,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];