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

Support coroutine on universal binary

This commit is contained in:
Nobuyoshi Nakada 2021-01-22 23:41:52 +09:00
parent e34eb58ac7
commit 07b4b1b1cb
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
4 changed files with 33 additions and 1 deletions

View file

@ -2412,6 +2412,9 @@ AS_CASE([$rb_cv_coroutine], [yes|''], [
AC_MSG_CHECKING(native coroutine implementation for ${target_cpu}-${target_os})
rb_cv_coroutine=
AS_CASE(["$target_cpu-$target_os"],
[universal-darwin*], [
rb_cv_coroutine=universal
],
[x*64-darwin*], [
rb_cv_coroutine=amd64
],

View file

@ -0,0 +1,12 @@
#if 0
#elif defined __x86_64__
# include "coroutine/amd64/Context.S"
#elif defined __i386__
# include "coroutine/x86/Context.S"
#elif defined __ppc64__
# include "coroutine/ppc64le/Context.S"
#elif defined __arm64__
# include "coroutine/arm64/Context.S"
#else
# error "Unsupported CPU"
#endif

View file

@ -0,0 +1,17 @@
#ifndef COROUTINE_UNIVERSAL_CONTEXT_H
#define COROUTINE_UNIVERSAL_CONTEXT_H 1
#if 0
#elif defined __x86_64__
# include "coroutine/amd64/Context.h"
#elif defined __i386__
# include "coroutine/x86/Context.h"
#elif defined __ppc64__
# include "coroutine/ppc64le/Context.h"
#elif defined __arm64__
# include "coroutine/arm64/Context.h"
#else
# error "Unsupported CPU"
#endif
#endif /* COROUTINE_UNIVERSAL_CONTEXT_H */

View file

@ -217,7 +217,7 @@ AR = @AR@
ARFLAGS = @ARFLAGS@$(empty)
RANLIB = @RANLIB@
AS = @AS@
ASFLAGS = @ASFLAGS@ $(INCFLAGS)
ASFLAGS = @ASFLAGS@ $(ARCH_FLAG) $(INCFLAGS)
IFCHANGE = $(tooldir)/ifchange
OBJDUMP = @OBJDUMP@
OBJCOPY = @OBJCOPY@