summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2017-03-07 15:52:17 +0200
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2017-03-08 11:56:09 +0200
commitf65c9f825d164cf79dd6d5897ef144abba40ff6d (patch)
tree7b552d95aba3bc1ac0d2d7adec49beead456eb45 /mysys
parent6860a4b55664d8fc53636906240c089417e1849d (diff)
downloadmariadb-git-f65c9f825d164cf79dd6d5897ef144abba40ff6d.tar.gz
mysql_client_test_nonblock fails when compiled with clang
mysql_client uses some inline assembly code to switch thread stacks. This works, however tools that perform backtrace get confused to fix this we write a specific constant to signify bottom of stack. This constant is needed when compiling with CLang as well.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/my_context.c b/mysys/my_context.c
index 5ddb2ccd566..6960b0c6c5a 100644
--- a/mysys/my_context.c
+++ b/mysys/my_context.c
@@ -206,7 +206,8 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d)
(
"movq %%rsp, (%[save])\n\t"
"movq %[stack], %%rsp\n\t"
-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && !defined(__INTEL_COMPILER)
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || __clang__) && \
+ !defined(__INTEL_COMPILER)
/*
This emits a DWARF DW_CFA_undefined directive to make the return address
undefined. This indicates that this is the top of the stack frame, and