latest linux/clang patches

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

latest linux/clang patches

pageexec
hello everyone,

attached are the updated patches for llvm/clang trunk and linux 2.6.38.2(-pax) to build both
an i386 and amd64 kernel as well. since my last post several issues were reported in bugzilla,
some of them even got fixed while others have patches and some are lingering, so if anyone
feels like helping out, check out PR4068 that links to them.

the changes since last time:

1. amd64/vdso builds without patching the linux side now (must have been fixed in llvm/clang
   while i wasn't looking ;)

2. clang needs a patch to fix mcount instrumentation, right now it looks like that inlined
   functions get instrumented first and then inlined, resulting in several calls to mcount
   in the outer function. furthermore the no_instrument_function attribute doesn't affect
   mcount whereas it does in gcc. the attached clang patch tries to fix these but i'm pretty
   sure the inline handling is a bad hack only, so feel free to help :).

   note that -finstrument-functions is meant to apply to inlined functions, it's only mcount
   that needs special handling.

3. i also fixed a small typo in how -fno-merge-all-constants was passed down from the driver
   (used to be needed for building the vdso, that's why i even noticed).

4. i changed the __builtin_object_size prototype to take a const pointer, otherwise there's
   lots of noise when const pointers are passed to it (not sure why gcc ever defined it as
   non-const since this builtin isn't meant to modify the target object).

so that's all for now, the work continues.

cheers,

 PaX Team


The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  llvm-amd64-kernel-pic.patch
     Date:  5 Apr 2011, 1:29
     Size:  6973 bytes.
     Type:  Unknown

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  clang-mregparm-fix.patch
     Date:  5 Apr 2011, 1:08
     Size:  15304 bytes.
     Type:  Unknown

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  pax-linux-2.6.38.2-test6-clang-only.patch
     Date:  5 Apr 2011, 0:39
     Size:  46196 bytes.
     Type:  Unknown

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

llvm-amd64-kernel-pic.patch (9K) Download Attachment
clang-mregparm-fix.patch (20K) Download Attachment
pax-linux-2.6.38.2-test6-clang-only.patch (61K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: latest linux/clang patches

Chris Lattner

On Apr 4, 2011, at 4:37 PM, [hidden email] wrote:

> hello everyone,
>
> attached are the updated patches for llvm/clang trunk and linux 2.6.38.2(-pax) to build both
> an i386 and amd64 kernel as well. since my last post several issues were reported in bugzilla,
> some of them even got fixed while others have patches and some are lingering, so if anyone
> feels like helping out, check out PR4068 that links to them.
>
> the changes since last time:
>
> 1. amd64/vdso builds without patching the linux side now (must have been fixed in llvm/clang
>   while i wasn't looking ;)
>
> 2. clang needs a patch to fix mcount instrumentation, right now it looks like that inlined
>   functions get instrumented first and then inlined, resulting in several calls to mcount
>   in the outer function. furthermore the no_instrument_function attribute doesn't affect
>   mcount whereas it does in gcc. the attached clang patch tries to fix these but i'm pretty
>   sure the inline handling is a bad hack only, so feel free to help :).
>
>   note that -finstrument-functions is meant to apply to inlined functions, it's only mcount
>   that needs special handling.
>
> 3. i also fixed a small typo in how -fno-merge-all-constants was passed down from the driver
>   (used to be needed for building the vdso, that's why i even noticed).
>
> 4. i changed the __builtin_object_size prototype to take a const pointer, otherwise there's
>   lots of noise when const pointers are passed to it (not sure why gcc ever defined it as
>   non-const since this builtin isn't meant to modify the target object).
>
> so that's all for now, the work continues.

Wow, it looks like you have a lot of great patches here. Can you split these up into individual patches?  I see that #4 went in, and the fast isel changes look fine.  I applied #3, and the other patches look fine too  but should be reviewed individually.  Thanks for all the great work!

-Chris
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev