public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* FAQ: how to build a statically-linked gcc?
@ 2003-10-15 17:04 Dan Kegel
  2003-10-15 17:14 ` Ronald Landheer-Cieslak
  2003-10-15 22:33 ` Greg Schafer
  0 siblings, 2 replies; 8+ messages in thread
From: Dan Kegel @ 2003-10-15 17:04 UTC (permalink / raw)
  To: GCC Mailing List; +Cc: crossgcc

Can somebody clue me in on the right way to build static gcc binaries?

http://gcc.gnu.org/install/configure.html doesn't seem to say.
One user of my crosstool script really wants this,
and is currently hacking the Makefile to add -static
( http://sources.redhat.com/ml/crossgcc/2003-10/msg00068.html ).

Thanks,
Dan

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAQ: how to build a statically-linked gcc?
  2003-10-15 17:04 FAQ: how to build a statically-linked gcc? Dan Kegel
@ 2003-10-15 17:14 ` Ronald Landheer-Cieslak
  2003-10-15 17:24   ` Wolcott, Ken (MED, Compuware)
  2003-10-15 22:33 ` Greg Schafer
  1 sibling, 1 reply; 8+ messages in thread
From: Ronald Landheer-Cieslak @ 2003-10-15 17:14 UTC (permalink / raw)
  To: Dan Kegel; +Cc: GCC Mailing List, crossgcc

AFAIK, --disable-shared should do that.. but I think that laso has a 
side-effect on exception handling..
If there's a better way, I'd like to know it :)

rlc


On Wed, Oct 15, 2003 at 09:05:03AM -0700, Dan Kegel wrote:
> Can somebody clue me in on the right way to build static gcc binaries?
> 
> http://gcc.gnu.org/install/configure.html doesn't seem to say.
> One user of my crosstool script really wants this,
> and is currently hacking the Makefile to add -static
> ( http://sources.redhat.com/ml/crossgcc/2003-10/msg00068.html ).
> 
> Thanks,
> Dan
> 
> -- 
> Dan Kegel
> http://www.kegel.com
> http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
> 
> 
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

-- 
Health nuts are going to feel stupid someday, lying in hospitals dying
of nothing.
		-- Redd Foxx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAQ: how to build a statically-linked gcc?
  2003-10-15 17:14 ` Ronald Landheer-Cieslak
@ 2003-10-15 17:24   ` Wolcott, Ken (MED, Compuware)
  2003-10-15 18:05     ` Marc Kleine-Budde
  0 siblings, 1 reply; 8+ messages in thread
From: Wolcott, Ken (MED, Compuware) @ 2003-10-15 17:24 UTC (permalink / raw)
  To: Ronald Landheer-Cieslak, Dan Kegel; +Cc: GCC Mailing List, crossgcc

Hi Ronald;

  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.

Ken Wolcott

On Wednesday 15 October 2003 12:04, Ronald Landheer-Cieslak wrote:
> AFAIK, --disable-shared should do that.. but I think that laso has a
> side-effect on exception handling..
> If there's a better way, I'd like to know it :)
>
> rlc
>
> On Wed, Oct 15, 2003 at 09:05:03AM -0700, Dan Kegel wrote:
> > Can somebody clue me in on the right way to build static gcc binaries?
> >
> > http://gcc.gnu.org/install/configure.html doesn't seem to say.
> > One user of my crosstool script really wants this,
> > and is currently hacking the Makefile to add -static
> > ( http://sources.redhat.com/ml/crossgcc/2003-10/msg00068.html ).
> >
> > Thanks,
> > Dan
> >
> > --
> > Dan Kegel
> > http://www.kegel.com
> > http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
> >
> >
> > ------
> > Want more information?  See the CrossGCC FAQ,
> > http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to
> > crossgcc-unsubscribe@sources.redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAQ: how to build a statically-linked gcc?
  2003-10-15 17:24   ` Wolcott, Ken (MED, Compuware)
@ 2003-10-15 18:05     ` Marc Kleine-Budde
  2003-10-15 22:23       ` Jeff Sturm
  0 siblings, 1 reply; 8+ messages in thread
From: Marc Kleine-Budde @ 2003-10-15 18:05 UTC (permalink / raw)
  To: Wolcott, Ken (MED, Compuware)
  Cc: Ronald Landheer-Cieslak, Dan Kegel, GCC Mailing List, crossgcc

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

-- 
#!/bin/sh
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAQ: how to build a statically-linked gcc?
  2003-10-15 18:05     ` Marc Kleine-Budde
@ 2003-10-15 22:23       ` Jeff Sturm
  2003-10-15 22:25         ` Dan Kegel
  2003-10-16 14:16         ` Ronald Landheer-Cieslak
  0 siblings, 2 replies; 8+ messages in thread
From: Jeff Sturm @ 2003-10-15 22:23 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: Wolcott, Ken (MED, Compuware),
	Ronald Landheer-Cieslak, Dan Kegel, GCC Mailing List, crossgcc

On Wed, 15 Oct 2003, Marc Kleine-Budde wrote:
> 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 haven't read much of this thread, but I'm a bit surprised that
anyone expects --disable-shared to do other than what is documented, i.e.

gcc:
  --disable-shared        don't provide a shared libgcc
libstdc++-v3:
  --enable-shared=PKGS  build shared libraries default=yes
libjava:
  --enable-shared[=PKGS]  build shared libraries [default=yes]
libf2c:
  --enable-shared[=PKGS]  build shared libraries [default=yes]
libobjc:
  --enable-shared[=PKGS]  build shared libraries [default=no]

None of this suggests that any behavior resembling the `-static' compiler
switch is intended.

Jeff

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAQ: how to build a statically-linked gcc?
  2003-10-15 22:23       ` Jeff Sturm
@ 2003-10-15 22:25         ` Dan Kegel
  2003-10-16 14:16         ` Ronald Landheer-Cieslak
  1 sibling, 0 replies; 8+ messages in thread
From: Dan Kegel @ 2003-10-15 22:25 UTC (permalink / raw)
  To: Jeff Sturm
  Cc: Marc Kleine-Budde, Wolcott, Ken (MED, Compuware),
	Ronald Landheer-Cieslak, Dan Kegel, GCC Mailing List, crossgcc

Jeff Sturm wrote:
> On Wed, 15 Oct 2003, Marc Kleine-Budde wrote:
> 
>>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 haven't read much of this thread, but I'm a bit surprised that
> anyone expects --disable-shared to do other than what is documented, i.e.
> 
> gcc:
>   --disable-shared        don't provide a shared libgcc
> libstdc++-v3:
>   --enable-shared=PKGS  build shared libraries default=yes
> libjava:
>   --enable-shared[=PKGS]  build shared libraries [default=yes]
> libf2c:
>   --enable-shared[=PKGS]  build shared libraries [default=yes]
> libobjc:
>   --enable-shared[=PKGS]  build shared libraries [default=no]
> 
> None of this suggests that any behavior resembling the `-static' compiler
> switch is intended.

Hence my original post, which asked "How do I build a statically-linked gcc?"
- Dan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAQ: how to build a statically-linked gcc?
  2003-10-15 17:04 FAQ: how to build a statically-linked gcc? Dan Kegel
  2003-10-15 17:14 ` Ronald Landheer-Cieslak
@ 2003-10-15 22:33 ` Greg Schafer
  1 sibling, 0 replies; 8+ messages in thread
From: Greg Schafer @ 2003-10-15 22:33 UTC (permalink / raw)
  To: Dan Kegel; +Cc: GCC Mailing List, crossgcc

On Wed, Oct 15, 2003 at 09:05:03AM -0700, Dan Kegel wrote:
> Can somebody clue me in on the right way to build static gcc binaries?

make BOOT_LDFLAGS="-static" bootstrap

or

make LDFLAGS="-static"

if not bootstrapping. Works for me.

Greg

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAQ: how to build a statically-linked gcc?
  2003-10-15 22:23       ` Jeff Sturm
  2003-10-15 22:25         ` Dan Kegel
@ 2003-10-16 14:16         ` Ronald Landheer-Cieslak
  1 sibling, 0 replies; 8+ messages in thread
From: Ronald Landheer-Cieslak @ 2003-10-16 14:16 UTC (permalink / raw)
  To: Jeff Sturm
  Cc: Marc Kleine-Budde, Wolcott, Ken (MED, Compuware),
	Dan Kegel, GCC Mailing List, crossgcc

On Wed, Oct 15, 2003 at 04:49:16PM -0400, Jeff Sturm wrote:
> On Wed, 15 Oct 2003, Marc Kleine-Budde wrote:
> > 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 haven't read much of this thread, but I'm a bit surprised that
> anyone expects --disable-shared to do other than what is documented, i.e.
> 
> gcc:
>   --disable-shared        don't provide a shared libgcc
> libstdc++-v3:
>   --enable-shared=PKGS  build shared libraries default=yes
> libjava:
>   --enable-shared[=PKGS]  build shared libraries [default=yes]
> libf2c:
>   --enable-shared[=PKGS]  build shared libraries [default=yes]
> libobjc:
>   --enable-shared[=PKGS]  build shared libraries [default=no]
> 
> None of this suggests that any behavior resembling the `-static' compiler
> switch is intended.
Hmm.. probably because I have a bug somewhere in my head.. ;)

Severe cafeine deprivation..

sorry,
rlc


-- 
Many people are unenthusiastic about their work.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-10-16 11:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-15 17:04 FAQ: how to build a statically-linked gcc? Dan Kegel
2003-10-15 17:14 ` Ronald Landheer-Cieslak
2003-10-15 17:24   ` Wolcott, Ken (MED, Compuware)
2003-10-15 18:05     ` Marc Kleine-Budde
2003-10-15 22:23       ` Jeff Sturm
2003-10-15 22:25         ` Dan Kegel
2003-10-16 14:16         ` Ronald Landheer-Cieslak
2003-10-15 22:33 ` Greg Schafer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).