1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* configure.in (ARCH_FLAG): __sync_val_compare_and_swap_4 needs

-march=i486 on at least linux gcc 4.1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@44953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2014-02-14 11:52:53 +00:00
parent bceb3cd988
commit 59680d0fc0
3 changed files with 29 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Fri Feb 14 20:52:31 2014 NAKAMURA Usaku <usa@ruby-lang.org>
* configure.in (ARCH_FLAG): __sync_val_compare_and_swap_4 needs
-march=i486 on at least linux gcc 4.1.
Fri Feb 14 19:07:13 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ruby_atomic.h (ATOMIC_PTR_EXCHANGE): atomic exchange function for

View file

@ -308,6 +308,29 @@ if test "$target_cpu" != "$host_cpu" -a "$GCC" = yes -a "$cross_compiling" = no
RUBY_DEFAULT_ARCH("$target_cpu")
fi
AS_CASE(["$target_cpu-$target_os"], [[i[3-6]86*]], [
AC_CACHE_CHECK([for __sync_val_compare_and_swap], [rb_cv_gcc_compiler_cas], [
AC_TRY_LINK([unsigned long atomic_var;],
[
__sync_val_compare_and_swap(&atomic_var, 0, 1);
],
[rb_cv_gcc_compiler_cas=yes],
[rb_cv_gcc_compiler_cas=no])])
if test "$rb_cv_gcc_compiler_cas" = no; then
unset rb_cv_gcc_compiler_cas
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -march=i486"
AC_CACHE_CHECK([for __sync_val_compare_and_swap with -march=i486], [rb_cv_gcc_compiler_cas], [
AC_TRY_LINK([unsigned long atomic_var;],
[
__sync_val_compare_and_swap(&atomic_var, 0, 1);
],
[rb_cv_gcc_compiler_cas=yes
ARCH_FLAG="-march=i486"],
[rb_cv_gcc_compiler_cas=no])])
CFLAGS="$save_CFLAGS"
fi])
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(AR, ar)
if test -z "$AR"; then

View file

@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
#define RUBY_PATCHLEVEL 532
#define RUBY_PATCHLEVEL 533
#define RUBY_RELEASE_DATE "2014-02-14"
#define RUBY_RELEASE_YEAR 2014