[llvm-commits] [Patch] FreeBSD-specific modifications to compiler-rt

Ed Schouten ed at 80386.nl
Sat Dec 31 11:07:56 PST 2011


Hi,

The C runtime library that is shipped with FreeBSD is an almost
unmodified copy of compiler-rt. It would be nice if we could get the two
small local changes upstreamed as well.

Change #1:

clear_cache.c can call compilerrt_abort() on non-x86 non-Apple
architectures. Prevent a build failure on those architectures by
properly including "int_lib.h".

--- lib/clear_cache.c
+++ lib/clear_cache.c
@@ -8,6 +8,8 @@
  * ===----------------------------------------------------------------------===
  */
 
+#include "int_lib.h"
+
 #if __APPLE__
   #include <libkern/OSCacheControl.h>
 #endif

Change #2:

The code provided in trampoline_setup.c only seems to apply to 32-bit
PowerPC systems -- not 64-bit systems. Don't cause a build failure on
those systems.

--- lib/trampoline_setup.c
+++ lib/trampoline_setup.c
@@ -20,7 +20,7 @@
  * and then jumps to the target nested function.
  */
 
-#if __ppc__
+#if __ppc__ && !defined(__powerpc64__)
 void __trampoline_setup(uint32_t* trampOnStack, int trampSizeAllocated, 
                                 const void* realFunc, void* localsPtr)
 {

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111231/146d8f9d/attachment.sig>


More information about the llvm-commits mailing list