From owner-svn-src-projects@FreeBSD.ORG Thu May 13 17:32:31 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05E21106566C; Thu, 13 May 2010 17:32:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9BBA8FC0C; Thu, 13 May 2010 17:32:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4DHWU1O001141; Thu, 13 May 2010 17:32:30 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4DHWU91001139; Thu, 13 May 2010 17:32:30 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201005131732.o4DHWU91001139@svn.freebsd.org> From: Ed Schouten Date: Thu, 13 May 2010 17:32:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208038 - projects/clangbsd-import/contrib/llvm/lib/System X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2010 17:32:31 -0000 Author: ed Date: Thu May 13 17:32:30 2010 New Revision: 208038 URL: http://svn.freebsd.org/changeset/base/208038 Log: Crude hack to make LLVM build on FreeBSD/arm. LLVM needs a function to flush the icache of certain memory regions. glibc has a function for it called __clear_cache(), but FreeBSD's libc doesn't have it. I don't care about flushing the icache at all, because it's only used when JITting, which we are not going to do with Clang. Modified: projects/clangbsd-import/contrib/llvm/lib/System/Memory.cpp Modified: projects/clangbsd-import/contrib/llvm/lib/System/Memory.cpp ============================================================================== --- projects/clangbsd-import/contrib/llvm/lib/System/Memory.cpp Thu May 13 17:22:00 2010 (r208037) +++ projects/clangbsd-import/contrib/llvm/lib/System/Memory.cpp Thu May 13 17:32:30 2010 (r208038) @@ -61,7 +61,7 @@ void llvm::sys::Memory::InvalidateInstru 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;