This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: _GLIBCXX_PROFILE on non-Linux?
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Gerald Pfeifer <gerald at pfeifer dot com>
- Cc: libstdc++ at gcc dot gnu dot org, Silvius Rus <rus at google dot com>
- Date: Sun, 17 Jan 2010 22:39:46 +0100
- Subject: Re: _GLIBCXX_PROFILE on non-Linux?
- References: <alpine.LSU.1.99.1001172200160.16540@acrux.dbai.tuwien.ac.at>
Hi,
let's ask Silvius, but...
> 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'
>
If, as I believe it's the case, profile-mode is completely header-based
(no .cc files) the above issue should be trivial to solve, just pass a
-march providing the builtins, I think i586 should be enough for such
32-bit x86 targets. I don't think the issue is really with FreeBSD vs
Linux, has to do with the CPU, the usual obnoxious issue with the atomic
builtins...
Paolo.