[cfe-dev] latest linux/clang patches

pageexec at freemail.hu pageexec at freemail.hu
Mon Apr 4 16:37:09 PDT 2011


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

-------------- next part --------------
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-amd64-kernel-pic.patch
Type: application/octet-stream
Size: 6973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110405/f4319247/attachment.obj>
-------------- next part --------------
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-mregparm-fix.patch
Type: application/octet-stream
Size: 15304 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110405/f4319247/attachment-0001.obj>
-------------- next part --------------
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pax-linux-2.6.38.2-test6-clang-only.patch
Type: application/octet-stream
Size: 46196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110405/f4319247/attachment-0002.obj>


More information about the cfe-dev mailing list