public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Using __sync_* builtins within libgcc code
@ 2008-06-10 11:45 Uros Bizjak
  0 siblings, 0 replies; 11+ messages in thread
From: Uros Bizjak @ 2008-06-10 11:45 UTC (permalink / raw)
  To: Luke Dalessandro; +Cc: GCC

Hello!

> 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.

You have to compile library with -march=i486 to activate these
instructions.  Alternatively, you can use
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_{1, 2, 4, 8, 16} to fall back to
generic implementation.

Uros.

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Using __sync_* builtins within libgcc code
@ 2008-06-10  3:22 Luke Dalessandro
  2008-06-10  6:40 ` Paolo Carlini
  0 siblings, 1 reply; 11+ messages in thread
From: Luke Dalessandro @ 2008-06-10  3:22 UTC (permalink / raw)
  To: gcc

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.

Luke

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-06-11 12:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-10 11:45 Using __sync_* builtins within libgcc code Uros Bizjak
  -- strict thread matches above, loose matches on Subject: below --
2008-06-10  3:22 Luke Dalessandro
2008-06-10  6:40 ` Paolo Carlini
2008-06-10 12:01   ` Joseph S. Myers
2008-06-10 14:22     ` Paolo Carlini
2008-06-10 14:39       ` H.J. Lu
2008-06-10 14:43         ` Joseph S. Myers
2008-06-10 15:37           ` H.J. Lu
2008-06-10 15:36         ` Andrew Haley
2008-06-10 16:34       ` Ross Smith
2008-06-11 12:35   ` Luke Dalessandro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).