[cfe-dev] clang 3.6 compile failure but clang 3.4 success
Reid Kleckner
rnk at google.com
Fri Feb 13 18:09:53 PST 2015
Add -no-integrated-as. This is a known abuse of the compiler to output
something other than assembly:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-February/070522.html
On Fri, Feb 13, 2015 at 5:59 PM, Jovi Zhangwei <jovi.zhangwei at gmail.com>
wrote:
> Hi,
>
> I just tried clang 3.6 compile on one file in Linux kernel, it failed,
> but clang 3.4 can success.
> (I didn't apply any patch on clang source code, it's from clang repo
> 36 release tag)
>
> Anyone can help this would be much appreciated.
>
> In Linux kernel:
>
> jovi at ubuntu:~/linux$ make CC=clang kernel/sched/core.o
>
> CHK include/config/kernel.release
>
> CHK include/generated/uapi/linux/version.h
>
> CHK include/generated/utsrelease.h
>
> CC kernel/bounds.s
>
> clang: warning: optimization flag '-fno-delete-null-pointer-checks' is
> not supported
>
> kernel/bounds.c:18:2: error: unexpected token at start of statement
>
> DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);
>
> ^
>
> include/linux/kbuild.h:5:25: note: expanded from macro 'DEFINE'
>
> asm volatile("\n->" #sym " %0 " #val : : "i" (val))
>
> ^
>
> <inline asm>:2:1: note: instantiated into assembly here
>
> ->NR_PAGEFLAGS $25 __NR_PAGEFLAGS
>
> ^
>
> kernel/bounds.c:19:2: error: unexpected token at start of statement
>
> DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES);
>
> ^
>
> include/linux/kbuild.h:5:25: note: expanded from macro 'DEFINE'
>
> asm volatile("\n->" #sym " %0 " #val : : "i" (val))
>
> ^
>
> <inline asm>:2:1: note: instantiated into assembly here
>
> ->MAX_NR_ZONES $4 __MAX_NR_ZONES
>
> ^
>
> kernel/bounds.c:21:2: error: unexpected token at start of statement
>
> DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS));
>
> ^
>
> include/linux/kbuild.h:5:25: note: expanded from macro 'DEFINE'
>
> asm volatile("\n->" #sym " %0 " #val : : "i" (val))
>
> ^
>
> <inline asm>:2:1: note: instantiated into assembly here
>
> ->NR_CPUS_BITS $8 ilog2(CONFIG_NR_CPUS)
>
> ^
>
> kernel/bounds.c:23:2: error: unexpected token at start of statement
>
> DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t));
>
> ^
>
> include/linux/kbuild.h:5:25: note: expanded from macro 'DEFINE'
>
> asm volatile("\n->" #sym " %0 " #val : : "i" (val))
>
> ^
>
> <inline asm>:2:1: note: instantiated into assembly here
>
> ->SPINLOCK_SIZE $4 sizeof(spinlock_t)
>
> ^
>
> 4 errors generated.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150213/d09c1b59/attachment.html>
More information about the cfe-dev
mailing list