public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "harri dot pasanen at trema dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/15940] New: implicit link against libstdc++ fails if -b used Date: Fri, 11 Jun 2004 12:47:00 -0000 [thread overview] Message-ID: <20040611124753.15940.harri.pasanen@trema.com> (raw) 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
next reply other threads:[~2004-06-11 12:47 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-06-11 12:47 harri dot pasanen at trema dot com [this message] 2004-06-11 13:17 ` [Bug driver/15940] " pinskia at gcc dot gnu dot org
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=20040611124753.15940.harri.pasanen@trema.com \ --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: linkBe 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).