diff options
author | Peter Maydell | 2012-02-23 17:20:05 +0100 |
---|---|---|
committer | Anthony Liguori | 2012-02-24 20:36:06 +0100 |
commit | cdf84806a129a33155d8f93342d377884de9b563 (patch) | |
tree | 003f86fbf30e1221f8def18eaba4ef46fc63694a /configure | |
parent | vl.c: Avoid segfault when started with no arguments (diff) | |
download | qemu-cdf84806a129a33155d8f93342d377884de9b563.tar.gz qemu-cdf84806a129a33155d8f93342d377884de9b563.tar.xz qemu-cdf84806a129a33155d8f93342d377884de9b563.zip |
configure: Check whether makecontext() is a glibc stub function
On some systems (notably ARM Linux) glibc provides implementations
of makecontext(), getcontext() and friends which are stubs which
always return failure. Make the configure test for makecontext()
also check for the presence of the __stub_makecontext macro which
indicates the presence of these stubs, so we can avoid trying to use
them and fall back to a different coroutine implementation instead.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2723,11 +2723,15 @@ fi ########################################## # check if we have makecontext +# (and that it's not a glibc stub which always returns -1) ucontext_coroutine=no if test "$darwin" != "yes"; then cat > $TMPC << EOF #include <ucontext.h> +#ifdef __stub_makecontext +#error Ignoring glibc stub makecontext which will always fail +#endif int main(void) { makecontext(0, 0, 0); return 0; } EOF if compile_prog "" "" ; then |