From 39107d9a918e46aeb3b9b577e512214559eaa8f2 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 12 Jan 2015 21:28:10 +0000 Subject: [PATCH] Pull in r225610 from upstream compiler-rt trunk (by Roman Divacky): Add FreeBSD support for __clear_cache. --- contrib/compiler-rt/lib/builtins/clear_cache.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/compiler-rt/lib/builtins/clear_cache.c b/contrib/compiler-rt/lib/builtins/clear_cache.c index 86e68afad3b7..4b46e8b3e9be 100644 --- a/contrib/compiler-rt/lib/builtins/clear_cache.c +++ b/contrib/compiler-rt/lib/builtins/clear_cache.c @@ -13,6 +13,11 @@ #if __APPLE__ #include #endif +#if defined(__FreeBSD__) && defined(__arm__) + #include + #include +#endif + #if defined(__NetBSD__) && defined(__arm__) #include #endif @@ -39,7 +44,7 @@ void __clear_cache(void *start, void *end) { * so there is nothing to do */ #elif defined(__arm__) && !defined(__APPLE__) - #if defined(__NetBSD__) + #if defined(__FreeBSD__) || defined(__NetBSD__) struct arm_sync_icache_args arg; arg.addr = (uintptr_t)start;