[LLVMdev] libSystem, __clear_cache(), FreeBSD and ARM

Ed Schouten ed at 80386.nl
Thu May 13 10:07:28 PDT 2010


Hi folks,

I just tried to build LLVM on FreeBSD/arm. It looks like libSystem
doesn't build and requires the following hack:

--- lib/System/Memory.cpp
+++ lib/System/Memory.cpp
@@ -61,7 +61,7 @@
   for (intptr_t Line = StartLine; Line < EndLine; Line += LineSize)
     asm volatile("icbi 0, %0" : : "r"(Line));
   asm volatile("isync");
-#  elif defined(__arm__) && defined(__GNUC__)
+#  elif defined(__arm__) && defined(__GNUC__) && !defined(__FreeBSD__)
   // FIXME: Can we safely always call this for __GNUC__ everywhere?
   char *Start = (char*) Addr;
   char *End = Start + Len;

I don't know anything about ARM, but isn't there a way we can do this
using some inline asm instead of calling a glibc-function?

Greetings,
-- 
 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: 196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100513/03f19f3e/attachment.sig>


More information about the llvm-dev mailing list