It looks like gcc-5 was recently removed from Debian's unstable repository. I need gcc-5 to compile an older Linux kernel (3.19) and so I am looking to build it from source, through this is causing me a great deal of trouble. I have been following the instructions found here, but I find myself wondering what settings I need to set and more. Thus far, I have done the following.
- Downloaded and unpacked the source code.
- Configured gcc-5 by doing the following:
% mkdir objdir % cd objdir % ../gcc-5.4.0/configure (I included neither options nor target flags)
- Attempted to build using the following in my
% make BOOT_CFLAGS='-O' bootstrap
However, bootstrapping raised errors that prevented me from moving onto the install. After running for about 5 minutes, I encounter the following errors:
In file included from ../../../../gcc-5.4.0/libgcc/unwind-dw2.c:401:0: ./md-unwind-support.h: In function 'x86_fallback_frame_state': ./md-unwind-support.h:141:18: error: field 'uc' has incomplete type struct ucontext uc; ^ make: *** [../../../../gcc-5.4.0/libgcc/shared-object.mk:14: unwind-dw2.o] Error 1 make: Leaving directory '/home/me/objdir/x86_64-unknown-linux-gnu/32/libgcc' make: *** [Makefile:1154: multi-do] Error 1 make: Leaving directory '/home/me/objdir/x86_64-unknown-linux-gnu/libgcc' make: *** [Makefile:119: multi-do] Error 2 make: Leaving directory '/home/me/objdir/x86_64-unknown-linux-gnu/libgcc' make: *** [Makefile:16510: all-stage1-target-libgcc] Error 2 make: Leaving directory '/home/me/objdir' make: *** [Makefile:22461: stage1-bubble] Error 2 make: Leaving directory '/home/me/objdir' make: *** [Makefile:22798: bootstrap] Error 2
I am running Debian 10 (Buster) and have the necessary prerequisites installed as listed here.
Any help or guidance either in fixing the errors I have during bootstrapping or with building from source in general would be much appreciated! Thank you.