<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">It doesn't compile:<br><div style="margin-left:40px">/home/simon/fuentes/kernel/linux-3.17.4/security/apparmor/crypto.c:35:2: error: implicit declaration of function ‘SHASH_DESC_ON_STACK’ [-Werror=implicit-function-declaration]<br> SHASH_DESC_ON_STACK(shash, apparmor_tfm);<br> ^<br>/home/simon/fuentes/kernel/linux-3.17.4/security/apparmor/crypto.c:35:22: error: ‘shash’ undeclared (first use in this function)<br> SHASH_DESC_ON_STACK(shash, apparmor_tfm);<br> ^<br></div>Is this a known bug? I haven't found it in bug tracker.<br></div><div class="gmail_default" style="font-family:verdana,sans-serif">I've tested it with clang-3.5 and clang-3.6. Same error.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-26 13:12 GMT+01:00 Jan-Simon Moeller <span dir="ltr"><<a href="mailto:dl9pf@gmx.de" target="_blank">dl9pf@gmx.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am Mittwoch, 26. November 2014, 12:53:17 schrieb Juan Simón:<br>
<span class="">> Hi,<br>
> I've followed the instructions on main page to compile the kernel with<br>
> clang on Ubuntu 14.04 64 bits:<br>
><br>
</span>> 1. Get the latest SVN version of clang (version 3.5 from PPA)<br>
> 2. Get the kernel pacthed from "git clone<br>
> git://<a href="http://git.linuxfoundation.org/llvmlinux/kernel.git" target="_blank">git.linuxfoundation.org/llvmlinux/kernel.git</a>"<br>
> 3. Execute: "export HOSTCC=clang CC=clang"<br>
<br>
Exporting it in your shell environment might not end up in the build process<br>
with dpkg rules. Export it in the rules file maybe ?<br>
<br>
<br>
or create a "makefile" (little m !!!) in the toplevel kernel-dir with this<br>
content:<br>
<br>
#<br>
<br>
CC := clang<br>
CPP := $(CC) -E<br>
HOSTCC := clang<br>
lm = $(MAKE) -f Makefile O="$(1)" CPP="$(CPP)" CC="$(CC)" HOSTCC="$(HOSTCC)"<br>
<br>
%:<br>
@$(call lm,$(O),$@)<br>
all:<br>
@$(call lm,$(O),$@)<br>
<br>
#<br>
<br>
<br>
> 4. From here I compile the kernel at Ubuntu way to obtain DEB packages:<br>
> 1. I patched the kernel with the patches in<br>
> <a href="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18-rc6-vivid/" target="_blank">http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18-rc6-vivid/</a><br>
> 2. cp /boot/config-`uname -r`<br>
> debian.master/config/amd64/config.flavour.i7<br>
> 3. fakeroot debian/rules clean<br>
> 4. debian/rules editconfigs<br>
> 5. fakeroot debian/rules clean<br>
> 6. fakeroot debian/rules binary-headers binary-i7 binary-arch-headers<br>
<span class="">><br>
> I install the generated deb packages without problems.<br>
><br>
> This i7 flavour it has:<br>
><br>
> CONFIG_MCORE2=y<br>
><br>
> and it's patched with:<br>
><br>
> -cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)<br>
> +cflags-$(CONFIG_MCORE2) += -march=native $(call tune,native)<br>
><br>
> My doubts are:<br>
><br>
</span>> 1. Is this kernel really compiled with clang? The compilation process<br>
<span class="">> shows in console a lot of warnings typical of clang but when I execute<br>
> "cat /proc/version", after reboot with the new kernel version, it shows:<br>
> "Linux version 3.18.0-031800rc6-i7 (root@X58A-UD5) (gcc version 4.8.2<br>
> (Ubuntu 4.8.2-19ubuntu1) )"<br>
</span>> 2. What's the kernel version in<br>
<span class="">> git://<a href="http://git.linuxfoundation.org/llvmlinux/kernel.git" target="_blank">git.linuxfoundation.org/llvmlinux/kernel.git</a>? In LLVMLinux main<br>
</span><span class="">> page <<a href="http://llvm.linuxfoundation.org/index.php/Main_Page" target="_blank">http://llvm.linuxfoundation.org/index.php/Main_Page</a>> it says:<br>
> "Alternatively you can use the LLVMLinux kernel tree (recent mainline<br>
> with latest LLVMLinux patches applied)" but when I execute "debian/rules<br>
> editconfigs" it shows 3.17.0 in top of console and the git page shows<br>
</span>> <<a href="http://git.linuxfoundation.org/llvmlinux/kernel.git/" target="_blank">http://git.linuxfoundation.org/llvmlinux/kernel.git/</a>> that the last change<br>
<div class="HOEnZb"><div class="h5">> was at 15 Oct 2014.<br>
</div></div></blockquote></div><br></div>