install gcc-5.1.0

install gcc-5.1.0

0)

wget tar zxvf gcc-5.1.0.tar.gz cd gcc-5.1.0

./contrib/download_prerequisites

mkdir build

cd build

../configure --enable-languages=c,c++ --prefix=/path/to/gcc-5 --disable-bootstrap --disable-multilib

make -j

make install

1) cfns.gperf:101:1: error: ‘gnu_inline’ attribute present on ‘libc_name_p’

https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00375.html

https://unix.stackexchange.com/questions/335717/how-to-handle-error-compiling-gcc-4-7-0-using-gcc-6-2-1

https://patchwork.ozlabs.org/patch/504982/

2) ./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type 'struct ucontext'

https://stackoverflow.com/questions/46999900/how-to-compile-gcc-6-4-0-with-gcc-7-2-in-archlinux

https://github.com/easybuilders/easybuild-easyconfigs/issues/5758

3) libsanitizer/asan/asan_linux.cc:222:20: error: 'SIGSEGV' was not declared in this scope

https://patchwork.ozlabs.org/patch/725596/