diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-09-25 21:58:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2007-09-25 22:19:22 +0100 |
commit | f1d84271d363cc80cdef92ec9cac2cf29783bfe0 (patch) | |
tree | 198f22c76ccd84d28cb012e6a27abb5203cfaf20 /configure.in | |
parent | 03be41151d06d48d55bc1e172535829ec45a10cf (diff) |
[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.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 5f7f613a..004d9213 100644 --- a/configure.in +++ b/configure.in @@ -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" ) |