Skip to content

Commit

Permalink
Fix ARCH_FLAG when --with-arch with single CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 15, 2023
1 parent cc9aeec commit 1e5c402
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tool/m4/ruby_default_arch.m4
@@ -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

0 comments on commit 1e5c402

Please sign in to comment.