diff --git a/ChangeLog b/ChangeLog index 57909c5a7e..ad81cc15ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Nov 28 02:55:35 2012 NARUSE, Yui + + * configure.in (ARCH_FLAG): __sync_val_compare_and_swap_4 needs + -march=i486 on at least linux gcc 4.1. + Tue Nov 27 22:03:09 2012 Akinori MUSHA * string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints) diff --git a/configure.in b/configure.in index 7fa99c6d55..a543fe7f52 100644 --- a/configure.in +++ b/configure.in @@ -241,9 +241,10 @@ AC_ARG_WITH(arch, AC_DEFUN([RUBY_DEFAULT_ARCH], [ AC_MSG_CHECKING([arch option]) -AS_CASE([$1], - [*64], [ARCH_FLAG=-m64], - [[i[3-6]86]], [ARCH_FLAG=-m32], +AS_CASE([$1-$target_os], + [*64-*], [ARCH_FLAG=-m64], + [[i[3-6]86-linux]], [ARCH_FLAG=-march=i486], + [[i[3-6]86-*]], [ARCH_FLAG=-m32], [AC_MSG_ERROR(unknown target architecture: $target_archs)] ) AC_MSG_RESULT([$ARCH_FLAG])