_GLIBCXX_PROFILE on non-Linux?

Gerald Pfeifer gerald@pfeifer.com
Sun Jan 17 22:07:00 GMT 2010


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



More information about the Libstdc++ mailing list