mh+jemalloc at glandium.org
Mon Mar 19 09:25:14 PDT 2012
On Fri, Mar 16, 2012 at 07:22:47AM +0100, Mike Hommey wrote:
> > Ouch. Maybe "CPPFLAGS=-D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 configure …" will be an adequate workaround.
> Alternatively, adding __arm__ to the other place where the __sync_*
> functions are used works too. (where currently there is sha4 and mips)
So, I've found the pattern, and we should probably test for it in
configure instead of relying on endless if defined() || defined() tests.
When no __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* is defined by the compiler,
the __sync_* functions may actually be defined in libgcc.a. So we should
have an AC_TRY_LINK test using the __sync_* functions when
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_* is not set and AC_DEFINE something
when that works.
More information about the jemalloc-discuss