public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/27419] New: '-static' for 'gcc libraries' only?
@ 2006-05-04 12:28 P dot Schaffnit at access dot rwth-aachen dot de
2006-05-04 13:15 ` [Bug driver/27419] " pluto at agmk dot net
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: P dot Schaffnit at access dot rwth-aachen dot de @ 2006-05-04 12:28 UTC (permalink / raw)
To: gcc-bugs
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...
I haven't been able to pull this off, and got an answer from
gcc-help@gcc.gnu.org that it's actually impossible...
Nevertheless, as far as I can tell most commercial compiler allow this, so it's
probably technically possible, if it's not too much trouble, I think it would
be nice to have...
Thanks!
Philippe
PS: I tried this with
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /USER/philippe/Irix/Gcc_Sources/configure
--prefix=/WORK/philippe/Tools/Gcc --enable-languages=c,fortran
--with-mpfr=/WORK/philippe/Tools/Mpfr --with-gmp=/WORK/philippe/Tools/Gmp
Thread model: posix
gcc version 4.2.0 20060504 (experimental)
PPS: it could be related to Bug#: 7516
--
Summary: '-static' for 'gcc libraries' only?
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: driver
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: P dot Schaffnit at access dot rwth-aachen dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27419
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug driver/27419] '-static' for 'gcc libraries' only?
2006-05-04 12:28 [Bug driver/27419] New: '-static' for 'gcc libraries' only? P dot Schaffnit at access dot rwth-aachen dot de
@ 2006-05-04 13:15 ` pluto at agmk dot net
2006-05-04 13:27 ` P dot Schaffnit at access dot rwth-aachen dot de
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pluto at agmk dot net @ 2006-05-04 13:15 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug driver/27419] '-static' for 'gcc libraries' only?
2006-05-04 12:28 [Bug driver/27419] New: '-static' for 'gcc libraries' only? P dot Schaffnit at access dot rwth-aachen dot de
2006-05-04 13:15 ` [Bug driver/27419] " pluto at agmk dot net
@ 2006-05-04 13:27 ` 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
3 siblings, 0 replies; 5+ messages in thread
From: P dot Schaffnit at access dot rwth-aachen dot de @ 2006-05-04 13:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from P dot Schaffnit at access dot rwth-aachen dot de 2006-05-04 13:27 -------
Hi!
Thanks a lot!
That's exactly what I was looking for: I don't seem to be able to do the same
with libgfortran, though... have I missed something, or should request that?
Thanks!
Philippe
PS: I don't seem to find any reference to that in the documentation: it would
probably be worth adding...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27419
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug driver/27419] '-static' for 'gcc libraries' only?
2006-05-04 12:28 [Bug driver/27419] New: '-static' for 'gcc libraries' only? P dot Schaffnit at access dot rwth-aachen dot de
2006-05-04 13:15 ` [Bug driver/27419] " pluto at agmk dot net
2006-05-04 13:27 ` 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
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-04 15:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-05-04 15:22 -------
Configure GCC with --disable-shared instead.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27419
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug driver/27419] '-static' for 'gcc libraries' only?
2006-05-04 12:28 [Bug driver/27419] New: '-static' for 'gcc libraries' only? P dot Schaffnit at access dot rwth-aachen dot de
` (2 preceding siblings ...)
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
3 siblings, 0 replies; 5+ messages in thread
From: P dot Schaffnit at access dot rwth-aachen dot de @ 2006-05-04 15:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from P dot Schaffnit at access dot rwth-aachen dot de 2006-05-04 15:25 -------
I hadn't thought about that...
Thanks a lot for your help!
Philippe
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27419
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-05-04 15:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-04 12:28 [Bug driver/27419] New: '-static' for 'gcc libraries' only? P dot Schaffnit at access dot rwth-aachen dot de
2006-05-04 13:15 ` [Bug driver/27419] " pluto at agmk dot net
2006-05-04 13:27 ` 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
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).