This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: _GLIBCXX_PROFILE on non-Linux?
On Sun, 17 Jan 2010, Paolo Carlini wrote:
>> 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.
Italia, 10 points. :-)
Good remote diagnosis, Paolo. -march=i586 or -march=i486 indeed makes
this link and then work, too.
> 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...
Silvius et al, this link-time error is quite confusing. Is this a bug
in the implementation (regular libstdc++ works on i386 just fine), or
is it necessary for profiling mode? If the latter, can we diagnose this
condition at compile-time and then issue a nice #error ?
Gerald