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:
parent
e34eb58ac7
commit
07b4b1b1cb
4 changed files with 33 additions and 1 deletions
|
@ -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
|
||||
],
|
||||
|
|
12
coroutine/universal/Context.S
Normal file
12
coroutine/universal/Context.S
Normal 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
|
17
coroutine/universal/Context.h
Normal file
17
coroutine/universal/Context.h
Normal 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 */
|
|
@ -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@
|
||||
|
|
Loading…
Reference in a new issue