This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to build stand-alone (statically linked) gcc?
- From: Tim Prince <n8tm at aol dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 31 Jul 2015 16:01:47 -0400
- Subject: Re: How to build stand-alone (statically linked) gcc?
- Authentication-results: sourceware.org; auth=none
- References: <1584390641 dot 19967 dot 1438370268066 dot JavaMail dot root at zm dot isi dot edu>
- Reply-to: tprince at computer dot org
On 7/31/2015 3:17 PM, David Kang wrote:
> I am building gcc as a cross compiler.
> I'm building it on Ubuntu 14.04, but I want to use the gcc binaries on older CentOS machines.
> So, far gcc complains that it cannot find proper glibc on the older CentOS machines.
>
> gcc: /lib64/libc.so.6: version `GLIBC_2.8' not found (required by /tmp/gcc)
> gcc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/gcc)
> gcc: /lib64/libc.so.6: version `GLIBC_2.11' not found (required by /tmp/gcc)
>
> Is there a way to build gcc itself such that gcc doesn't need dynamic library for maximum portability?
>
You may widen the range of supported dynamic glibc by building against
the oldest one you wish to support (within reason).
I wouldn't like to try supporting both CentOS and Ubuntu with the same
binary, given that the latter uses varying non-LSB schemes for managing
32- and 64-bit applications.
--
Tim Prince