From: Václav Slavík Date: Tue, 4 Dec 2007 15:29:17 +0000 (+0000) Subject: when testing for GCC's atomic builtins, try to link too (see bug #1844128); also... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9dcff96ba98fb9c99d8480af3d7c9d21ce372a25 when testing for GCC's atomic builtins, try to link too (see bug #1844128); also more closely mirror wx's use by using unsigned int and not int for tests git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/build/aclocal/atomic_builtins.m4 b/build/aclocal/atomic_builtins.m4 index 45b88e90f4..bf2bcd17e3 100644 --- a/build/aclocal/atomic_builtins.m4 +++ b/build/aclocal/atomic_builtins.m4 @@ -8,10 +8,10 @@ AC_DEFUN([WX_ATOMIC_BUILTINS], if test -n "$GCC"; then AC_MSG_CHECKING([for __sync_fetch_* builtins]) AC_CACHE_VAL(wx_cv_cc_gcc_atomic_builtins, [ - AC_TRY_COMPILE( + AC_TRY_LINK( [], [ - int value=0; + unsigned int value=0; __sync_fetch_and_add(&value, 1); __sync_sub_and_fetch(&value, 1); ], diff --git a/configure b/configure index c3bf79365e..56ccf84904 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 50226 2007-11-24 19:11:19Z PC . +# From configure.in Id: configure.in 50303 2007-11-28 06:46:25Z PC . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0. # @@ -24789,7 +24789,7 @@ int main () { - int value=0; + unsigned int value=0; __sync_fetch_and_add(&value, 1); __sync_sub_and_fetch(&value, 1); @@ -24797,14 +24797,14 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -24813,7 +24813,8 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then wx_cv_cc_gcc_atomic_builtins=yes else echo "$as_me: failed program was:" >&5 @@ -24822,7 +24823,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 wx_cv_cc_gcc_atomic_builtins=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi