diff --git a/configure.ac b/configure.ac index 367a072720..fb7c5c97d8 100644 --- a/configure.ac +++ b/configure.ac @@ -3687,7 +3687,7 @@ AS_IF([test "${universal_binary-no}" = yes ], [ for archs in ${universal_archnames}; do cpu=`echo $archs | sed 's/.*=//'` archs=`echo $archs | sed 's/=.*//'` - RUBY_DEFINE_IF([defined __${archs}__], RUBY_PLATFORM_CPU, ["${cpu}"]) + RUBY_DEFINE_IF([defined __${archs}__ &&! defined RUBY_PLATFORM_CPU], RUBY_PLATFORM_CPU, ["${cpu}"]) done ]) ints='long int short' diff --git a/tool/m4/ruby_universal_arch.m4 b/tool/m4/ruby_universal_arch.m4 index 30f300a9fd..a524bc2592 100644 --- a/tool/m4/ruby_universal_arch.m4 +++ b/tool/m4/ruby_universal_arch.m4 @@ -14,10 +14,7 @@ AS_IF([test ${target_archs+set}], [ for archs in $target_archs do AS_CASE([",$universal_binary,"],[*",$archs,"*], [],[ - cpu=`$SHELL "$ac_aux_dir/config.sub" "${archs}-${target_os}" 2>&1` || { - AC_MSG_RESULT([failed]) - AC_MSG_ERROR([$cpu]) - } + cpu=$archs cpu=`echo $cpu | sed 's/-.*-.*//'` universal_binary="${universal_binary+$universal_binary,}$cpu" universal_archnames="${universal_archnames} ${archs}=${cpu}"