зеркало из https://github.com/github/ruby.git
Refix of r37904
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
4ba88161ee
Коммит
13dc0e14fe
|
@ -43,6 +43,7 @@ Wed Nov 28 02:55:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
|||
|
||||
* configure.in (ARCH_FLAG): __sync_val_compare_and_swap_4 needs
|
||||
-march=$target_cpu on at least linux gcc 4.1.
|
||||
patched by KOSAKI Motohiro
|
||||
|
||||
Tue Nov 27 22:03:09 2012 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
|
|
18
configure.in
18
configure.in
|
@ -241,10 +241,9 @@ AC_ARG_WITH(arch,
|
|||
|
||||
AC_DEFUN([RUBY_DEFAULT_ARCH], [
|
||||
AC_MSG_CHECKING([arch option])
|
||||
AS_CASE([$1-$target_os],
|
||||
[*64-*], [ARCH_FLAG=-m64],
|
||||
[[i[3-6]86-linux]], [ARCH_FLAG=-march=$1],
|
||||
[[i[3-6]86-*]], [ARCH_FLAG=-m32],
|
||||
AS_CASE([$1],
|
||||
[*64], [ARCH_FLAG=-m64],
|
||||
[[i[3-6]86]], [ARCH_FLAG=-m32],
|
||||
[AC_MSG_ERROR(unknown target architecture: $target_archs)]
|
||||
)
|
||||
AC_MSG_RESULT([$ARCH_FLAG])
|
||||
|
@ -1534,6 +1533,17 @@ AS_CASE(["$target_os"],
|
|||
[hpux*], [AC_DEFINE(SPT_TYPE,SPT_PSTAT) ],
|
||||
[])
|
||||
|
||||
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
|
||||
ARCH_FLAG="-march=i486"
|
||||
fi
|
||||
|
||||
|
||||
AC_CACHE_CHECK(for signbit, rb_cv_have_signbit,
|
||||
[AC_TRY_LINK([
|
||||
|
|
Загрузка…
Ссылка в новой задаче