[Bug 924502] Re: gcc is broken with -lstdc++ while g++ is OK
Matthias Klose
doko at ubuntu.com
Wed Feb 1 12:56:19 UTC 2012
not a bug, ld --as-needed is the default.
see https://wiki.ubuntu.com/OneiricOcelot/ReleaseNotes?action=show&redirect=OneiricOcelot%2FTechnicalOverview#GCC_4.6_Toolchain
** Changed in: gcc-defaults (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/924502
Title:
gcc is broken with -lstdc++ while g++ is OK
Status in “gcc-defaults” package in Ubuntu:
Invalid
Bug description:
/*
* simple.cc
*/
int main() {
char* buf = new char[64];
return 0;
}
/*
While compile it with g++, it works OK.
BUT when do the following:
$ gcc -L/usr/lib/x86_64-linux-gnu -lstdc++ simple.cc
simple.cc:(.text+0xe): undefined reference to `operator new[](unsigned long)'
collect2: ld returned 1 exit status
$ cd /usr/lib/x86_64-linux-gnu && ls -l libstd*
lrwxrwxrwx 1 root root 14 2012-01-31 10:33 libstdc++.so -> libstdc++.so.6
lrwxrwxrwx 1 root root 19 2011-11-30 18:44 libstdc++.so.6 -> libstdc++.so.6.0.16
-rw-r--r-- 1 root root 991424 2011-09-16 07:29 libstdc++.so.6.0.16.0.16
Thanks.
*/
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gcc 4:4.6.1-2ubuntu5
ProcVersionSignature: Ubuntu 3.0.0-15.26-generic 3.0.13
Uname: Linux 3.0.0-15-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
CheckboxSubmission: 62190ceea7acc7fea6bd96f44736370d
CheckboxSystem: 4ed15c40009aa6f7770f606350a390a2
Date: Tue Jan 31 12:23:08 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/usr/local/bin/bash
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/924502/+subscriptions
More information about the foundations-bugs
mailing list