public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pluto at agmk dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug driver/27419] '-static' for 'gcc libraries' only?
Date: Thu, 04 May 2006 13:15:00 -0000 [thread overview]
Message-ID: <20060504131505.2626.qmail@sourceware.org> (raw)
In-Reply-To: <bug-27419-10601@http.gcc.gnu.org/bugzilla/>
------- Comment #1 from pluto at agmk dot net 2006-05-04 13:15 -------
(In reply to comment #0)
> Hi!
>
> I would be interested in having the "gcc libraries" statically linked to my
> binary, but still use one shared-object (a commercial library for which no
> static version is available), so '-static' is not really an option, as far as I
> can tell...
e.g. libfoo.so is a commercial shared library.
$ ldd libfoo.so
libc.so.6 => /lib64/libc.so.6 (0x00002b388050d000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
$ cat exec.c
extern void foo();
int main()
{
foo();
return 0;
}
$ gcc exec.c -o exec -static-libgcc -Wl,-rpath,. -L. -lfoo
$ ldd exec
libfoo.so => ./libfoo.so (0x00002b795f7fc000)
libc.so.6 => /lib64/libc.so.6 (0x00002b795f917000)
/lib64/ld-linux-x86-64.so.2 (0x00002b795f6e1000)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27419
next prev parent reply other threads:[~2006-05-04 13:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-04 12:28 [Bug driver/27419] New: " P dot Schaffnit at access dot rwth-aachen dot de
2006-05-04 13:15 ` pluto at agmk dot net [this message]
2006-05-04 13:27 ` [Bug driver/27419] " P dot Schaffnit at access dot rwth-aachen dot de
2006-05-04 15:22 ` pinskia at gcc dot gnu dot org
2006-05-04 15:25 ` P dot Schaffnit at access dot rwth-aachen dot de
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=20060504131505.2626.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).