[llvmlinux] Failed to build on x86_64
Joseph Lee
jesa7955 at gmail.com
Sat Aug 15 14:18:17 UTC 2015
Hello,
I was trying to "make kernel-build" using native clang(Debian) for target
x86_64. But it failed and gave these errors.
kernel/rcu/srcu.c:154:17: error: non-const static data member must be
>> initialized out of line
>
> t = READ_ONCE(per_cpu_ptr(sp->per_cpu_ref, cpu)->seq[idx]);
>
> ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> include/linux/percpu-defs.h:222:2: note: expanded from macro 'per_cpu_ptr'
>
> __verify_pcpu_ptr(ptr); \
>
> ^
>
> include/linux/percpu-defs.h:206:23: note: expanded from macro
>> '__verify_pcpu_ptr'
>
> const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
>
> ^
>
> include/linux/compiler.h:252:20: note: expanded from macro 'READ_ONCE'
>
> ({ union { typeof(x) __val; char __c[1]; } __u;
>> __read_once_size(&(x), __u.__c, sizeof(x)); __u.__val; })
>
> ^
>
> kernel/rcu/srcu.c:171:17: error: non-const static data member must be
>> initialized out of line
>
> t = READ_ONCE(per_cpu_ptr(sp->per_cpu_ref, cpu)->c[idx]);
>
> ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> include/linux/percpu-defs.h:222:2: note: expanded from macro 'per_cpu_ptr'
>
> __verify_pcpu_ptr(ptr); \
>
> ^
>
> include/linux/percpu-defs.h:206:23: note: expanded from macro
>> '__verify_pcpu_ptr'
>
> const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
>
> ^
>
> include/linux/compiler.h:252:20: note: expanded from macro 'READ_ONCE'
>
> ({ union { typeof(x) __val; char __c[1]; } __u;
>> __read_once_size(&(x), __u.__c, sizeof(x)); __u.__val; })
>
> ^
>
> kernel/rcu/srcu.c:268:20: error: non-const static data member must be
>> initialized out of line
>
> sum += READ_ONCE(per_cpu_ptr(sp->per_cpu_ref, cpu)->c[0]);
>
> ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> include/linux/percpu-defs.h:222:2: note: expanded from macro 'per_cpu_ptr'
>
> __verify_pcpu_ptr(ptr); \
>
> ^
>
> include/linux/percpu-defs.h:206:23: note: expanded from macro
>> '__verify_pcpu_ptr'
>
> const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
>
> ^
>
> include/linux/compiler.h:252:20: note: expanded from macro 'READ_ONCE'
>
> ({ union { typeof(x) __val; char __c[1]; } __u;
>> __read_once_size(&(x), __u.__c, sizeof(x)); __u.__val; })
>
> ^
>
> kernel/rcu/srcu.c:269:20: error: non-const static data member must be
>> initialized out of line
>
> sum += READ_ONCE(per_cpu_ptr(sp->per_cpu_ref, cpu)->c[1]);
>
> ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> include/linux/percpu-defs.h:222:2: note: expanded from macro 'per_cpu_ptr'
>
> __verify_pcpu_ptr(ptr); \
>
> ^
>
> include/linux/percpu-defs.h:206:23: note: expanded from macro
>> '__verify_pcpu_ptr'
>
> const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
>
> ^
>
> include/linux/compiler.h:252:20: note: expanded from macro 'READ_ONCE'
>
> ({ union { typeof(x) __val; char __c[1]; } __u;
>> __read_once_size(&(x), __u.__c, sizeof(x)); __u.__val; })
>
> ^
>
> 4 errors generated.
>
>
Why did I get this error?
Thanks in advance.
Joseph.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20150815/5382c10b/attachment.html>
More information about the LLVMLinux
mailing list