[llvmlinux] Linux Kernel LLVM IR

Marcelo Sousa marceloabsousa at gmail.com
Tue Mar 5 14:29:38 UTC 2013


Can I modify the current make-kernel.sh to call the wrapper? This
would allow me to generate the bytecode and the object file quite
easily. I modified the CC variable in make-kernel.sh to call the
clang-wrapper.sh but this doesn't work (not sure why though). Any
suggestions?

On Tue, Mar 5, 2013 at 2:21 PM, Mark Charlebois <charlebm at gmail.com> wrote:
> Its used to build individual files. Used for some unit tests. Used to be
> used to build initramfs.
>
> On Mar 5, 2013 6:04 AM, "Marcelo Sousa" <marceloabsousa at gmail.com> wrote:
>>
>> The clang-wrap.sh in the arm directory doesn't seem to be used in the
>> build process. I tried to point CC in make-kernel to the clang-wrap
>> but it doesn't work. Where are you using clang-wrap.sh?
>>
>> On Tue, Mar 5, 2013 at 1:35 PM, Marcelo Sousa <marceloabsousa at gmail.com>
>> wrote:
>> > Behan,
>> >
>> > That doesn't really work because the -emit-llvm is going to overwrite
>> > previous .o files generated. I think I really need to change the
>> > linux/Makefile somehow to generate a .bc and a .o from a .c file.
>> >
>> > Any insights on this would be very much appreciated,
>> > Marcelo
>> >
>> > On Tue, Mar 5, 2013 at 12:50 PM, Behan Webster
>> > <behanw at converseincode.com> wrote:
>> >> On 03/05/13 07:30, Marcelo Sousa wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> That doesn't seem right. My intuition is to change the actual Makefile
>> >>> in the linux directory. What do you think?
>> >>>
>> >> Indeed. You need to change arch/arm/bin/make-kernel.sh script and add a
>> >> second call to clang with the -emit-llvm
>> >>
>> >> To build the kernel you still need to generate the .o files so the link
>> >> stages work.
>> >>
>> >>
>> >> Behan
>> >>
>> >> --
>> >> Behan Webster
>> >> behanw at converseincode.com
>> >>
>> _______________________________________________
>> 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


More information about the LLVMLinux mailing list