[llvmlinux] Linux Kernel LLVM IR

Marcelo Sousa marceloabsousa at gmail.com
Mon Mar 4 15:57:00 UTC 2013


Hello,

I'm getting the following error when trying to build x86:

---------------------------------------------------------------------
Patching LLVM...
---------------------------------------------------------------------
(cd /home/scratch/llvm-setup/toolchain/clang/src/llvm && quilt push -a)
Applying patch patches/0002-pax-linux-llvm-x86_handle-empty-archive.patch
can't find file to patch at input line 15
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 7cb2d39b461c58df2583a6881f42b18c30f1eafb Mon Sep 17 00:00:00 2001
|From: =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= <dl9pf at gmx.de>
|Date: Tue, 10 Jul 2012 12:37:24 +0200
|Subject: [PATCH 2/6] pax-linux-llvm x86_handle-empty-archive.patch
|
|Patch from series at
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120507/142707.html
by PaX Team.
|---
| lib/Linker/LinkItems.cpp |    5 ++++-
| 1 files changed, 4 insertions(+), 1 deletions(-)
|
|diff --git a/lib/Linker/LinkItems.cpp b/lib/Linker/LinkItems.cpp
|index 52a0d17..2782196 100644
|--- a/lib/Linker/LinkItems.cpp
|+++ b/lib/Linker/LinkItems.cpp
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Patch patches/0002-pax-linux-llvm-x86_handle-empty-archive.patch does
not apply (enforce with -f)
make: *** [/home/scratch/llvm-setup/toolchain/clang/state/llvm-patch] Error 1


Any ideas of what's going wrong?

Regards,
Marcelo

On Mon, Mar 4, 2013 at 2:21 PM, Tinti <viniciustinti at gmail.com> wrote:
> Hi Marcelo,
>
> About specific directory I have no idea. I think you should take a look at
> arch/i586/bin/
>
> Regards,
> Tinti
>
>
> On Mon, Mar 4, 2013 at 10:57 AM, Marcelo Sousa <marceloabsousa at gmail.com>
> wrote:
>>
>> Hi Tinti,
>>
>> Yes that option. I'm not even interested in the actual build output
>> but only the byte code files.
>> Do you know which files should I modify and also how to target a
>> specific directory with the linux kernel?
>>
>> Regards,
>> Marcelo
>>
>> On Mon, Mar 4, 2013 at 1:55 PM, Tinti <viniciustinti at gmail.com> wrote:
>> > Hi Marcelo,
>> >
>> > You are not the first one who asked for it. What you are asking for is
>> > the
>> > '-emit-llvm' option? If you do, clang will stop building to generate it
>> > instead. Is there a way to request clang to generate it and not stopping
>> > the
>> > build process?
>> >
>> > Another solution could be use a wrapper to call two times clang.
>> >
>> > Regards.
>> > Tinti
>> >
>> >
>> > On Mon, Mar 4, 2013 at 10:45 AM, Marcelo Sousa
>> > <marceloabsousa at gmail.com>
>> > wrote:
>> >>
>> >> Hi Tinti,
>> >>
>> >> Isn't it possible to change the build environment to emit the llvm ir
>> >> while compiling?
>> >>
>> >> Regards,
>> >> Marcelo
>> >>
>> >> On Mon, Mar 4, 2013 at 1:40 PM, Tinti <viniciustinti at gmail.com> wrote:
>> >> > Hi Marcelo,
>> >> >
>> >> > For the first question I don't have an answer. But for the second
>> >> > one:
>> >> > we
>> >> > use the lasted Kernel version in git source tree. We do have support
>> >> > for
>> >> > x86
>> >> > too.
>> >> >
>> >> > Best regards,
>> >> > Tinti
>> >> >
>> >> >
>> >> > On Mon, Mar 4, 2013 at 8:46 AM, Marcelo Sousa
>> >> > <marceloabsousa at gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> Dear all,
>> >> >>
>> >> >> I'm interested in analysing the LLVM IR of latest versions of the
>> >> >> Linux
>> >> >> Kernel.
>> >> >> Can you provide some insight on if this is currently possible and
>> >> >> what's the process for it. I don't quite understand which version of
>> >> >> the linux kernel you currently support. I would be interested in
>> >> >> compiling drivers/, arch/x86 and kernel/.
>> >> >>
>> >> >> Kind regards,
>> >> >> Marcelo
>> >> >> _______________________________________________
>> >> >> LLVMLinux mailing list
>> >> >> LLVMLinux at lists.linuxfoundation.org
>> >> >> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Simplicity is the ultimate sophistication
>> >> >
>> >> > _______________________________________________
>> >> > LLVMLinux mailing list
>> >> > LLVMLinux at lists.linuxfoundation.org
>> >> > https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>> >> _______________________________________________
>> >> LLVMLinux mailing list
>> >> LLVMLinux at lists.linuxfoundation.org
>> >> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>> >
>> >
>> >
>> >
>> > --
>> > Simplicity is the ultimate sophistication
>> >
>> > _______________________________________________
>> > LLVMLinux mailing list
>> > LLVMLinux at lists.linuxfoundation.org
>> > https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>> _______________________________________________
>> LLVMLinux mailing list
>> LLVMLinux at lists.linuxfoundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>
>
>
>
> --
> Simplicity is the ultimate sophistication
>
> _______________________________________________
> LLVMLinux mailing list
> LLVMLinux at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux


More information about the LLVMLinux mailing list