]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/llvm/patches/patch-r243830-arm-disable-clear-cache.diff
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / llvm / patches / patch-r243830-arm-disable-clear-cache.diff
1 This patch ensures __clear_cache is not called on arm.  In earlier versions of
2 clang, this special builtin was emitted as a function call, leading to link
3 errors.
4
5 Introduced here: http://svnweb.freebsd.org/changeset/base/243830
6
7 Index: lib/Support/Unix/Memory.inc
8 ===================================================================
9 --- lib/Support/Unix/Memory.inc
10 +++ lib/Support/Unix/Memory.inc
11 @@ -332,7 +332,7 @@ void Memory::InvalidateInstructionCache(const void
12    for (intptr_t Line = StartLine; Line < EndLine; Line += LineSize)
13      asm volatile("icbi 0, %0" : : "r"(Line));
14    asm volatile("isync");
15 -#  elif (defined(__arm__) || defined(__aarch64__)) && defined(__GNUC__)
16 +#  elif (defined(__arm__) || defined(__aarch64__)) && defined(__GNUC__) && !defined(__FreeBSD__)
17    // FIXME: Can we safely always call this for __GNUC__ everywhere?
18    const char *Start = static_cast<const char *>(Addr);
19    const char *End = Start + Len;