public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/15940] New: implicit link against libstdc++ fails if -b used
@ 2004-06-11 12:47 harri dot pasanen at trema dot com
2004-06-11 13:17 ` [Bug driver/15940] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: harri dot pasanen at trema dot com @ 2004-06-11 12:47 UTC (permalink / raw)
To: gcc-bugs
Take a bogus file, say t1.c:
int foob() { return 42; }
and compile it to object.
bash-2.05a$ gcc -fPIC -c t1.c -o t1.o
Now try making a shared library of it:
bash-2.05a$ g++ -fPIC -shared -o t1.sl t1.o
bash-2.05a$ ldd t1.sl
/opt/gcc33/lib/libgcc_s.sl => /opt/gcc33/lib/libgcc_s.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/opt/gcc33/lib/libstdc++.sl.5 => /opt/gcc33/lib/libstdc++.sl.5
/usr/lib/libc.2 => /usr/lib/libc.2
/work/harri/gcc-build/gcc/libgcc_s.sl => /opt/gcc33/lib/./libgcc_s.sl
/usr/lib/libm.2 => /usr/lib/libm.2
It worked, implicitly picking up libstdc++ because g++ was used.
But if I add "-b hppa2.0w-hp-hpux11.00", libstdc++ is no longer picked up:
bash-2.05a$ g++ -b hppa2.0w-hp-hpux11.00 -fPIC -shared -o t1.sl t1.o
bash-2.05a$ ldd t1.sl
/opt/gcc33/lib/libgcc_s.sl => /opt/gcc33/lib/libgcc_s.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
bash-2.05a$
My gcc:
bash-2.05a$ g++ -v
Reading specs from /opt/gcc33/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.3.3/specs
Configured with: ../gcc-3.3.3/configure --prefix=/opt/gcc33 -with-gnu-as
-with-as=/opt/gcc33/bin/as --enable-threads=posix --enable-languages=c,c++
Thread model: posix
gcc version 3.3.3
binutils 2.15:
bash-2.05a$ as --version
GNU assembler 2.15
This used to work correctly with gcc 3.2 on HP-UX.
--
Summary: implicit link against libstdc++ fails if -b used
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: driver
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: harri dot pasanen at trema dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15940
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug driver/15940] implicit link against libstdc++ fails if -b used
2004-06-11 12:47 [Bug driver/15940] New: implicit link against libstdc++ fails if -b used harri dot pasanen at trema dot com
@ 2004-06-11 13:17 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-11 13:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-11 13:17 -------
This is basically a dup of bug 10707 which is for -V but they are the same problem now.
*** This bug has been marked as a duplicate of 10707 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15940
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-11 13:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-11 12:47 [Bug driver/15940] New: implicit link against libstdc++ fails if -b used harri dot pasanen at trema dot com
2004-06-11 13:17 ` [Bug driver/15940] " pinskia at gcc dot gnu dot org
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).