Build GCC 4.9.4 x86_64 on Ubuntu 19.10

Apply patch

libgcc of gcc4.9.4 has issue on newer environment

diff -ur gcc-4.9.4/libgcc/config/i386/linux-unwind.h new-gcc-4.9.4/libgcc/config/i386/linux-unwind.h
--- gcc-4.9.4/libgcc/config/i386/linux-unwind.h   2014-01-03 07:25:22.000000000 +0900
+++ new-gcc-4.9.4/libgcc/config/i386/linux-unwind.h   2020-04-17 11:25:54.600423882 +0900
@@ -58,7 +58,7 @@
   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 @@
    siginfo_t *pinfo;
    void *puc;
    siginfo_t info;
-  struct ucontext uc;
+   ucontext_t ucontext 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

Configure & make

# apply patch
cd gcc-4.9.4
mkdir build
cd build
../configure --prefix=$HOME/local/gcc-4.9 --enable-languages=c --disable-multilib --disable-libsanitizer
make
make install

libsanitaizer of gcc 4.9.4 cannot be built with recent glibc.