Bail out when unsupported coroutine target
This commit is contained in:
parent
9fc25811d5
commit
a0a5eec0e7
11
configure.ac
11
configure.ac
@ -2386,6 +2386,7 @@ AC_ARG_WITH(coroutine,
|
|||||||
[rb_cv_coroutine=$withval])
|
[rb_cv_coroutine=$withval])
|
||||||
AS_CASE([$rb_cv_coroutine], [yes|''], [
|
AS_CASE([$rb_cv_coroutine], [yes|''], [
|
||||||
AC_MSG_CHECKING(native coroutine implementation for ${target_cpu}-${target_os})
|
AC_MSG_CHECKING(native coroutine implementation for ${target_cpu}-${target_os})
|
||||||
|
rb_cv_coroutine=
|
||||||
AS_CASE(["$target_cpu-$target_os"],
|
AS_CASE(["$target_cpu-$target_os"],
|
||||||
[x*64-darwin*], [
|
[x*64-darwin*], [
|
||||||
rb_cv_coroutine=amd64
|
rb_cv_coroutine=amd64
|
||||||
@ -2397,7 +2398,7 @@ AS_CASE([$rb_cv_coroutine], [yes|''], [
|
|||||||
AS_CASE(["$ac_cv_sizeof_voidp"],
|
AS_CASE(["$ac_cv_sizeof_voidp"],
|
||||||
[8], [ rb_cv_coroutine=amd64 ],
|
[8], [ rb_cv_coroutine=amd64 ],
|
||||||
[4], [ rb_cv_coroutine=x86 ],
|
[4], [ rb_cv_coroutine=x86 ],
|
||||||
[*], [ rb_cv_coroutine= ]
|
dnl unknown pointer size, bail out as no Context.h soon.
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
[*86-linux*], [
|
[*86-linux*], [
|
||||||
@ -2427,20 +2428,22 @@ AS_CASE([$rb_cv_coroutine], [yes|''], [
|
|||||||
[*-openbsd*], [
|
[*-openbsd*], [
|
||||||
rb_cv_coroutine=copy
|
rb_cv_coroutine=copy
|
||||||
],
|
],
|
||||||
[*], [
|
[
|
||||||
rb_cv_coroutine=ucontext
|
rb_cv_coroutine=ucontext
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
AC_MSG_RESULT(${rb_cv_coroutine})
|
AC_MSG_RESULT(${rb_cv_coroutine})
|
||||||
])
|
])
|
||||||
COROUTINE_H=coroutine/$rb_cv_coroutine/Context.h
|
COROUTINE_H=coroutine/$rb_cv_coroutine/Context.h
|
||||||
|
AS_IF([test ! -f "$srcdir/$COROUTINE_H"],
|
||||||
|
[AC_MSG_ERROR('$rb_cv_coroutine' is not supported as coroutine)])
|
||||||
AS_CASE([$rb_cv_coroutine],
|
AS_CASE([$rb_cv_coroutine],
|
||||||
[copy|ucontext], [
|
[copy|ucontext], [
|
||||||
COROUTINE_SRC=coroutine/$rb_cv_coroutine/Context.c
|
COROUTINE_SRC=coroutine/$rb_cv_coroutine/Context.c
|
||||||
],
|
],
|
||||||
[*], [
|
[
|
||||||
COROUTINE_SRC=coroutine/$rb_cv_coroutine/Context.'$(ASMEXT)'
|
COROUTINE_SRC=coroutine/$rb_cv_coroutine/Context.'$(ASMEXT)'
|
||||||
],
|
]
|
||||||
)
|
)
|
||||||
AC_DEFINE_UNQUOTED(COROUTINE_H, ["$COROUTINE_H"])
|
AC_DEFINE_UNQUOTED(COROUTINE_H, ["$COROUTINE_H"])
|
||||||
AC_SUBST(X_COROUTINE_H, [$COROUTINE_H])
|
AC_SUBST(X_COROUTINE_H, [$COROUTINE_H])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user