From e4bb76880e0fa745f1a2be77c03c540131585d5d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 31 Jan 2013 16:35:41 +0000 Subject: [PATCH] Use __builtin___clear_cache on ARM to fix a clang bug. Thanks to Matthias Klose. --- debian/changelog | 2 ++ debian/patches/declare_clear_cache.diff | 13 +++++++++++++ debian/patches/series | 1 + 3 files changed, 16 insertions(+) create mode 100644 debian/patches/declare_clear_cache.diff diff --git a/debian/changelog b/debian/changelog index e3c44dcb..c24f960c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ llvm-toolchain-3.2 (3.2-1~exp1) experimental; urgency=low * Enable RTTI (Closes: #697754) * Introduce lldb as a new package (Closes: #698601) * Add a script pollycc which will call clang with the right arguments. + * Use __builtin___clear_cache on ARM to fix a clang bug. + Thanks to Matthias Klose. -- Sylvestre Ledru Mon, 07 Jan 2013 15:45:54 +0100 diff --git a/debian/patches/declare_clear_cache.diff b/debian/patches/declare_clear_cache.diff new file mode 100644 index 00000000..fa65db30 --- /dev/null +++ b/debian/patches/declare_clear_cache.diff @@ -0,0 +1,13 @@ +Index: b/lib/Support/Unix/Memory.inc +=================================================================== +--- a/lib/Support/Unix/Memory.inc ++++ b/lib/Support/Unix/Memory.inc +@@ -318,7 +318,7 @@ + // FIXME: Can we safely always call this for __GNUC__ everywhere? + const char *Start = static_cast(Addr); + const char *End = Start + Len; +- __clear_cache(const_cast(Start), const_cast(End)); ++ __builtin___clear_cache(const_cast(Start), const_cast(End)); + # elif defined(__mips__) + const char *Start = static_cast(Addr); + cacheflush(const_cast(Start), Len, BCACHE); diff --git a/debian/patches/series b/debian/patches/series index 34de0b0e..25a34ebd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -27,3 +27,4 @@ scan-build-clang-path.diff 57-lldb-soname.diff 0050-powerpcspe-fp.diff polly-c++0x.diff +declare_clear_cache.diff