public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/35197]  New: Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs
@ 2008-02-14 18:11 skunk at iskunk dot org
  2008-02-15  7:28 ` [Bug libstdc++/35197] " Ralf dot Wildenhues at gmx dot de
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: skunk at iskunk dot org @ 2008-02-14 18:11 UTC (permalink / raw)
  To: gcc-bugs

I have a build of GCC 4.2.3 compiled with
--enable-version-specific-runtime-libs. It fails to link a trivial C++ program,
because the (non-GNU) linker does not know about libstdc++, and the GCC
frontend is not passing an appropriate -L... flag to the linker so that it can
find the library.

$ g++ -o hello hello.cxx
/usr/bin/ld:
Can't locate file for: -lstdc++
collect2: ld returned 1 exit status

$ g++ -v -o hello hello.cxx
[superfluous verbiage elided]
mips-tfile (GCC) 4.2.3
 /opt/tg/bin/../libexec/gcc/alphaev56-dec-osf4.0g/4.2.3/collect2 -G 8 -O1 -S
-call_shared -o hello /usr/lib/cmplrs/cc/crt0.o
-L/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3 -L/opt/tg/bin/../lib/gcc
-L/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3 -L/usr/lib/cmplrs/cc
-L/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3/../../..
-L/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3/../../.. /tmp//ccu9eHi9.o
-lstdc++ -lm -lgcc -lc -lgcc
/usr/bin/ld:
Can't locate file for: -lstdc++
collect2: ld returned 1 exit status

(I notice that libstdc++ is present immediately under
/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/, which the -L... flags narrowly miss.)


-- 
           Summary: Native linker can't locate file for -lstdc++ with --
                    enable-version-specific-runtime-libs
           Product: gcc
           Version: 4.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: skunk at iskunk dot org
 GCC build triplet: alphaev56-dec-osf4.0g
  GCC host triplet: alphaev56-dec-osf4.0g
GCC target triplet: alphaev56-dec-osf4.0g


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35197


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-16 18:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-14 18:11 [Bug libstdc++/35197] New: Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs skunk at iskunk dot org
2008-02-15  7:28 ` [Bug libstdc++/35197] " Ralf dot Wildenhues at gmx dot de
2008-02-15  7:53 ` skunk at iskunk dot org
2008-02-15 15:31 ` Ralf dot Wildenhues at gmx dot de
2008-02-16 18:43 ` skunk at iskunk 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).