[cfe-dev] FreeBSD is now a libcompiler_rt customer

Ed Schouten ed at 80386.nl
Thu Nov 11 07:59:47 PST 2010


Hello all,

Below this email is a log message of a commit I just made to FreeBSD's
SVN repository. It looks like libcompiler_rt now has yet another
customer!

Unfortunately it doesn't build on all architectures supported by FreeBSD
by default, so I had to patch it as follows:

--- lib/clear_cache.c
+++ lib/clear_cache.c
@@ -8,6 +8,7 @@
  * ===----------------------------------------------------------------------===
  */
 
+#include "int_lib.h"
 #include <stdlib.h>
 
 #if __APPLE__
--- lib/trampoline_setup.c
+++ lib/trampoline_setup.c
@@ -23,7 +23,7 @@ extern void __clear_cache(void* start, v
  * 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)
 {

Greetings,
-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/

----- Forwarded message from Ed Schouten <ed at FreeBSD.org> -----
> Date: Thu, 11 Nov 2010 15:48:27 +0000 (UTC)
> From: Ed Schouten <ed at FreeBSD.org>
> To: src-committers at freebsd.org, svn-src-all at freebsd.org,
> 	svn-src-head at freebsd.org
> Subject: svn commit: r215127 - in head: . gnu/lib/libgcc lib sys/sys
> 
> Author: ed
> Date: Thu Nov 11 15:48:27 2010
> New Revision: 215127
> URL: http://svn.freebsd.org/changeset/base/215127
> 
> Log:
>   Replace libgcc.a by libcompiler_rt.a.
>   
>   libcompiler_rt.a is a BSD licensed C language runtime, which implements
>   many routines which are linked into binaries on architectures where
>   certain functionality is missing (e.g. 64 bits mul/div on i386).
>   
>   Unfortunately, libcompiler_rt cannot replace libgcc entirely. Certain
>   features, such as an unwinder for exception handling, are missing.
>   That's why only libgcc.a is replaced for now, because this one does seem
>   to be complete.
>   
>   Tested by:	rene (amd64), nwhitehorn (powerpc), droso (i386 exprun)
>   		and many others. Thanks!
>   Obtained from:	user/ed/compiler-rt
> 
> <snip>
----- End forwarded message -----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101111/f4d50d5d/attachment.sig>


More information about the cfe-dev mailing list