This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
_GLIBCXX_PROFILE on non-Linux?
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sun, 17 Jan 2010 22:11:42 +0100 (CET)
- Subject: _GLIBCXX_PROFILE on non-Linux?
I am wondering whether there is anything that we may need to do to enable
_GLIBCXX_PROFILE on non-Linux platforms, specifically FreeBSD?
On my GCC tester, I am seeing something like the following for both
complex and simple programs:
% .../g++ -D_GLIBCXX_PROFILE x.cc
/var/tmp//ccDvxnqv.o(.gnu.linkonce.t._ZN13__gnu_profile6__turnENS_12__state_typeE+0x1f):
In function `__gnu_profile::__turn(__gnu_profile::__state_type)':
: undefined reference to `__sync_val_compare_and_swap_4'
Here is the simple test program I used:
#include <iostream>
#include <vector>
main() {
const char *s = "Hello world!\n";
std::vector<char> v;
for(s; *s != '\0'; s++)
v.push_back(*s);
for(std::vector<char>::const_iterator i = v.begin(); i != v.end(); i++)
std::cout << *i;
}
Google did not trigger anything, so I am not sure whether this is just
a case of problem between chair and keyboard or something where we need
to adjust something (and be it the documentation).
Gerald