1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* configure.in (target, target_alias): replace with real cpu.

* mkconfig.rb: build* are not needed in rbconfig.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-10-23 05:25:56 +00:00
parent a56b1bc27b
commit 32df7768b8
3 changed files with 16 additions and 5 deletions

View file

@ -1,4 +1,8 @@
Fri Oct 23 14:22:51 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> Fri Oct 23 14:25:54 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (target, target_alias): replace with real cpu.
* mkconfig.rb: build* are not needed in rbconfig.rb.
* configure.in (warnflags): use -Wextra only when * configure.in (warnflags): use -Wextra only when
-Wno-missing-field-initializers is available. -Wno-missing-field-initializers is available.

View file

@ -189,18 +189,18 @@ if test ${target_archs+set}; then
esac esac
AC_MSG_RESULT([$target_archs]) AC_MSG_RESULT([$target_archs])
target=`echo $target | sed "s/^$target_cpu-/-/"`
target_alias=`echo $target_alias | sed "s/^$target_cpu-/-/"`
if test "${universal_binary-no}" = yes; then if test "${universal_binary-no}" = yes; then
RUBY_PREREQ_AC(2.63, [ to compile universal binary]) RUBY_PREREQ_AC(2.63, [ to compile universal binary])
AC_SUBST(try_header,try_compile) AC_SUBST(try_header,try_compile)
target=`echo $target | sed "s/^$target_cpu-/universal-/"`
target_alias=`echo $target_alias | sed "s/^$target_cpu-/universal-/"`
target_cpu=universal target_cpu=universal
real_cross_compiling=$cross_compiling real_cross_compiling=$cross_compiling
else else
target=`echo $target | sed "s/^$target_cpu-/${target_archs}-/"`
target_alias=`echo $target_alias | sed "s/^$target_cpu-/${target_archs}-/"`
target_cpu=${target_archs} target_cpu=${target_archs}
fi fi
case "$target" in when(-*) target="$target_cpu${target}";; esac
case "$target_alias" in when(-*) target_alias="$target_cpu${target_alias}";; esac
CFLAGS="$CFLAGS ${ARCH_FLAG}" CFLAGS="$CFLAGS ${ARCH_FLAG}"
LDFLAGS="${LDFLAGS+$LDFLAGS }${ARCH_FLAG}" LDFLAGS="${LDFLAGS+$LDFLAGS }${ARCH_FLAG}"
else else
@ -208,6 +208,7 @@ else
case "$target_os" in case "$target_os" in
when(darwin*) when(darwin*)
AC_MSG_CHECKING([for real target cpu]) AC_MSG_CHECKING([for real target cpu])
target=`echo $target | sed "s/^$target_cpu-/-/"`
target_cpu=`$CC -E - 2>/dev/null <<EOF | target_cpu=`$CC -E - 2>/dev/null <<EOF |
#ifdef __x86_64__ #ifdef __x86_64__
"processor-name=x86_64" "processor-name=x86_64"
@ -223,6 +224,7 @@ else
#endif #endif
EOF EOF
sed -n 's/^"processor-name=\(.*\)"/\1/p'` sed -n 's/^"processor-name=\(.*\)"/\1/p'`
target="$target_cpu${target}"
AC_MSG_RESULT([$target_cpu]) AC_MSG_RESULT([$target_cpu])
;; ;;
esac esac
@ -311,7 +313,11 @@ when(cygwin*|mingw*)
AC_CHECK_TOOL(NM, nm) AC_CHECK_TOOL(NM, nm)
AC_CHECK_TOOL(WINDRES, windres) AC_CHECK_TOOL(WINDRES, windres)
AC_CHECK_TOOL(DLLWRAP, dllwrap) AC_CHECK_TOOL(DLLWRAP, dllwrap)
target=`echo $target | sed "s/^$target_cpu-/-/"`
target_alias=`echo $target_alias | sed "s/^$target_cpu-/-/"`
target_cpu=`echo $target_cpu | sed s/i.86/i386/` target_cpu=`echo $target_cpu | sed s/i.86/i386/`
case "$target" in when(-*) target="$target_cpu${target}";; esac
case "$target_alias" in when(-*) target_alias="$target_cpu${target_alias}";; esac
case "$target_os" in case "$target_os" in
when(mingw*) when(mingw*)
test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt

View file

@ -77,6 +77,7 @@ File.foreach "config.status" do |line|
when /^RUBY_SO_NAME$/; next if $so_name when /^RUBY_SO_NAME$/; next if $so_name
when /^arch$/; if val.empty? then val = arch else arch = val end when /^arch$/; if val.empty? then val = arch else arch = val end
when /^sitearch/; val = '$(arch)' if val.empty? when /^sitearch/; val = '$(arch)' if val.empty?
when /^build/; next
end end
case val case val
when /^\$\(ac_\w+\)$/; next when /^\$\(ac_\w+\)$/; next