From 71f80afdbcb45245a01ee2c278ebda692587e92a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 10 May 2012 14:49:39 -0700 Subject: extconf: better check for GCC atomic builtins Attempting to test for CMPXCHG on x86 should allow this check to fail on i386 systems. We also won't need try_run as a result, enabling cross-compilation. The configure.in check in Ruby 1.9.3 does something similar and that's far more widely used than raindrops is. --- ext/raindrops/extconf.rb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/ext/raindrops/extconf.rb b/ext/raindrops/extconf.rb index 9f5de95..447a90a 100644 --- a/ext/raindrops/extconf.rb +++ b/ext/raindrops/extconf.rb @@ -13,23 +13,20 @@ have_func('rb_thread_blocking_region') have_func('rb_thread_io_blocking_region') checking_for "GCC 4+ atomic builtins" do + # we test CMPXCHG anyways even though we don't need it to filter out + # ancient i386-only targets without CMPXCHG src = <