[compiler-rt] r246454 - builtins: implement __emutls_get_address

H.J. Lu via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 4 10:10:52 PDT 2015


On Fri, Sep 4, 2015 at 9:53 AM, Chih-hung Hsieh <chh at google.com> wrote:
> What are the compilation flags to trigger that failure?
> It is unexpected that a target integer word is 8 and sizeof(size_t) is 4.
> If that configuration is correct, and also needs emutls, then it cannot use
> both gnu's emutls.c and this one because the layout difference. If that
> platform does not need emutls or compatibility with gcc, then we can skip
> this test for that platform.
>
>
compiler-rt is compiled by gcc:

[hjl at gnu-32 bin]$ cat /tmp/i.c
typedef __SIZE_TYPE__ size_t;
typedef unsigned int gcc_word __attribute__((mode(word)));

int foo[sizeof(size_t) == sizeof(gcc_word) ? 1 : -1];
[hjl at gnu-32 bin]$ gcc -S -mx32 /tmp/i.c
/tmp/i.c:4:5: error: size of array ‘foo’ is negative
 int foo[sizeof(size_t) == sizeof(gcc_word) ? 1 : -1];
     ^
[hjl at gnu-32 bin]$

-- 
H.J.


More information about the llvm-commits mailing list