This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17375] New: g++ -V calling gcc (libstdc++ not used)


Hello,

with 3.4.2 (and probally previous too) using -V option for C++ does not work
correctly:

g++ -V 3.3.4 -v -o test test.cc ends with unresolved symbols - the libstdc++ is
not used, running with g++ -V 3.3.4 -v /usr/local/lib/libstdc++.so.5 -o test
test.cc is ok. The difference is in call of collect2:

g++ without -V:

/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.2/collect2 --eh-frame-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o test /usr/lib/crt1.o
/usr/lib/crti.o /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.2/crtbegin.o
-L/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.2
-L/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.2/../../../../i686-pc-linux-gnu/lib
-L/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.2/../../.. /tmp/ccect0ql.o -lstdc++
-lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.2/crtend.o /usr/lib/crtn.o

g++ -V 3.3.4:

/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/collect2 --eh-frame-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o test /usr/lib/crt1.o
/usr/lib/crti.o /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/crtbegin.o
-L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.4
-L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/lib
-L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../.. /tmp/cc4rsKfq.o -lgcc
--as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/crtend.o /usr/lib/crtn.o


Here -lstdc++ is missing.

-- 
           Summary: g++ -V calling gcc (libstdc++ not used)
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kasparek at fit dot vutbr dot cz
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]