From 8d395c36703ce6100814bf1d5df11bea3dc4a6fa Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Thu, 21 Nov 2013 14:29:47 +0100 Subject: [PATCH] fix build, missing __clear_cache() declaration --- 0003-fix-clear-cache-declaration.patch | 23 +++++++++++++++++++++++ llvm.spec | 7 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 0003-fix-clear-cache-declaration.patch diff --git a/0003-fix-clear-cache-declaration.patch b/0003-fix-clear-cache-declaration.patch new file mode 100644 index 0000000..c68cba3 --- /dev/null +++ b/0003-fix-clear-cache-declaration.patch @@ -0,0 +1,23 @@ +Fixes the build with gcc in gnu++98 and gnu++11 mode. + +https://github.com/llvm-mirror/llvm/commit/d1bf52275daa86e838ebbffc71efd43fc8c416f4 + +--- + lib/Support/Unix/Memory.inc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/Support/Unix/Memory.inc b/lib/Support/Unix/Memory.inc +index 72a8af6..91dc7da 100644 +--- a/lib/Support/Unix/Memory.inc ++++ b/lib/Support/Unix/Memory.inc +@@ -33,6 +33,7 @@ + #endif + + extern "C" void sys_icache_invalidate(const void *Addr, size_t len); ++extern "C" void __clear_cache(void *, void *); + + namespace { + +-- +1.8.3.1 + diff --git a/llvm.spec b/llvm.spec index a8a3a5b..f65545f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -29,7 +29,7 @@ Name: llvm Version: 3.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -49,6 +49,7 @@ Source11: llvm-Config-llvm-config.h # patches Patch1: 0001-data-install-preserve-timestamps.patch Patch2: 0002-linker-flags-speedup-memory.patch +Patch3: 0003-fix-clear-cache-declaration.patch BuildRequires: bison BuildRequires: flex @@ -263,6 +264,7 @@ mv lldb-%{version}.src tools/lldb %patch1 -p1 %patch2 -p1 +%patch3 -p1 # fix ld search path sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' ./configure @@ -597,6 +599,9 @@ exit 0 %endif %changelog +* Thu Nov 21 2013 Jan Vcelak 3.3-2 +- fix build failure, missing __clear_cache() declaration + * Tue Nov 12 2013 Jan Vcelak 3.3-1 - upgrade to 3.3 release - add compiler-rt, enables address sanitizer (#949489)