diff -Nurp gcc-4.9.2-old/libgcc/config/aarch64/linux-unwind.h gcc-4.9.2-new/libgcc/config/aarch64/linux-unwind.h --- gcc-4.9.2-old/libgcc/config/aarch64/linux-unwind.h 2014-01-02 23:25:22.000000000 +0100 +++ gcc-4.9.2-new/libgcc/config/aarch64/linux-unwind.h 2017-12-04 22:04:55.881885952 +0100 @@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Un struct rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; }; struct rt_sigframe *rt_; diff -Nurp gcc-4.9.2-old/libgcc/config/alpha/linux-unwind.h gcc-4.9.2-new/libgcc/config/alpha/linux-unwind.h --- gcc-4.9.2-old/libgcc/config/alpha/linux-unwind.h 2014-01-02 23:25:22.000000000 +0100 +++ gcc-4.9.2-new/libgcc/config/alpha/linux-unwind.h 2017-12-04 22:04:53.108884004 +0100 @@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwi { struct rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_ = context->cfa; sc = &rt_->uc.uc_mcontext; } diff -Nurp gcc-4.9.2-old/libgcc/config/bfin/linux-unwind.h gcc-4.9.2-new/libgcc/config/bfin/linux-unwind.h --- gcc-4.9.2-old/libgcc/config/bfin/linux-unwind.h 2014-01-02 23:25:22.000000000 +0100 +++ gcc-4.9.2-new/libgcc/config/bfin/linux-unwind.h 2017-12-04 22:05:05.063892403 +0100 @@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwin void *puc; char retcode[8]; siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_ = context->cfa; /* The void * cast is necessary to avoid an aliasing warning. diff -Nurp gcc-4.9.2-old/libgcc/config/i386/linux-unwind.h gcc-4.9.2-new/libgcc/config/i386/linux-unwind.h --- gcc-4.9.2-old/libgcc/config/i386/linux-unwind.h 2014-01-02 23:25:22.000000000 +0100 +++ gcc-4.9.2-new/libgcc/config/i386/linux-unwind.h 2017-12-04 22:04:57.100886808 +0100 @@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unw if (*(unsigned char *)(pc+0) == 0x48 && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL) { - struct ucontext *uc_ = context->cfa; + ucontext_t *uc_ = context->cfa; /* The void * cast is necessary to avoid an aliasing warning. The aliasing warning is correct, but should not be a problem because it does not alias anything. */ @@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind siginfo_t *pinfo; void *puc; siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_ = context->cfa; /* The void * cast is necessary to avoid an aliasing warning. The aliasing warning is correct, but should not be a problem diff -Nurp gcc-4.9.2-old/libgcc/config/m68k/linux-unwind.h gcc-4.9.2-new/libgcc/config/m68k/linux-unwind.h --- gcc-4.9.2-old/libgcc/config/m68k/linux-unwind.h 2014-01-02 23:25:22.000000000 +0100 +++ gcc-4.9.2-new/libgcc/config/m68k/linux-unwind.h 2017-12-04 22:04:54.603885054 +0100 @@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTI /* is unfortunately broken right now. */ struct uw_ucontext { unsigned long uc_flags; - struct ucontext *uc_link; + ucontext_t *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; unsigned long uc_filler[80]; diff -Nurp gcc-4.9.2-old/libgcc/config/nios2/linux-unwind.h gcc-4.9.2-new/libgcc/config/nios2/linux-unwind.h --- gcc-4.9.2-old/libgcc/config/nios2/linux-unwind.h 2014-01-02 23:25:22.000000000 +0100 +++ gcc-4.9.2-new/libgcc/config/nios2/linux-unwind.h 2017-12-04 22:05:03.730891467 +0100 @@ -38,7 +38,7 @@ struct nios2_mcontext { struct nios2_ucontext { unsigned long uc_flags; - struct ucontext *uc_link; + ucontext_t *uc_link; stack_t uc_stack; struct nios2_mcontext uc_mcontext; sigset_t uc_sigmask; /* mask last for extensibility */ diff -Nurp gcc-4.9.2-old/libgcc/config/pa/linux-unwind.h gcc-4.9.2-new/libgcc/config/pa/linux-unwind.h --- gcc-4.9.2-old/libgcc/config/pa/linux-unwind.h 2014-10-26 15:50:46.000000000 +0100 +++ gcc-4.9.2-new/libgcc/config/pa/linux-unwind.h 2017-12-04 22:05:00.913889488 +0100 @@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwin struct sigcontext *sc; struct rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *frame; /* rt_sigreturn trampoline: diff -Nurp gcc-4.9.2-old/libgcc/config/sh/linux-unwind.h gcc-4.9.2-new/libgcc/config/sh/linux-unwind.h --- gcc-4.9.2-old/libgcc/config/sh/linux-unwind.h 2014-01-02 23:25:22.000000000 +0100 +++ gcc-4.9.2-new/libgcc/config/sh/linux-unwind.h 2017-12-04 22:04:58.322887666 +0100 @@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_ { struct rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_ = context->cfa; /* The void * cast is necessary to avoid an aliasing warning. The aliasing warning is correct, but should not be a problem diff -Nurp gcc-4.9.2-old/libgcc/config/tilepro/linux-unwind.h gcc-4.9.2-new/libgcc/config/tilepro/linux-unwind.h --- gcc-4.9.2-old/libgcc/config/tilepro/linux-unwind.h 2014-01-02 23:25:22.000000000 +0100 +++ gcc-4.9.2-new/libgcc/config/tilepro/linux-unwind.h 2017-12-04 22:04:59.617888577 +0100 @@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwin struct rt_sigframe { unsigned char save_area[C_ABI_SAVE_AREA_SIZE]; siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_; /* Return if this is not a signal handler. */ diff -Nurp gcc-4.9.2-old/libgcc/config/xtensa/linux-unwind.h gcc-4.9.2-new/libgcc/config/xtensa/linux-unwind.h --- gcc-4.9.2-old/libgcc/config/xtensa/linux-unwind.h 2014-01-02 23:25:22.000000000 +0100 +++ gcc-4.9.2-new/libgcc/config/xtensa/linux-unwind.h 2017-12-04 22:05:02.511890610 +0100 @@ -63,7 +63,7 @@ xtensa_fallback_frame_state (struct _Unw struct rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_; /* movi a2, __NR_rt_sigreturn; syscall */ diff -Nurp gcc-4.9.2-old/libsanitizer/sanitizer_common/sanitizer_linux.cc gcc-4.9.2-new/libsanitizer/sanitizer_common/sanitizer_linux.cc --- gcc-4.9.2-old/libsanitizer/sanitizer_common/sanitizer_linux.cc 2013-12-05 10:18:38.000000000 +0100 +++ gcc-4.9.2-new/libsanitizer/sanitizer_common/sanitizer_linux.cc 2017-12-12 09:15:29.648749147 +0100 @@ -599,8 +599,7 @@ uptr internal_prctl(int option, uptr arg return internal_syscall(__NR_prctl, option, arg2, arg3, arg4, arg5); } -uptr internal_sigaltstack(const struct sigaltstack *ss, - struct sigaltstack *oss) { +uptr internal_sigaltstack(const void *ss, void *oss) { return internal_syscall(__NR_sigaltstack, (uptr)ss, (uptr)oss); } diff -Nurp gcc-4.9.2-old/libsanitizer/sanitizer_common/sanitizer_linux.h gcc-4.9.2-new/libsanitizer/sanitizer_common/sanitizer_linux.h --- gcc-4.9.2-old/libsanitizer/sanitizer_common/sanitizer_linux.h 2013-12-05 10:18:38.000000000 +0100 +++ gcc-4.9.2-new/libsanitizer/sanitizer_common/sanitizer_linux.h 2017-12-12 09:16:07.799814755 +0100 @@ -18,7 +18,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 @@ -28,8 +27,7 @@ struct linux_dirent; // Syscall wrappers. uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count); 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); uptr internal_sigaction(int signum, const __sanitizer_kernel_sigaction_t *act, __sanitizer_kernel_sigaction_t *oldact); uptr internal_sigprocmask(int how, __sanitizer_kernel_sigset_t *set, diff -Nurp gcc-4.9.2-old/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc gcc-4.9.2-new/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc --- gcc-4.9.2-old/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2013-12-05 11:28:59.000000000 +0100 +++ gcc-4.9.2-new/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2017-12-12 09:13:28.353605374 +0100 @@ -238,7 +238,7 @@ static int TracerThread(void* argument) // 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 -Nurp gcc-4.9.2-old/libsanitizer/asan/asan_linux.cc gcc-4.9.2-new/libsanitizer/asan/asan_linux.cc index c504168..59087b9 100644 --- gcc-4.9.2-old/libsanitizer/asan/asan_linux.cc +++ gcc-4.9.2-new/libsanitizer/asan/asan_linux.cc @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff -Nurp gcc-4.9.2-old/libsanitizer/tsan/tsan_platform_linux.cc gcc-4.9.2-new/libsanitizer/tsan/tsan_platform_linux.cc --- gcc-4.9.2-old/libsanitizer/tsan/tsan_platform_linux.cc +++ gcc-4.9.2-new/libsanitizer/tsan/tsan_platform_linux.cc @@ -42,7 +42,7 @@ #include #include #define __need_res_state -#include +#include "bits/types/res_state.h" #include #ifdef sa_handler diff -ru gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc gcc-4.9.4-new/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc --- gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2013-12-19 13:54:11.000000000 +0100 +++ gcc-4.9.4-new/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2018-09-28 10:32:21.729259622 +0200 @@ -81,7 +81,6 @@ #include #include #include -#include #include #include #include @@ -163,7 +162,19 @@ unsigned struct_old_utsname_sz = sizeof(struct old_utsname); unsigned struct_oldold_utsname_sz = sizeof(struct oldold_utsname); unsigned struct_itimerspec_sz = sizeof(struct itimerspec); - unsigned struct_ustat_sz = sizeof(struct ustat); + // Use pre-computed size of struct ustat to avoid which + // has been removed from glibc 2.28. +#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ + || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ + || defined(__x86_64__) +#define SIZEOF_STRUCT_USTAT 32 +#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ + || defined(__powerpc__) || defined(__s390__) +#define SIZEOF_STRUCT_USTAT 20 +#else +#error Unknown size of struct ustat +#endif + unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; #endif // SANITIZER_LINUX #if SANITIZER_LINUX && !SANITIZER_ANDROID Only in gcc-4.9.4-new/libsanitizer/sanitizer_common: sanitizer_platform_limits_posix.cc.orig Only in gcc-4.9.4-new/libsanitizer/sanitizer_common: sanitizer_platform_limits_posix.cc.rej