From 22d6607fca4dcd653aedd428f1a4dd90d950178b5f1fd0be74b67bb9e2b87424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 4 Sep 2014 16:28:42 +0000 Subject: [PATCH] - Update to llvm 3.5.0 * Major update, see http://llvm.org/releases/3.5.0/docs/ReleaseNotes.html - Use upstream pristine tarballs - Add libc++/libc++abi support clang - Add libcxxabi-exceptions.patch to fix libcxxabi exception handling - Remove asan-disable-hugemalloctest.patch and cmake-patchversion.patch, fixed upstream. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=364 --- aarch64-suse-support.patch | 25 +++++---- arm_suse_support.diff | 16 +++--- asan-disable-hugemalloctest.patch | 17 ------ assume-opensuse.patch | 83 +++++----------------------- cfe-3.5.0.src.tar.xz | 3 ++ cfe-docs-3.5.0.tar.xz | 3 ++ clang-disable-ada-extension.patch | 6 +-- clang-resourcedirs.patch | 6 +-- cmake-patchversion.patch | 14 ----- compiler-rt-3.5.0.src.tar.xz | 3 ++ default-to-i586.patch | 15 ++---- libcxx-3.5.0.src.tar.xz | 3 ++ libcxxabi-3.5.0.src.tar.xz | 3 ++ libcxxabi-exceptions.patch | 13 +++++ lldb-3.4.tar.bz2 | 3 -- lldb-3.5.0.src.tar.xz | 3 ++ lldb-cmake.patch | 90 +++++++++++++++++-------------- lldb.spec | 4 +- llvm-3.4.2.tar.bz2 | 3 -- llvm-3.5.0.src.tar.xz | 3 ++ llvm-config-lib64.patch | 28 +++++----- llvm-docs-3.5.0.tar.xz | 3 ++ llvm.changes | 11 ++++ llvm.spec | 59 +++++++++++++------- set-revision.patch | 6 +-- 25 files changed, 200 insertions(+), 223 deletions(-) delete mode 100644 asan-disable-hugemalloctest.patch create mode 100644 cfe-3.5.0.src.tar.xz create mode 100644 cfe-docs-3.5.0.tar.xz delete mode 100644 cmake-patchversion.patch create mode 100644 compiler-rt-3.5.0.src.tar.xz create mode 100644 libcxx-3.5.0.src.tar.xz create mode 100644 libcxxabi-3.5.0.src.tar.xz create mode 100644 libcxxabi-exceptions.patch delete mode 100644 lldb-3.4.tar.bz2 create mode 100644 lldb-3.5.0.src.tar.xz delete mode 100644 llvm-3.4.2.tar.bz2 create mode 100644 llvm-3.5.0.src.tar.xz create mode 100644 llvm-docs-3.5.0.tar.xz diff --git a/aarch64-suse-support.patch b/aarch64-suse-support.patch index 7591a51..2dd7caf 100644 --- a/aarch64-suse-support.patch +++ b/aarch64-suse-support.patch @@ -1,15 +1,14 @@ -Index: llvm/tools/clang/lib/Driver/ToolChains.cpp +Index: cfe-3.5.0.src/lib/Driver/ToolChains.cpp =================================================================== ---- llvm.orig/tools/clang/lib/Driver/ToolChains.cpp -+++ llvm/tools/clang/lib/Driver/ToolChains.cpp -@@ -1110,8 +1110,9 @@ void Generic_GCC::GCCInstallationDetecto - // Declare a bunch of static data sets that we'll select between below. These - // are specifically designed to always refer to string literals to avoid any - // lifetime or initialization issues. -- static const char *const AArch64LibDirs[] = { "/lib" }; -+ static const char *const AArch64LibDirs[] = { "/lib64", "/lib" }; +--- cfe-3.5.0.src.orig/lib/Driver/ToolChains.cpp ++++ cfe-3.5.0.src/lib/Driver/ToolChains.cpp +@@ -1315,7 +1315,8 @@ bool Generic_GCC::GCCInstallationDetecto static const char *const AArch64Triples[] = { "aarch64-none-linux-gnu", -+ "aarch64-suse-linux", - "aarch64-linux-gnu" }; - - static const char *const ARMLibDirs[] = { "/lib" }; + "aarch64-linux-gnu", + "aarch64-linux-android", +- "aarch64-redhat-linux" }; ++ "aarch64-redhat-linux", ++ "aarch64-suse-linux"}; + static const char *const AArch64beLibDirs[] = { "/lib" }; + static const char *const AArch64beTriples[] = { "aarch64_be-none-linux-gnu", + "aarch64_be-linux-gnu" }; diff --git a/arm_suse_support.diff b/arm_suse_support.diff index cb50d4c..839662a 100644 --- a/arm_suse_support.diff +++ b/arm_suse_support.diff @@ -1,8 +1,8 @@ -Index: llvm/tools/clang/lib/Driver/ToolChains.cpp +Index: cfe-3.5.0.src/lib/Driver/ToolChains.cpp =================================================================== ---- llvm.orig/tools/clang/lib/Driver/ToolChains.cpp -+++ llvm/tools/clang/lib/Driver/ToolChains.cpp -@@ -1071,9 +1071,11 @@ Generic_GCC::GCCInstallationDetector::GC +--- cfe-3.5.0.src.orig/lib/Driver/ToolChains.cpp ++++ cfe-3.5.0.src/lib/Driver/ToolChains.cpp +@@ -1322,9 +1322,11 @@ bool Generic_GCC::GCCInstallationDetecto static const char *const ARMLibDirs[] = { "/lib" }; static const char *const ARMTriples[] = { "arm-linux-gnueabi", @@ -12,7 +12,7 @@ Index: llvm/tools/clang/lib/Driver/ToolChains.cpp static const char *const ARMHFTriples[] = { "arm-linux-gnueabihf", - "armv7hl-redhat-linux-gnueabi" }; + "armv7hl-redhat-linux-gnueabi", -+ "armv7hl-suse-linux-gnueabi" }; - - static const char *const X86_64LibDirs[] = { "/lib64", "/lib" }; - static const char *const X86_64Triples[] = { ++ "armv7hl-suse-linux-gnueabi"}; + static const char *const ARMebLibDirs[] = { "/lib" }; + static const char *const ARMebTriples[] = { "armeb-linux-gnueabi", + "armeb-linux-androideabi" }; diff --git a/asan-disable-hugemalloctest.patch b/asan-disable-hugemalloctest.patch deleted file mode 100644 index 5d1968d..0000000 --- a/asan-disable-hugemalloctest.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: llvm/projects/compiler-rt/lib/asan/tests/asan_test.cc -=================================================================== ---- llvm.orig/projects/compiler-rt/lib/asan/tests/asan_test.cc -+++ llvm/projects/compiler-rt/lib/asan/tests/asan_test.cc -@@ -298,12 +298,6 @@ TEST(AddressSanitizer, LargeMallocTest) - } - } - --TEST(AddressSanitizer, HugeMallocTest) { -- if (SANITIZER_WORDSIZE != 64) return; -- size_t n_megs = 4100; -- TestLargeMalloc(n_megs << 20); --} -- - #ifndef __APPLE__ - void MemalignRun(size_t align, size_t size, int idx) { - char *p = (char *)memalign(align, size); diff --git a/assume-opensuse.patch b/assume-opensuse.patch index 3a1b91e..f47a8a7 100644 --- a/assume-opensuse.patch +++ b/assume-opensuse.patch @@ -1,78 +1,21 @@ -Index: llvm/tools/clang/lib/Driver/ToolChains.cpp +Index: cfe-3.5.0.src/lib/Driver/ToolChains.cpp =================================================================== ---- llvm.orig/tools/clang/lib/Driver/ToolChains.cpp -+++ llvm/tools/clang/lib/Driver/ToolChains.cpp -@@ -2185,73 +2185,7 @@ static bool IsUbuntu(enum Distro Distro) +--- cfe-3.5.0.src/lib/Driver/ToolChains.cpp ++++ cfe-3.5.0.src/lib/Driver/ToolChains.cpp +@@ -2794,6 +2794,7 @@ static bool IsUbuntu(enum Distro Distro) } static Distro DetectDistro(llvm::Triple::ArchType Arch) { -- OwningPtr File; -- if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) { -- StringRef Data = File.get()->getBuffer(); -- SmallVector Lines; -- Data.split(Lines, "\n"); -- Distro Version = UnknownDistro; -- for (unsigned i = 0, s = Lines.size(); i != s; ++i) -- if (Version == UnknownDistro && Lines[i].startswith("DISTRIB_CODENAME=")) -- Version = llvm::StringSwitch(Lines[i].substr(17)) -- .Case("hardy", UbuntuHardy) -- .Case("intrepid", UbuntuIntrepid) -- .Case("jaunty", UbuntuJaunty) -- .Case("karmic", UbuntuKarmic) -- .Case("lucid", UbuntuLucid) -- .Case("maverick", UbuntuMaverick) -- .Case("natty", UbuntuNatty) -- .Case("oneiric", UbuntuOneiric) -- .Case("precise", UbuntuPrecise) -- .Case("quantal", UbuntuQuantal) -- .Case("raring", UbuntuRaring) -- .Case("saucy", UbuntuSaucy) -- .Case("trusty", UbuntuTrusty) -- .Default(UnknownDistro); -- return Version; -- } -- -- if (!llvm::MemoryBuffer::getFile("/etc/redhat-release", File)) { -- StringRef Data = File.get()->getBuffer(); -- if (Data.startswith("Fedora release")) -- return Fedora; -- else if (Data.startswith("Red Hat Enterprise Linux") && -- Data.find("release 6") != StringRef::npos) -- return RHEL6; -- else if ((Data.startswith("Red Hat Enterprise Linux") || -- Data.startswith("CentOS")) && -- Data.find("release 5") != StringRef::npos) -- return RHEL5; -- else if ((Data.startswith("Red Hat Enterprise Linux") || -- Data.startswith("CentOS")) && -- Data.find("release 4") != StringRef::npos) -- return RHEL4; -- return UnknownDistro; -- } -- -- if (!llvm::MemoryBuffer::getFile("/etc/debian_version", File)) { -- StringRef Data = File.get()->getBuffer(); -- if (Data[0] == '5') -- return DebianLenny; -- else if (Data.startswith("squeeze/sid") || Data[0] == '6') -- return DebianSqueeze; -- else if (Data.startswith("wheezy/sid") || Data[0] == '7') -- return DebianWheezy; -- else if (Data.startswith("jessie/sid") || Data[0] == '8') -- return DebianJessie; -- return UnknownDistro; -- } -- -- if (llvm::sys::fs::exists("/etc/SuSE-release")) - return OpenSUSE; -- -- if (llvm::sys::fs::exists("/etc/exherbo-release")) -- return Exherbo; -- -- if (llvm::sys::fs::exists("/etc/arch-release")) -- return ArchLinux; -- ++ return OpenSUSE; /* + llvm::ErrorOr> File = + llvm::MemoryBuffer::getFile("/etc/lsb-release"); + if (File) { +@@ -2861,7 +2862,7 @@ static Distro DetectDistro(llvm::Triple: + if (llvm::sys::fs::exists("/etc/arch-release")) + return ArchLinux; + - return UnknownDistro; ++ return UnknownDistro;*/ } /// \brief Get our best guess at the multiarch triple for a target. diff --git a/cfe-3.5.0.src.tar.xz b/cfe-3.5.0.src.tar.xz new file mode 100644 index 0000000..d36a20d --- /dev/null +++ b/cfe-3.5.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc80992e004b06f6c7afb612de1cdaa9ac9d25811c55f94fcf7331d9b81cdb8b +size 8233432 diff --git a/cfe-docs-3.5.0.tar.xz b/cfe-docs-3.5.0.tar.xz new file mode 100644 index 0000000..33d6216 --- /dev/null +++ b/cfe-docs-3.5.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c9d5a14484424eb9126cae185e5905fa659497123805020ee854c6dd53c3602 +size 574084 diff --git a/clang-disable-ada-extension.patch b/clang-disable-ada-extension.patch index a7a8d69..c11fcbb 100644 --- a/clang-disable-ada-extension.patch +++ b/clang-disable-ada-extension.patch @@ -1,7 +1,7 @@ -Index: llvm/tools/clang/lib/Driver/Types.cpp +Index: cfe-3.5.0.src/lib/Driver/Types.cpp =================================================================== ---- llvm.orig/tools/clang/lib/Driver/Types.cpp -+++ llvm/tools/clang/lib/Driver/Types.cpp +--- cfe-3.5.0.src/lib/Driver/Types.cpp ++++ cfe-3.5.0.src/lib/Driver/Types.cpp @@ -158,8 +158,6 @@ types::ID types::lookupTypeForExtension( .Case("hh", TY_CXXHeader) .Case("ll", TY_LLVM_IR) diff --git a/clang-resourcedirs.patch b/clang-resourcedirs.patch index 1410280..8e9f274 100644 --- a/clang-resourcedirs.patch +++ b/clang-resourcedirs.patch @@ -1,7 +1,7 @@ -Index: llvm/tools/clang/lib/Driver/Driver.cpp +Index: cfe-3.5.0.src/lib/Driver/Driver.cpp =================================================================== ---- llvm.orig/tools/clang/lib/Driver/Driver.cpp -+++ llvm/tools/clang/lib/Driver/Driver.cpp +--- cfe-3.5.0.src/lib/Driver/Driver.cpp ++++ cfe-3.5.0.src/lib/Driver/Driver.cpp @@ -66,11 +66,11 @@ Driver::Driver(StringRef ClangExecutable // Compute the path to the resource directory. diff --git a/cmake-patchversion.patch b/cmake-patchversion.patch deleted file mode 100644 index dba8e06..0000000 --- a/cmake-patchversion.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: llvm-3.4.2/include/llvm/Config/config.h.cmake -=================================================================== ---- llvm-3.4.2.orig/include/llvm/Config/config.h.cmake -+++ llvm-3.4.2/include/llvm/Config/config.h.cmake -@@ -603,6 +603,9 @@ - /* Minor version of the LLVM API */ - #cmakedefine LLVM_VERSION_MINOR ${LLVM_VERSION_MINOR} - -+/* Patch version of the LLVM API */ -+#cmakedefine LLVM_VERSION_PATCH ${LLVM_VERSION_PATCH} -+ - /* Define if the OS needs help to load dependent libraries for dlopen(). */ - #cmakedefine LTDL_DLOPEN_DEPLIBS ${LTDL_DLOPEN_DEPLIBS} - diff --git a/compiler-rt-3.5.0.src.tar.xz b/compiler-rt-3.5.0.src.tar.xz new file mode 100644 index 0000000..ba3c543 --- /dev/null +++ b/compiler-rt-3.5.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4b3e655832bf8d9a357ea2c771db347237460e131988cbb96cda40ff39a8136 +size 1088352 diff --git a/default-to-i586.patch b/default-to-i586.patch index c80fcdc..2135700 100644 --- a/default-to-i586.patch +++ b/default-to-i586.patch @@ -1,16 +1,7 @@ -Index: llvm/tools/clang/lib/Driver/Tools.cpp +Index: cfe-3.5.0.src/lib/Driver/Tools.cpp =================================================================== ---- llvm.orig/tools/clang/lib/Driver/Tools.cpp -+++ llvm/tools/clang/lib/Driver/Tools.cpp -@@ -1304,7 +1304,7 @@ static const char *getX86TargetCPU(const - } - - // All x86 devices running Android have core2 as their common -- // denominator. This makes a better choice than pentium4. -+ // denominator. This makes a better choice than i586. - if (Triple.getEnvironment() == llvm::Triple::Android) - return "core2"; - +--- cfe-3.5.0.src/lib/Driver/Tools.cpp ++++ cfe-3.5.0.src/lib/Driver/Tools.cpp @@ -1322,8 +1322,8 @@ static const char *getX86TargetCPU(const case llvm::Triple::Bitrig: return "i686"; diff --git a/libcxx-3.5.0.src.tar.xz b/libcxx-3.5.0.src.tar.xz new file mode 100644 index 0000000..5c2b075 --- /dev/null +++ b/libcxx-3.5.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8045da845a63e50c201939eda8290d45e5752a9385d4d626214300d4a4d0b1c0 +size 911996 diff --git a/libcxxabi-3.5.0.src.tar.xz b/libcxxabi-3.5.0.src.tar.xz new file mode 100644 index 0000000..04140dc --- /dev/null +++ b/libcxxabi-3.5.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53c6be6a2dd2371f6d92c968cb8a59fbe13c6153583025433df067f706bfacd9 +size 551504 diff --git a/libcxxabi-exceptions.patch b/libcxxabi-exceptions.patch new file mode 100644 index 0000000..6a0c0b2 --- /dev/null +++ b/libcxxabi-exceptions.patch @@ -0,0 +1,13 @@ +Index: libcxxabi-3.5.0.src/src/CMakeLists.txt +=================================================================== +--- libcxxabi-3.5.0.src/src/CMakeLists.txt ++++ libcxxabi-3.5.0.src/src/CMakeLists.txt +@@ -52,7 +52,7 @@ append_if(libraries LIBCXXABI_HAS_PTHREA + if (LIBCXXABI_USE_LLVM_UNWINDER) + list(APPEND libraries unwind) + else() +- append_if(libraries LIBCXXABI_HAS_GCC_EH_LIB gcc_eh) ++ append_if(libraries LIBCXXABI_HAS_GCC_EH_LIB gcc_s) + endif() + + target_link_libraries(cxxabi ${libraries}) diff --git a/lldb-3.4.tar.bz2 b/lldb-3.4.tar.bz2 deleted file mode 100644 index db4f735..0000000 --- a/lldb-3.4.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72394435cba48dd03693f3e9d80f7859dda63e138c6d0fb3fc8e03e9a0b53a98 -size 10619204 diff --git a/lldb-3.5.0.src.tar.xz b/lldb-3.5.0.src.tar.xz new file mode 100644 index 0000000..89f8041 --- /dev/null +++ b/lldb-3.5.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f98acd3a00bad8c5c85461f452bdecdd7ee87fe09917c7f924f92ddc64ff67f2 +size 10147028 diff --git a/lldb-cmake.patch b/lldb-cmake.patch index b50c1a6..ccd84de 100644 --- a/lldb-cmake.patch +++ b/lldb-cmake.patch @@ -1,43 +1,8 @@ ---- lldb.orig/scripts/CMakeLists.txt 2013-06-13 09:05:41.000000000 -0700 -+++ lldb.orig/scripts/CMakeLists.txt 2014-03-08 00:59:09.089734896 -0800 -@@ -16,5 +16,16 @@ - - # Install the LLDB python module on all operating systems (except Windows) - if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") -- install(SCRIPT lldb_python_module.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" -DCMAKE_BUILD_DIR=\"${CMAKE_BUILD_DIR}\") -+ install(CODE " -+ include(FindPythonInterp) -+ -+ SET(PYTHON_DIRECTORY python\${PYTHON_VERSION_MAJOR}.\${PYTHON_VERSION_MINOR}) -+ -+ SET(lldb_module_src ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/\${PYTHON_DIRECTORY}) -+ SET(lldb_module_dest \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}) -+ -+ MESSAGE(STATUS \"Installing LLDB python module from: \${lldb_module_src} to \${lldb_module_dest}\") -+ FILE(COPY \${lldb_module_src} DESTINATION \${lldb_module_dest}) -+ " -+ ) - endif() ---- lldb.orig/scripts/lldb_python_module.cmake 2013-06-13 09:05:41.000000000 -0700 -+++ /dev/null 2014-02-14 05:57:02.719999980 -0800 -@@ -1,14 +0,0 @@ --# This CMake script installs the LLDB python module from the build directory --# to the install directory. -- --# FIXME: if a non-standard version of python is requested, the cmake macro --# below will need Python_ADDITIONAL_VERSIONS set in order to find it. --include(FindPythonInterp) -- --SET(PYTHON_DIRECTORY python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) -- --SET(lldb_module_src ${CMAKE_CURRENT_BINARY_DIR}/lib/${PYTHON_DIRECTORY}) --SET(lldb_module_dest ${CMAKE_INSTALL_PREFIX}/lib) -- --MESSAGE(STATUS "Installing LLDB python module from: ${lldb_module_src} to ${lldb_module_dest}") --FILE(COPY "${lldb_module_src}" DESTINATION "${lldb_module_dest}") ---- lldb.orig/source/CMakeLists.txt 2013-11-15 06:15:10.000000000 -0800 -+++ lldb/source/CMakeLists.txt 2014-03-08 03:38:38.480795021 -0800 -@@ -225,5 +225,5 @@ +Index: llvm/tools/lldb/source/CMakeLists.txt +=================================================================== +--- llvm.orig/tools/lldb/source/CMakeLists.txt ++++ llvm/tools/lldb/source/CMakeLists.txt +@@ -342,5 +342,5 @@ endif () install(TARGETS liblldb RUNTIME DESTINATION bin @@ -45,3 +10,48 @@ - ARCHIVE DESTINATION lib) + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) +Index: llvm/tools/lldb/scripts/Python/modules/readline/CMakeLists.txt +=================================================================== +--- llvm.orig/tools/lldb/scripts/Python/modules/readline/CMakeLists.txt ++++ llvm/tools/lldb/scripts/Python/modules/readline/CMakeLists.txt +@@ -13,7 +13,7 @@ add_library(readline SHARED readline.cpp + # python finds it when loading the python readline module. + set_target_properties(readline PROPERTIES + PREFIX "" +- LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib/${PYTHON_DIRECTORY}) ++ LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/${PYTHON_DIRECTORY}) + + # Install the readline module. +-install(TARGETS readline LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${PYTHON_DIRECTORY}) ++install(TARGETS readline LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}/${PYTHON_DIRECTORY}) +Index: llvm/tools/lldb/source/lldb.cpp +=================================================================== +--- llvm.orig/tools/lldb/source/lldb.cpp ++++ llvm/tools/lldb/source/lldb.cpp +@@ -287,11 +287,7 @@ extern "C" const unsigned char liblldb_c + static const char * + GetLLDBRevision() + { +-#ifdef LLDB_REVISION + return LLDB_REVISION; +-#else +- return NULL; +-#endif + } + + static const char * +Index: llvm/tools/lldb/source/Core/IOHandler.cpp +=================================================================== +--- llvm.orig/tools/lldb/source/Core/IOHandler.cpp ++++ llvm/tools/lldb/source/Core/IOHandler.cpp +@@ -29,8 +29,8 @@ + #include "lldb/Target/ThreadPlan.h" + + #ifndef LLDB_DISABLE_CURSES +-#include +-#include ++#include ++#include + #endif + + using namespace lldb; diff --git a/lldb.spec b/lldb.spec index 4a6239e..1675a6a 100644 --- a/lldb.spec +++ b/lldb.spec @@ -17,13 +17,13 @@ Name: lldb -Version: 3.4 +Version: 3.5.0 Release: 0 Summary: The LLDB Debugger License: NCSA Group: Development/Languages Url: http://lldb.llvm.org/ -Source: lldb-%{version}.tar.bz2 +Source: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz Patch1: lldb-cmake.patch BuildRequires: cmake BuildRequires: libedit-devel diff --git a/llvm-3.4.2.tar.bz2 b/llvm-3.4.2.tar.bz2 deleted file mode 100644 index 81c9700..0000000 --- a/llvm-3.4.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11198f9f9bc7321aa5da950378fab116eef8f1fc99460a00a9c61edee7e5eed5 -size 27916196 diff --git a/llvm-3.5.0.src.tar.xz b/llvm-3.5.0.src.tar.xz new file mode 100644 index 0000000..f78b989 --- /dev/null +++ b/llvm-3.5.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28e199f368ef0a4666708f31c7991ad3bcc3a578342b0306526dd35f07595c03 +size 11735940 diff --git a/llvm-config-lib64.patch b/llvm-config-lib64.patch index 3cd7ac4..d9dea70 100644 --- a/llvm-config-lib64.patch +++ b/llvm-config-lib64.patch @@ -1,12 +1,13 @@ -diff -ur llvm.orig/tools/llvm-config/llvm-config.cpp llvm/tools/llvm-config/llvm-config.cpp ---- llvm.orig/tools/llvm-config/llvm-config.cpp 2012-11-12 11:25:40.547628293 +0100 -+++ llvm/tools/llvm-config/llvm-config.cpp 2012-12-02 15:09:31.981279773 +0100 -@@ -231,15 +231,15 @@ - switch (DevelopmentTreeLayout) { +Index: llvm-3.5.0.src/tools/llvm-config/llvm-config.cpp +=================================================================== +--- llvm-3.5.0.src.orig/tools/llvm-config/llvm-config.cpp ++++ llvm-3.5.0.src/tools/llvm-config/llvm-config.cpp +@@ -243,16 +243,16 @@ int main(int argc, char **argv) { case MakefileStyle: - ActiveBinDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/bin"; -- ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib"; -+ ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib64"; + ActivePrefix = ActiveObjRoot; + ActiveBinDir = ActiveObjRoot + "/" + build_mode + "/bin"; +- ActiveLibDir = ActiveObjRoot + "/" + build_mode + "/lib"; ++ ActiveLibDir = ActiveObjRoot + "/" + build_mode + "/lib64"; break; case CMakeStyle: ActiveBinDir = ActiveObjRoot + "/bin"; @@ -14,13 +15,14 @@ diff -ur llvm.orig/tools/llvm-config/llvm-config.cpp llvm/tools/llvm-config/llvm + ActiveLibDir = ActiveObjRoot + "/lib64"; break; case CMakeBuildModeStyle: - ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE; -- ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE; -+ ActiveLibDir = ActiveObjRoot + "/lib64/" + LLVM_BUILDMODE; + ActivePrefix = ActiveObjRoot; + ActiveBinDir = ActiveObjRoot + "/bin/" + build_mode; +- ActiveLibDir = ActiveObjRoot + "/lib/" + build_mode; ++ ActiveLibDir = ActiveObjRoot + "/lib64/" + build_mode; break; } -@@ -250,7 +250,7 @@ +@@ -263,7 +263,7 @@ int main(int argc, char **argv) { ActivePrefix = CurrentExecPrefix; ActiveIncludeDir = ActivePrefix + "/include"; ActiveBinDir = ActivePrefix + "/bin"; @@ -28,4 +30,4 @@ diff -ur llvm.orig/tools/llvm-config/llvm-config.cpp llvm/tools/llvm-config/llvm + ActiveLibDir = ActivePrefix + "/lib64"; ActiveIncludeOption = "-I" + ActiveIncludeDir; } - \ No newline at end of file + diff --git a/llvm-docs-3.5.0.tar.xz b/llvm-docs-3.5.0.tar.xz new file mode 100644 index 0000000..86eb63a --- /dev/null +++ b/llvm-docs-3.5.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d906689b868eaa289d396cd1856a6290ae1d9122696ca983304499a279c0d309 +size 1385872 diff --git a/llvm.changes b/llvm.changes index 689afe7..5d069e9 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Sep 4 12:26:10 UTC 2014 - idonmez@suse.com + +- Update to llvm 3.5.0 + * Major update, see http://llvm.org/releases/3.5.0/docs/ReleaseNotes.html +- Use upstream pristine tarballs +- Add libc++/libc++abi support clang +- Add libcxxabi-exceptions.patch to fix libcxxabi exception handling +- Remove asan-disable-hugemalloctest.patch and + cmake-patchversion.patch, fixed upstream. + ------------------------------------------------------------------- Fri Aug 15 14:23:39 UTC 2014 - idonmez@suse.com diff --git a/llvm.spec b/llvm.spec index 8cabb11..49b7877 100644 --- a/llvm.spec +++ b/llvm.spec @@ -16,17 +16,24 @@ # -%define _revision 213642 -%define _release_version 3.4.2 +%define _revision 216961 +%define _release_version 3.5.0 Name: llvm -Version: 3.4.2 +Version: 3.5.0 Release: 0 Summary: Low Level Virtual Machine License: NCSA Group: Development/Languages/Other Url: http://www.llvm.org -Source0: %{name}-%{version}.tar.bz2 +Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.xz +Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz +Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz +Source3: http://llvm.org/releases/%{version}/libcxx-%{version}.src.tar.xz +Source4: http://llvm.org/releases/%{version}/libcxxabi-%{version}.src.tar.xz +# Manually created docs +Source5: llvm-docs-%{version}.tar.xz +Source6: cfe-docs-%{version}.tar.xz Source100: %{name}-rpmlintrc Source101: baselibs.conf # PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision @@ -44,10 +51,8 @@ Patch7: cmake-host-triple.patch # PATCH-FIX-OPENSUSE aarch64-suse-support.patch -- Enable AArch64 suse toolchain support Patch8: aarch64-suse-support.patch Patch9: arm-remove-xfails.diff -# PATCH-FIX-OPENSUSE asan-disable-hugemalloctest.patch -- Disable ASAN HugeMallocTest -Patch10: asan-disable-hugemalloctest.patch -Patch11: clang-resourcedirs.patch -Patch12: cmake-patchversion.patch +Patch10: clang-resourcedirs.patch +Patch11: libcxxabi-exceptions.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -143,21 +148,29 @@ Requires: python This package contains the Python bindings to clang (C language) frontend for LLVM. %prep -%setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +%setup -q -a 1 -a 2 -a 3 -a 4 -a 6 -b 5 -n %{name}-%{version}.src +%patch1 +%patch2 +%patch3 +%patch4 %if "%{_lib}" == "lib64" %patch5 -p1 %endif -%patch6 -p1 +%patch6 %patch7 -p1 -%patch8 -p1 +%patch8 %patch9 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 +%patch10 +%patch11 + +# Move into right place +mv cfe-%{version}.src tools/clang +mv compiler-rt-%{version}.src projects/compiler-rt + +%ifarch %{ix86} x86_64 +mv libcxx-%{version}.src projects/libcxx +mv libcxxabi-%{version}.src projects/libcxxabi +%endif # We hardcode i586 rm tools/clang/test/Driver/x86_features.c @@ -167,8 +180,10 @@ sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp %if "%{_lib}" == "lib64" # Nasty hardcoded path +sed -i s,CLANG_RESOURCE_DIR,'"../lib64/clang/%{_release_version}"',g tools/clang/lib/Driver/Driver.cpp sed -i s,"/lib/LLVMgold","/lib64/LLVMgold",g tools/clang/lib/Driver/Tools.cpp sed -i s,"}lib{","}lib64{",g tools/clang/test/Preprocessor/iwithprefix.c +sed -i s,'$ORIGIN/../lib','$ORIGIN/../lib64',g CMakeLists.txt %endif sed -i s,LLVM_LIBDIR,%{_lib}, tools/clang/lib/Driver/Driver.cpp @@ -249,6 +264,10 @@ make %{?_smp_mflags} VERBOSE=1 clang popd pushd stage2 +%if "%{_lib}" == "lib64" + ln -sf lib lib64 +%endif + export CC=$TOPLEVEL/stage1/bin/clang export CXX=$TOPLEVEL/stage1/bin/clang++ @@ -303,6 +322,7 @@ ln -s lib lib64 make check make clang-test +make check-libcxxabi %endif %endif @@ -413,7 +433,6 @@ rm %{buildroot}%{_mandir}/man1/lit.1 %{_bindir}/bugpoint %{_bindir}/llc %{_bindir}/lli -%{_bindir}/lli-child-target %{_bindir}/macho-dump %exclude %{_bindir}/%{name}-config %{_bindir}/%{name}* @@ -449,6 +468,8 @@ rm %{buildroot}%{_mandir}/man1/lit.1 %{_datadir}/clang %{_mandir}/man1/clang.1%{ext_man} %{_libdir}/libLTO.* +%{_libdir}/libc++* +%{_includedir}/c++/* %if 0%{?suse_version} >= 1220 %{_libdir}/LLVMgold.so %{_libdir}/bfd-plugins/ diff --git a/set-revision.patch b/set-revision.patch index 66cbf2e..d4e54ee 100644 --- a/set-revision.patch +++ b/set-revision.patch @@ -1,7 +1,7 @@ -Index: llvm/tools/clang/lib/Basic/Version.cpp +Index: cfe-3.5.0.src/lib/Basic/Version.cpp =================================================================== ---- llvm.orig/tools/clang/lib/Basic/Version.cpp -+++ llvm/tools/clang/lib/Basic/Version.cpp +--- cfe-3.5.0.src/lib/Basic/Version.cpp ++++ cfe-3.5.0.src/lib/Basic/Version.cpp @@ -66,19 +66,11 @@ std::string getLLVMRepositoryPath() { }