|
@@ -1759,7 +1759,7 @@ Advanced options (experts only):
|
|
--oss-lib path to OSS library
|
|
--oss-lib path to OSS library
|
|
--cpu=CPU Build for host CPU [$cpu]
|
|
--cpu=CPU Build for host CPU [$cpu]
|
|
--with-coroutine=BACKEND coroutine backend. Supported options:
|
|
--with-coroutine=BACKEND coroutine backend. Supported options:
|
|
- ucontext, sigaltstack, windows
|
|
|
|
|
|
+ ucontext, libucontext, sigaltstack, windows
|
|
--enable-gcov enable test coverage analysis with gcov
|
|
--enable-gcov enable test coverage analysis with gcov
|
|
--gcov=GCOV use specified gcov [$gcov_tool]
|
|
--gcov=GCOV use specified gcov [$gcov_tool]
|
|
--disable-blobs disable installing provided firmware blobs
|
|
--disable-blobs disable installing provided firmware blobs
|
|
@@ -5341,6 +5341,8 @@ if test "$coroutine" = ""; then
|
|
coroutine=win32
|
|
coroutine=win32
|
|
elif test "$ucontext_works" = "yes"; then
|
|
elif test "$ucontext_works" = "yes"; then
|
|
coroutine=ucontext
|
|
coroutine=ucontext
|
|
|
|
+ elif test "$ios" = "yes"; then
|
|
|
|
+ coroutine=libucontext
|
|
else
|
|
else
|
|
coroutine=sigaltstack
|
|
coroutine=sigaltstack
|
|
fi
|
|
fi
|
|
@@ -5364,12 +5366,29 @@ else
|
|
error_exit "only the 'windows' coroutine backend is valid for Windows"
|
|
error_exit "only the 'windows' coroutine backend is valid for Windows"
|
|
fi
|
|
fi
|
|
;;
|
|
;;
|
|
|
|
+ libucontext)
|
|
|
|
+ ;;
|
|
*)
|
|
*)
|
|
error_exit "unknown coroutine backend $coroutine"
|
|
error_exit "unknown coroutine backend $coroutine"
|
|
;;
|
|
;;
|
|
esac
|
|
esac
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
+case $coroutine in
|
|
|
|
+libucontext)
|
|
|
|
+ git_submodules="${git_submodules} libucontext"
|
|
|
|
+ mkdir -p libucontext
|
|
|
|
+ QEMU_CFLAGS="$QEMU_CFLAGS -I\$(SRC_PATH)/libucontext/include"
|
|
|
|
+ LIBS="-L\$(BUILD_DIR)/libucontext -lucontext $LIBS"
|
|
|
|
+ ;;
|
|
|
|
+esac
|
|
|
|
+
|
|
|
|
+if test "$coroutine" == "libucontext"; then
|
|
|
|
+ coroutine_impl=ucontext
|
|
|
|
+else
|
|
|
|
+ coroutine_impl=$coroutine
|
|
|
|
+fi
|
|
|
|
+
|
|
if test "$coroutine_pool" = ""; then
|
|
if test "$coroutine_pool" = ""; then
|
|
coroutine_pool=yes
|
|
coroutine_pool=yes
|
|
fi
|
|
fi
|
|
@@ -7246,7 +7265,7 @@ if test "$rbd" = "yes" ; then
|
|
echo "RBD_LIBS=$rbd_libs" >> $config_host_mak
|
|
echo "RBD_LIBS=$rbd_libs" >> $config_host_mak
|
|
fi
|
|
fi
|
|
|
|
|
|
-echo "CONFIG_COROUTINE_BACKEND=$coroutine" >> $config_host_mak
|
|
|
|
|
|
+echo "CONFIG_COROUTINE_BACKEND=$coroutine_impl" >> $config_host_mak
|
|
if test "$coroutine_pool" = "yes" ; then
|
|
if test "$coroutine_pool" = "yes" ; then
|
|
echo "CONFIG_COROUTINE_POOL=1" >> $config_host_mak
|
|
echo "CONFIG_COROUTINE_POOL=1" >> $config_host_mak
|
|
else
|
|
else
|
|
@@ -8040,6 +8059,10 @@ fi
|
|
if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then
|
|
if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then
|
|
echo "config-host.h: capstone/all" >> $config_host_mak
|
|
echo "config-host.h: capstone/all" >> $config_host_mak
|
|
fi
|
|
fi
|
|
|
|
+if [ "$coroutine" = "libucontext" ]; then
|
|
|
|
+ echo "config-host.h: subdir-libucontext" >> $config_host_mak
|
|
|
|
+ echo "CONFIG_LIBUCONTEXT=y" >> $config_host_mak
|
|
|
|
+fi
|
|
if test -n "$LIBCAPSTONE"; then
|
|
if test -n "$LIBCAPSTONE"; then
|
|
echo "LIBCAPSTONE=$LIBCAPSTONE" >> $config_host_mak
|
|
echo "LIBCAPSTONE=$LIBCAPSTONE" >> $config_host_mak
|
|
fi
|
|
fi
|