diff --git a/ChangeLog b/ChangeLog index 5bb44eda9e..75aab676b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Jul 16 17:29:20 2011 Nobuyoshi Nakada + + * configure.in (RUBY_UNIVERSAL_ARCH): restore arch flag. + Bug #4977 + Sat Jul 16 06:27:51 2011 Marc-Andre Lafortune * lib/uri/common.rb (module): Remove optional parser argument to diff --git a/configure.in b/configure.in index 5129e7944d..29c5c126eb 100644 --- a/configure.in +++ b/configure.in @@ -155,9 +155,10 @@ AC_MSG_RESULT([$ARCH_FLAG]) AC_DEFUN([RUBY_UNIVERSAL_ARCH], [ # RUBY_UNIVERSAL_ARCH begin +ARCH_FLAG=`expr " $CFLAGS " : ['.* \(-m[0-9][0-9]*\) ']` test ${CFLAGS+set} && CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g'` test ${LDFLAGS+set} && LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g'` -unset ARCH_FLAG universal_binary universal_archnames +unset universal_binary universal_archnames if test ${target_archs+set}; then AC_MSG_CHECKING([target architectures]) target_archs=`echo $target_archs | tr , ' '` @@ -202,8 +203,6 @@ if test ${target_archs+set}; then fi AS_CASE(["$target"], [-*], [ target="$target_cpu${target}"]) AS_CASE(["$target_alias"], [-*], [ target_alias="$target_cpu${target_alias}"]) - CFLAGS="$CFLAGS ${ARCH_FLAG}" - LDFLAGS="${LDFLAGS+$LDFLAGS }${ARCH_FLAG}" else if test x"$target_alias" = x; then AS_CASE(["$target_os"], @@ -236,6 +235,10 @@ if test "${target_archs}" != "${rb_cv_target_archs-${target_archs}}"; then else rb_cv_target_archs=${target_archs} fi +if test "x${ARCH_FLAG}" != x; then + CFLAGS="$CFLAGS ${ARCH_FLAG}" + LDFLAGS="${LDFLAGS+$LDFLAGS }${ARCH_FLAG}" +fi # RUBY_UNIVERSAL_ARCH end ])