public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: net_robber <net_robber@timectrl.net>
Cc: "Anandkumar, CB IN BLR STS" <anand.cb@siemens.com>,
	       "flameroc@gmail.com" <flameroc@gmail.com>,
	       "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Re: how could make gcc link static library default?
Date: Thu, 17 Oct 2013 09:04:00 -0000	[thread overview]
Message-ID: <525FA80E.5030704@redhat.com> (raw)
In-Reply-To: <CACdxSLmVe63s1fB=1eYMzuqWr9SjYGxaGf5s_DDVmDKm-uWhCQ@mail.gmail.com>

On 10/17/2013 07:57 AM, net_robber wrote:
> how to make it the first priority give to static, and then, in case
> static does not exist it uses dynamic.

Have a look at /usr/lib/libc.so on a GNU/Linux system of your choice.

Here it is on mine:

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )

Andrew.

  reply	other threads:[~2013-10-17  9:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17  3:40 net_robber
2013-10-17  4:21 ` Anandkumar, CB IN BLR STS
2013-10-17  4:38   ` Terry Guo
2013-10-17  5:06     ` Anandkumar, CB IN BLR STS
2013-10-17  5:48       ` Terry Guo
2013-10-17  6:39         ` net_robber
2013-10-17  6:52           ` Anandkumar, CB IN BLR STS
2013-10-17  6:58             ` net_robber
2013-10-17  9:04               ` Andrew Haley [this message]
2013-10-17  9:11                 ` net_robber
2013-10-17 10:42                   ` Andrew Haley

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=525FA80E.5030704@redhat.com \
    --to=aph@redhat.com \
    --cc=anand.cb@siemens.com \
    --cc=flameroc@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=net_robber@timectrl.net \
    /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).