[llvmlinux] Compiling sources from llvmlinux/kernel.git

Juan Simón decedion at gmail.com
Wed Nov 26 14:57:54 UTC 2014


It doesn't compile:
/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]
  SHASH_DESC_ON_STACK(shash, apparmor_tfm);
  ^
/home/simon/fuentes/kernel/linux-3.17.4/security/apparmor/crypto.c:35:22:
error: 'shash' undeclared (first use in this function)
  SHASH_DESC_ON_STACK(shash, apparmor_tfm);
                      ^
Is this a known bug? I haven't found it in bug tracker.
I've tested it with clang-3.5 and clang-3.6. Same error.

2014-11-26 13:12 GMT+01:00 Jan-Simon Moeller <dl9pf at gmx.de>:

> Am Mittwoch, 26. November 2014, 12:53:17 schrieb Juan Simón:
> > Hi,
> > I've followed the instructions on main page to compile the kernel with
> > clang on Ubuntu 14.04 64 bits:
> >
> >    1. Get the latest SVN version of clang (version 3.5 from PPA)
> >    2. Get the kernel pacthed from "git clone
> >    git://git.linuxfoundation.org/llvmlinux/kernel.git"
> >    3. Execute: "export HOSTCC=clang CC=clang"
>
> Exporting it in your shell environment might not end up in the build
> process
> with dpkg rules. Export it in the rules file maybe ?
>
>
> or create a "makefile" (little m !!!) in the toplevel kernel-dir with this
> content:
>
> #
>
> CC              := clang
> CPP             := $(CC) -E
> HOSTCC          := clang
> lm = $(MAKE) -f Makefile O="$(1)" CPP="$(CPP)" CC="$(CC)"
> HOSTCC="$(HOSTCC)"
>
> %:
>         @$(call lm,$(O),$@)
> all:
>         @$(call lm,$(O),$@)
>
> #
>
>
> >    4. From here I compile the kernel at Ubuntu way to obtain DEB
> packages:
> >       1. I patched the kernel with the patches in
> >       http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18-rc6-vivid/
> >       2. cp /boot/config-`uname -r`
> >       debian.master/config/amd64/config.flavour.i7
> >       3. fakeroot debian/rules clean
> >       4. debian/rules editconfigs
> >       5. fakeroot debian/rules clean
> >       6. fakeroot debian/rules binary-headers binary-i7
> binary-arch-headers
> >
> > I install the generated deb packages without problems.
> >
> > This i7 flavour it has:
> >
> > CONFIG_MCORE2=y
> >
> > and it's patched with:
> >
> > -cflags-$(CONFIG_MCORE2)        += -march=i686 $(call tune,core2)
> > +cflags-$(CONFIG_MCORE2)        += -march=native $(call tune,native)
> >
> > My doubts are:
> >
> >    1. Is this kernel really compiled with clang? The compilation process
> >    shows in console a lot of warnings typical of clang but when I execute
> > "cat /proc/version", after reboot with the new kernel version, it shows:
> > "Linux version 3.18.0-031800rc6-i7 (root at X58A-UD5) (gcc version 4.8.2
> > (Ubuntu 4.8.2-19ubuntu1) )"
> >    2. What's the kernel version in
> >    git://git.linuxfoundation.org/llvmlinux/kernel.git? In LLVMLinux main
> >    page <http://llvm.linuxfoundation.org/index.php/Main_Page> it says:
> >    "Alternatively you can use the LLVMLinux kernel tree (recent mainline
> > with latest LLVMLinux patches applied)" but when I execute "debian/rules
> > editconfigs" it shows 3.17.0 in top of console and the git page shows
> > <http://git.linuxfoundation.org/llvmlinux/kernel.git/> that the last
> change
> > was at 15 Oct 2014.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20141126/09b2ef3c/attachment.html>


More information about the LLVMLinux mailing list