This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc without ld.so
- From: Ian Lance Taylor <iant at google dot com>
- To: "Bill Cunningham" <billcun at suddenlink dot net>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Sat, 04 Jun 2011 13:22:06 -0700
- Subject: Re: gcc without ld.so
- References: <000301cc22ee$1ff51ce0$a9d3daad@YOUREDC1953E71>
"Bill Cunningham" <billcun@suddenlink.net> writes:
> Is there a way to build a compiler without the binaries when run
> not having to link with the dynamic linker? I wish to compile a new
> glibc and don't want the compiler I build it with to be dependant on
> it. Would the -static linker switch be what I'm looking for?
Yes: if you link with -static, then the dynamic linker will not be
required at runtime. While glibc frowns on static linking, it should
work for a program like gcc.
Ian