From: Colin LeMahieu Date: Wed, 5 Sep 2012 22:02:16 +0000 (+0400) Subject: Fix GC_get_stack_base assembly code (Cygwin/Clang) X-Git-Tag: gc7_4_0~222 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf0d3b88d37cf4617a6b3b23ac03e067ca3e4afb;p=gc Fix GC_get_stack_base assembly code (Cygwin/Clang) * os_dep.c (GC_get_stack_base): Use inline assembly statement instead of variable assembly attribute (to workaround clang 3.1 linkage error on Cygwin). --- diff --git a/os_dep.c b/os_dep.c index 6539dcf2..7fdfff93 100644 --- a/os_dep.c +++ b/os_dep.c @@ -781,7 +781,10 @@ GC_INNER word GC_page_size = 0; /* gcc version of boehm-gc). */ GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *sb) { - extern void * _tlsbase __asm__ ("%fs:4"); + void * _tlsbase; + + __asm__ ("movl %%fs:4, %0" + : "=r" (_tlsbase)); sb -> mem_base = _tlsbase; return GC_SUCCESS; }