mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 22:18:29 +02:00
[cairo-atomic] Do not use Intel atomic primitives on i386.
When limiting the target instruction set for compatibility with older processors, e.g. -march=i386, the Intel atomic primitives generate a call to a non-existent function, __sync_fetch_and_add_4(). To detect this scenario change the configure test from AC_TRY_COMPILE to AC_TRY_LINK which will then cause Cairo to fall back to using mutexes for its atomic operations.
This commit is contained in:
parent
03be41151d
commit
f1d84271d3
1 changed files with 1 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ dnl
|
|||
AC_MSG_CHECKING([for native atomic primitives])
|
||||
cairo_atomic_primitives="none"
|
||||
|
||||
AC_TRY_COMPILE([int atomic_add(int i) { return __sync_fetch_and_add (&i, 1); }], [],
|
||||
AC_TRY_LINK([int atomic_add(int i) { return __sync_fetch_and_add (&i, 1); }], [],
|
||||
AC_DEFINE(CAIRO_HAS_INTEL_ATOMIC_PRIMITIVES, 1, [Enable if your compiler supports the Intel __sync_* atomic primitives])
|
||||
cairo_atomic_primitives="Intel"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue