summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-16 08:29:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-16 08:29:21 +0000
commit2915c155e825d5e012b2b4489ac11fc20759ed44 (patch)
treeea06f4044fb9b4506870f95a7deaaa722e089abd /configure.in
parentc2dfaa7d40531aef3706bcc16f38178b0c6633ee (diff)
* configure.in (RUBY_UNIVERSAL_ARCH): restore arch flag.
Bug #4977 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 6 insertions, 3 deletions
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
])