summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSergey Fedorov <vital.had@gmail.com>2022-10-19 18:49:45 +0800
committerGitHub <noreply@github.com>2022-10-19 23:49:45 +1300
commit567725ed303b6738493c80efaf93dc4c1e65a9c9 (patch)
tree75f141047050eee63c05d613491595a7a9380afa /configure.ac
parentfc3137ef54562c3c3290245c0f62e0bb193c3145 (diff)
Fix and improve coroutines for Darwin (macOS) ppc/ppc64. (#5975)
Notes
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 7 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 058bfd3aa8..93141dcd9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1902,8 +1902,8 @@ AS_CASE(["${target_cpu}-${target_os}:${target_archs}"],
[universal-darwin*:*ppc*], [
AC_LIBSOURCES(alloca.c)
AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.${ac_objext}])
- RUBY_DEFINE_IF([defined __powerpc__], C_ALLOCA, 1)
- RUBY_DEFINE_IF([defined __powerpc__], alloca, alloca)
+ RUBY_DEFINE_IF([defined __POWERPC__], C_ALLOCA, 1) # Darwin defines __POWERPC__ for ppc and ppc64 both
+ RUBY_DEFINE_IF([defined __POWERPC__], alloca, alloca)
],
[
AC_FUNC_ALLOCA
@@ -2573,10 +2573,13 @@ AS_CASE([$coroutine_type], [yes|''], [
[arm64-darwin*], [
coroutine_type=arm64
],
- [powerpc-darwin*], [
+ # Correct target name is powerpc*-, but Ruby seems to prefer ppc*-.
+ # Notice that Darwin PPC ABI differs from AIX and ELF.
+ # Adding PPC targets for AIX, *BSD and *Linux will require separate implementations.
+ [powerpc-darwin*|ppc-darwin*], [
coroutine_type=ppc
],
- [powerpc64-darwin*], [
+ [powerpc64-darwin*|ppc64-darwin*], [
coroutine_type=ppc64
],
[x*64-linux*], [