public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Weaver, John P CIV" <john.p.weaver@navy.mil>
To: <gcc-help@gcc.gnu.org>
Subject: prefer static linking
Date: Tue, 29 Nov 2011 23:47:00 -0000	[thread overview]
Message-ID: <869832256C376241BB63955DA5CA5AA702B53725@nawechlkez01v.nadsuswe.nads.navy.mil> (raw)

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

The gcc compiler prefers to use dynamic libraries in the linking phase. When porting software from one machine to another it is frequently desirable to link to static libraries as much as possible to account for different versions of the libraries. The -static flag is useful when you do not need any dynamic library support but causes the linker to fail if there is only a dynamic library for a particular call. Is there a way to ask the linker to use static libraries when possible and report the dynamic libraries that are needed to complete the linking process?

Patrick Weaver
China Lake, CA
Voice: (760) 939-8744
Email: john.p.weaver(at)navy.mil



[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5672 bytes --]

             reply	other threads:[~2011-11-29 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29 23:47 Weaver, John P CIV [this message]
2011-11-29 23:56 ` Ian Lance Taylor
2011-11-30  1:29   ` Weaver, John P CIV

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=869832256C376241BB63955DA5CA5AA702B53725@nawechlkez01v.nadsuswe.nads.navy.mil \
    --to=john.p.weaver@navy.mil \
    --cc=gcc-help@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).