<div dir="ltr"><div><div>When you enter "make help" you are told that "make dir/xxx.ll" will generate a LLVM IR assembly listing of the C file. But this is not the case, in fact, the xxx.ll that is generated is a assembly listing generated by objdump of the object file. So is this going to be fixed?<br><br></div>Furthermore, if you do "make V=1 dir/xxx.ll" you will see that the gcc is being used, which is shown below (removing lots of intermediate options), and there is a "-emit-llvm" at the end of it:<br><br> gcc -Wp,-MD,kernel/.workqueue.ll.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ {SNIP-SNIP-SNIP} -emit-llvm -S -o kernel/workqueue.ll kernel/workqueue.c<br><br></div>Of course if change gcc to "clang", the bitcode MAY SOMETIMES be generated, and sometimes NOT, depending on error. For kernel/workqueue.c itself these are the errors:<br><br>kernel/workqueue.c:285:1: error: expected ';' after top level declarator<br>include/linux/moduleparam.h:147:2: note: expanded from macro 'module_param_named'<br> module_param_cb(name, &param_ops_##type, &value, perm); \<br> ^<br>include/linux/moduleparam.h:167:22: note: expanded from macro 'module_param_cb'<br> __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0)<br> ^<br>include/linux/moduleparam.h:13:44: note: expanded from macro 'MODULE_PARAM_PREFIX'<br>#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."<br> ^<br>kernel/workqueue.c:289:1: error: use of undeclared identifier 'KBUILD_MODNAME'<br>module_param_named(power_efficient, wq_power_efficient, bool, 0444);<br>^<br>include/linux/moduleparam.h:147:2: note: expanded from macro 'module_param_named'<br> module_param_cb(name, &param_ops_##type, &value, perm); \<br> ^<br>include/linux/moduleparam.h:167:22: note: expanded from macro 'module_param_cb'<br> __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0)<br> ^<br>include/linux/moduleparam.h:13:29: note: expanded from macro 'MODULE_PARAM_PREFIX'<br>#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."<br> ^<br>kernel/workqueue.c:289:1: error: expected ';' after top level declarator<br>include/linux/moduleparam.h:147:2: note: expanded from macro 'module_param_named'<br> module_param_cb(name, &param_ops_##type, &value, perm); \<br><br clear="all"><div><div><div><div><div><br>-- <br><div>Regards,<br>Peter Teoh</div>
</div></div></div></div></div></div>