3.3 g++ standard libraries
llewelly@xmission.com
llewelly@xmission.com
Fri Apr 2 16:28:00 GMT 2004
Ryan Pipkin <ryan.pipkin@inet.com> writes:
> llewelly@xmission.com wrote:
>
> >Ryan Pipkin <ryan.pipkin@inet.com> writes:
> >
> >
> >>When I build 3.3.1 or 3.3.3 I seem to be missing standard libraries
> >>(-lstdc++ and -lm) in g++.
> >>
> >>I use g++ -v to determine the libraries being included.
> >>
> >>3.3.1 & 3.3.3
> >>-lgcc -lgcc_eh -lc -lgcc -lgcc_eh
> >>
> >
> >Are you *sure* you got this from g++ -v and not from gcc -v ?
> > I am using gcc 3.3.3 on freebsd5.2-x86, and I get:
> > [...] -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc [...]
> > from g++ -v, but:
> > [...] -lgcc -lgcc_eh -lc -lgcc -lgcc_eh [...]
> > from gcc -v.
> >
> >
> >>3.2.1
> >>-lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
> >>
> >[snip]
> >
> >Could you post the *entire* output of 'g++ -v hello.cc' where
> > 'hello.cc' is a simple C++ hello world?
> >
> >
>
>
> It appears to work until I add the -b i686-pc-linux-gnu -V 3.3.3
> options.
Ok. I get the same behavior - 'g++' links in -lstdc++ et. al., but
'g++ -V 3.3.3' does not. One note - the behavior appears with
*either* the -V or -b options - supplying both is not required.
The docs (http://xrl.us/bukk) say those options 'work by running the
<machine>-gcc-<version> executable' so gcc is behaving as it is
documented to behave, but I think the behavior is surprising, and
for anyone using C++, undesireable. I suggest you report a
bug/feature request; see gcc.gnu.org/bugs.html .
For now, I suggest you run <machine>-g++ directly; there should be a
/opt/gnu/x86-3.3.3/bin/i686-pc-linux-gnu-g++ or some such on your
machine. Your --program-prefix probably changes it to:
/opt/gnu/x86-3.3.3/bin/x86-linux-i686-pc-linux-gnu-g++
More information about the Gcc-help
mailing list