* configure.in: move the test for -march=i486 just after

RUBY_UNIVERSAL_ARCH/RUBY_DEFAULT_ARCH.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-02-11 02:06:47 +00:00
Родитель c799b11273
Коммит 0a8fc937ca
2 изменённых файлов: 28 добавлений и 23 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Mon Feb 11 11:04:29 2013 Tanaka Akira <akr@fsij.org>
* configure.in: move the test for -march=i486 just after
RUBY_UNIVERSAL_ARCH/RUBY_DEFAULT_ARCH.
Sun Feb 10 23:42:26 2013 Tanaka Akira <akr@fsij.org>
* ext/socket/extconf.rb: test structure members just after types test.

Просмотреть файл

@ -406,6 +406,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
@ -1553,29 +1576,6 @@ AS_CASE(["$target_os"],
[])
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_CACHE_CHECK(for signbit, rb_cv_have_signbit,
[AC_TRY_LINK([
#include <math.h>