public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Phil Edwards <phil@jaj.com>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: libstdc++/9776: -static-libgcc does not produce a static link to libstdc++, instead always dynamic
Date: Thu, 20 Feb 2003 16:46:00 -0000	[thread overview]
Message-ID: <20030220164601.3352.qmail@sources.redhat.com> (raw)

The following reply was made to PR libstdc++/9776; it has been noted by GNATS.

From: Phil Edwards <phil@jaj.com>
To: stew@tenbox.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/9776: -static-libgcc does not produce a static link to libstdc++, instead always dynamic
Date: Thu, 20 Feb 2003 11:44:39 -0500

 On Thu, Feb 20, 2003 at 04:30:56PM -0000, stew@tenbox.com wrote:
 > 
 > I worry that maybe I am confused about what -static-libgcc does; maybe it
 > is not supposed to make the link to libstdc++ static.
 
 It isn't.  If you'll look at your ldd output, you'll see that no dependency
 on libgcc_s.so was recorded.  That's why the option is called -static-libgcc,
 not -static-libstdc++.
 
 > If not, then I
 > would suggest that such an option is very needed - it is not often
 > reasonable that the user have the precise same version of the C++ runtime
 > library as you.
 
 There doesn't need to be a special switch for this.  The way to override
 the choice of libraries is somewhat linker-specific, but something like
 
     g++ .... -lfoo -lbar -Wl,-static -lstdc++ -lquux -Wl,-dynamic -lbaz
 
 will (assuming dynamic libs are the default choice) use libfoo.so, libbar.so,
 and libbaz.so, but libstdc++.a and libquux.a.  The spellings of "-static"
 and "-dynamic" are up to the linker you're using, so "man ld".  On Solaris
 it's something like -Bstatic and -Bdynamic.
 
 
 -- 
 I would therefore like to posit that computing's central challenge, viz. "How
 not to make a mess of it," has /not/ been met.
                                                  - Edsger Dijkstra, 1930-2002


             reply	other threads:[~2003-02-20 16:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-20 16:46 Phil Edwards [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-02-20 18:23 bkoz
2003-02-20 16:36 stew

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030220164601.3352.qmail@sources.redhat.com \
    --to=phil@jaj.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).