How to Build Libgcc of GCC compiler

user3405046 picture user3405046 · Mar 28, 2014 · Viewed 7k times · Source

Is there any way to build libgcc without building gcc compiler?

I have tried to run configure script of libgcc but it says ../../gcc/libgcc.mvars is missing.

My basic need is to build libgcc for multiple platforms with multiple configurations for various versions of libgcc.

Answer

rubenvb picture rubenvb · Mar 28, 2014

Not reliably, because the GCC build system is quite monolithic and fragile.

The quickest way to get the libgcc's built is to configure and build with something like the following:

../gcc-src/configure --target=$TARGET --enable-languages=c
make all-target-libgcc
make install-target-libgcc

You might have to make all-gcc first, not sure if the dependencies are set up correctly.