This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using __sync_* builtins within libgcc code
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Luke Dalessandro <luked at cs dot rochester dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 10 Jun 2008 08:40:21 +0200
- Subject: Re: Using __sync_* builtins within libgcc code
- References: <484DF34C.5040005@cs.rochester.edu>
Luke Dalessandro wrote:
I'm making some modifications to exception handling inside of
unwind-dw2-fde.c that I'd like to use __sync_bool_compare_and_swap
for, unfortunately I can't seem to figure out how to correctly use
builtins in the context of libgcc.
I've tried a bunch of different things, but I consistently get the error
bin/../lib/gcc/i686-pc-linux-gnu/4.3.1/../../../libgcc_s.so:
undefined reference to `__sync_bool_compare_and_swap_4'
so clearly I'm not getting this symbol included correctly when I
build. Any advice would be appreciated.
Isn't this the well know, annoying, issue that the default
sub-architecture is i386 and the builtins are only available on i486 and
later?
Maybe you can usefully exploit the recently added
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_* macros or add a few more along the
same way...
Paolo.