AW: How to build stand-alone (statically linked) gcc?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Is there a way to build gcc itself such that gcc doesn't need dynamic library for maximum portability?

We have a similar setup here, using Ubuntu 14.04 to build our cross toolchains. To get statically linked
binaries, we had to add

CFLAGS+=-static LDFLAGS+=-static LIBTOOLFLAGS2+=-all-static

when calling "make" for binutils

and 

CFLAGS+=-static LDFLAGS+=-static

when calling "make" for gcc.

Optionally, i.e. if you also want a static gdb, you may add

LDFLAGS+=-static

when calling "make" for gdb.

Hope this helps, it does work fine here.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux