Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
ARCH_FLAG
when --with-arch
with single CPU
- Loading branch information
Showing
1 changed file
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
dnl -*- Autoconf -*- | ||
AC_DEFUN([RUBY_DEFAULT_ARCH], [ | ||
# Set ARCH_FLAG for different width but family CPU | ||
AC_MSG_CHECKING([arch option]) | ||
AS_CASE([$1], | ||
[arm64], [], | ||
[*64], [ARCH_FLAG=-m64], | ||
[[i[3-6]86]], [ARCH_FLAG=-m32], | ||
[ppc], [ARCH_FLAG=-m32], | ||
[AC_MSG_ERROR(unknown target architecture: $target_archs)] | ||
) | ||
AS_CASE([$1:"$host_cpu"], | ||
[arm64:arm*], [ARCH_FLAG=-m64], | ||
[arm*:arm*], [ARCH_FLAG=-m32], | ||
[x86_64:[i[3-6]86]], [ARCH_FLAG=-m64], | ||
[[i[3-6]86]:x86_64], [ARCH_FLAG=-m32], | ||
[ppc64:ppc*], [ARCH_FLAG=-m64], | ||
[ppc*:ppc64], [ARCH_FLAG=-m32], | ||
) | ||
AC_MSG_RESULT([$ARCH_FLAG]) | ||
])dnl |