Accepting request 250034 from devel:tools:compiler
- Add llvm-remove-werror-date-time.patch to remove -Werror=date-time for CXXFLAGS, gcc does not support it and it creeps into llvm-config --cflags - Remove wrong Requires from the llvm-devel package - Add default target triple form ARM, fixes bnc#893359 - Use ninja for building - 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 (only on x86_64) - Add libcxxabi-exceptions.patch to fix libcxxabi exception handling - Add libcxx-libdir.patch to fix libdir on 64bit arches - Remove asan-disable-hugemalloctest.patch and cmake-patchversion.patch, fixed upstream. OBS-URL: https://build.opensuse.org/request/show/250034 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm?expand=0&rev=64
This commit is contained in:
commit
274452bd0f
@ -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" };
|
||||
|
@ -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" };
|
||||
|
@ -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);
|
@ -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<llvm::MemoryBuffer> File;
|
||||
- if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) {
|
||||
- StringRef Data = File.get()->getBuffer();
|
||||
- SmallVector<StringRef, 8> 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<Distro>(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<std::unique_ptr<llvm::MemoryBuffer>> 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.
|
||||
|
3
cfe-3.5.0.src.tar.xz
Normal file
3
cfe-3.5.0.src.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fc80992e004b06f6c7afb612de1cdaa9ac9d25811c55f94fcf7331d9b81cdb8b
|
||||
size 8233432
|
3
cfe-docs-3.5.0.tar.xz
Normal file
3
cfe-docs-3.5.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7c9d5a14484424eb9126cae185e5905fa659497123805020ee854c6dd53c3602
|
||||
size 574084
|
@ -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)
|
||||
|
@ -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.
|
||||
|
@ -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}
|
||||
|
3
compiler-rt-3.5.0.src.tar.xz
Normal file
3
compiler-rt-3.5.0.src.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a4b3e655832bf8d9a357ea2c771db347237460e131988cbb96cda40ff39a8136
|
||||
size 1088352
|
@ -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";
|
||||
|
3
libcxx-3.5.0.src.tar.xz
Normal file
3
libcxx-3.5.0.src.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8045da845a63e50c201939eda8290d45e5752a9385d4d626214300d4a4d0b1c0
|
||||
size 911996
|
13
libcxx-libdir.patch
Normal file
13
libcxx-libdir.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: libcxx-3.5.0.src/lib/CMakeLists.txt
|
||||
===================================================================
|
||||
--- libcxx-3.5.0.src.orig/lib/CMakeLists.txt
|
||||
+++ libcxx-3.5.0.src/lib/CMakeLists.txt
|
||||
@@ -96,6 +96,6 @@ set_target_properties(cxx
|
||||
)
|
||||
|
||||
install(TARGETS cxx
|
||||
- LIBRARY DESTINATION lib
|
||||
- ARCHIVE DESTINATION lib
|
||||
+ LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
+ ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
)
|
3
libcxxabi-3.5.0.src.tar.xz
Normal file
3
libcxxabi-3.5.0.src.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:53c6be6a2dd2371f6d92c968cb8a59fbe13c6153583025433df067f706bfacd9
|
||||
size 551504
|
13
libcxxabi-exceptions.patch
Normal file
13
libcxxabi-exceptions.patch
Normal file
@ -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})
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:72394435cba48dd03693f3e9d80f7859dda63e138c6d0fb3fc8e03e9a0b53a98
|
||||
size 10619204
|
3
lldb-3.5.0.src.tar.xz
Normal file
3
lldb-3.5.0.src.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f98acd3a00bad8c5c85461f452bdecdd7ee87fe09917c7f924f92ddc64ff67f2
|
||||
size 10147028
|
@ -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: lldb-3.5.0.src/source/CMakeLists.txt
|
||||
===================================================================
|
||||
--- lldb-3.5.0.src.orig/source/CMakeLists.txt
|
||||
+++ lldb-3.5.0.src/source/CMakeLists.txt
|
||||
@@ -349,5 +349,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: lldb-3.5.0.src/scripts/Python/modules/readline/CMakeLists.txt
|
||||
===================================================================
|
||||
--- lldb-3.5.0.src.orig/scripts/Python/modules/readline/CMakeLists.txt
|
||||
+++ lldb-3.5.0.src/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: lldb-3.5.0.src/source/lldb.cpp
|
||||
===================================================================
|
||||
--- lldb-3.5.0.src.orig/source/lldb.cpp
|
||||
+++ lldb-3.5.0.src/source/lldb.cpp
|
||||
@@ -263,11 +263,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: lldb-3.5.0.src/source/Core/IOHandler.cpp
|
||||
===================================================================
|
||||
--- lldb-3.5.0.src.orig/source/Core/IOHandler.cpp
|
||||
+++ lldb-3.5.0.src/source/Core/IOHandler.cpp
|
||||
@@ -29,8 +29,8 @@
|
||||
#include "lldb/Target/ThreadPlan.h"
|
||||
|
||||
#ifndef LLDB_DISABLE_CURSES
|
||||
-#include <ncurses.h>
|
||||
-#include <panel.h>
|
||||
+#include <ncurses/ncurses.h>
|
||||
+#include <ncurses/panel.h>
|
||||
#endif
|
||||
|
||||
using namespace lldb;
|
||||
|
12
lldb-underlink.patch
Normal file
12
lldb-underlink.patch
Normal file
@ -0,0 +1,12 @@
|
||||
Index: lldb-3.5.0.src/source/CMakeLists.txt
|
||||
===================================================================
|
||||
--- lldb-3.5.0.src.orig/source/CMakeLists.txt
|
||||
+++ lldb-3.5.0.src/source/CMakeLists.txt
|
||||
@@ -161,6 +161,7 @@ set( CLANG_USED_LIBS
|
||||
clangRewriteFrontend
|
||||
clangSema
|
||||
clangSerialization
|
||||
+ LLVMSupport
|
||||
)
|
||||
|
||||
set(LLDB_SYSTEM_LIBS)
|
12
lldb.changes
12
lldb.changes
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 17 13:26:34 UTC 2014 - idonmez@suse.com
|
||||
|
||||
- Add BuildRequires on ncurses-devel
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 6 14:59:58 UTC 2014 - idonmez@suse.com
|
||||
|
||||
- Update to version 3.5.0
|
||||
* No changelog upstream
|
||||
- Add lldb-underlink.patch to link to LLVMSupport
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 17 09:02:51 UTC 2014 - idonmez@suse.com
|
||||
|
||||
|
38
lldb.spec
38
lldb.spec
@ -16,26 +16,36 @@
|
||||
#
|
||||
|
||||
|
||||
%define _revision 216961
|
||||
|
||||
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
|
||||
Patch2: lldb-underlink.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: libedit-devel
|
||||
BuildRequires: llvm-clang-devel
|
||||
BuildRequires: llvm-devel
|
||||
BuildRequires: llvm-clang-devel = %{version}
|
||||
BuildRequires: llvm-devel = %{version}
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: ninja
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: swig
|
||||
BuildRequires: zlib-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: libLLVM = %{version}
|
||||
Requires: libclang = %{version}
|
||||
Requires: python-base
|
||||
ExclusiveArch: arm x86_64
|
||||
|
||||
%define py_major $(python -c "import sys; print sys.version_info[0];")
|
||||
%define py_minor $(python -c "import sys; print sys.version_info[1];")
|
||||
|
||||
%description
|
||||
LLDB is a next generation, high-performance debugger. It is built as a set
|
||||
of reusable components which highly leverage existing libraries in the
|
||||
@ -56,12 +66,16 @@ larger LLVM Project, such as the Clang expression parser and LLVM
|
||||
disassembler.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -n %{name}-%{version}.src
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
sed -i s,LLDB_REVISION,\"%{_revision}\",g source/lldb.cpp
|
||||
|
||||
%build
|
||||
mkdir build
|
||||
pushd build
|
||||
|
||||
cmake -DCMAKE_C_COMPILER=clang \
|
||||
-DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
@ -69,11 +83,18 @@ cmake -DCMAKE_C_COMPILER=clang \
|
||||
-DLLVM_LIBDIR_SUFFIX=64 \
|
||||
%endif
|
||||
-DLLDB_PATH_TO_LLVM_BUILD=%{_prefix} \
|
||||
-DLLDB_PATH_TO_CLANG_BUILD=%{_prefix} ..
|
||||
-DLLDB_PATH_TO_CLANG_BUILD=%{_prefix} \
|
||||
-DLLVM_RUNTIME_OUTPUT_INTDIR=$PWD/bin \
|
||||
-DLLVM_LIBRARY_OUTPUT_INTDIR=$PWD/%{_lib} \
|
||||
-DPYTHON_VERSION_MAJOR=%{py_major} \
|
||||
-DPYTHON_VERSION_MINOR=%{py_minor} \
|
||||
-G "Ninja" \
|
||||
..
|
||||
ninja
|
||||
|
||||
%install
|
||||
pushd build
|
||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||
DESTDIR=%{buildroot} ninja install
|
||||
|
||||
rm %{buildroot}%{_libdir}/liblldb*.a
|
||||
|
||||
@ -85,7 +106,8 @@ rm %{buildroot}%{_libdir}/liblldb*.a
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/liblldb.so.*
|
||||
%{_bindir}/lldb*
|
||||
%{_libdir}/python*/site-packages/lldb
|
||||
%{py_sitedir}/readline.so
|
||||
%{py_sitedir}/lldb
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:11198f9f9bc7321aa5da950378fab116eef8f1fc99460a00a9c61edee7e5eed5
|
||||
size 27916196
|
3
llvm-3.5.0.src.tar.xz
Normal file
3
llvm-3.5.0.src.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:28e199f368ef0a4666708f31c7991ad3bcc3a578342b0306526dd35f07595c03
|
||||
size 11735940
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
3
llvm-docs-3.5.0.tar.xz
Normal file
3
llvm-docs-3.5.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d906689b868eaa289d396cd1856a6290ae1d9122696ca983304499a279c0d309
|
||||
size 1385872
|
14
llvm-remove-werror-date-time.patch
Normal file
14
llvm-remove-werror-date-time.patch
Normal file
@ -0,0 +1,14 @@
|
||||
Index: llvm-3.5.0.src/cmake/modules/HandleLLVMOptions.cmake
|
||||
===================================================================
|
||||
--- llvm-3.5.0.src.orig/cmake/modules/HandleLLVMOptions.cmake
|
||||
+++ llvm-3.5.0.src/cmake/modules/HandleLLVMOptions.cmake
|
||||
@@ -302,9 +302,6 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE
|
||||
endif()
|
||||
endif (LLVM_ENABLE_WARNINGS)
|
||||
append_if(LLVM_ENABLE_WERROR "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
||||
- if (NOT LLVM_ENABLE_TIMESTAMPS)
|
||||
- add_flag_if_supported("-Werror=date-time" WERROR_DATE_TIME)
|
||||
- endif ()
|
||||
if (LLVM_ENABLE_CXX1Y)
|
||||
check_cxx_compiler_flag("-std=c++1y" CXX_SUPPORTS_CXX1Y)
|
||||
append_if(CXX_SUPPORTS_CXX1Y "-std=c++1y" CMAKE_CXX_FLAGS)
|
34
llvm.changes
34
llvm.changes
@ -1,3 +1,37 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 17 11:01:31 UTC 2014 - idonmez@suse.com
|
||||
|
||||
- Add llvm-remove-werror-date-time.patch to remove -Werror=date-time
|
||||
for CXXFLAGS, gcc does not support it and it creeps into
|
||||
llvm-config --cflags
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 17 10:53:20 UTC 2014 - idonmez@suse.com
|
||||
|
||||
- Remove wrong Requires from the llvm-devel package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 17 08:09:17 UTC 2014 - idonmez@suse.com
|
||||
|
||||
- Add default target triple form ARM, fixes bnc#893359
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 5 16:09:45 UTC 2014 - idonmez@suse.com
|
||||
|
||||
- Use ninja for building
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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 (only on x86_64)
|
||||
- Add libcxxabi-exceptions.patch to fix libcxxabi exception handling
|
||||
- Add libcxx-libdir.patch to fix libdir on 64bit arches
|
||||
- Remove asan-disable-hugemalloctest.patch and
|
||||
cmake-patchversion.patch, fixed upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 15 14:23:39 UTC 2014 - idonmez@suse.com
|
||||
|
||||
|
182
llvm.spec
182
llvm.spec
@ -16,17 +16,28 @@
|
||||
#
|
||||
|
||||
|
||||
%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
|
||||
# cd docs
|
||||
# make -f Makefile.sphinx man html
|
||||
# cd ..
|
||||
# tar cvJf llvm-docs-3.5.0.tar.xz llvm-3.5.0.src/docs/_build/{man,html}
|
||||
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,18 +55,14 @@ 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
|
||||
Patch12: libcxx-libdir.patch
|
||||
Patch13: llvm-remove-werror-date-time.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: cmake
|
||||
%if 0%{?suse_version} >= 1220
|
||||
BuildRequires: binutils-devel >= 2.21.90
|
||||
%endif
|
||||
BuildRequires: bison
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: flex
|
||||
BuildRequires: gcc
|
||||
@ -64,6 +71,7 @@ BuildRequires: groff
|
||||
BuildRequires: libffi-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: ninja
|
||||
BuildRequires: python-base
|
||||
Requires: libLLVM = %{version}-%{release}
|
||||
# llvm does not work on ppc, only ppc64
|
||||
@ -88,9 +96,6 @@ This package contains the shared libraries needed for LLVM.
|
||||
Summary: Header Files for LLVM
|
||||
Group: Development/Languages/Other
|
||||
Requires: %{name} = %{version}
|
||||
Requires: libffi-devel
|
||||
Requires: libstdc++-devel >= 3.4
|
||||
Requires: ncurses-devel
|
||||
|
||||
%description devel
|
||||
This package contains library and header files needed to develop
|
||||
@ -143,21 +148,31 @@ 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
|
||||
%patch12
|
||||
%patch13 -p1
|
||||
|
||||
# Move into right place
|
||||
mv cfe-%{version}.src tools/clang
|
||||
mv compiler-rt-%{version}.src projects/compiler-rt
|
||||
|
||||
%ifarch 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 +182,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
|
||||
@ -186,7 +203,7 @@ sed -i s,"subdirectories = .*","subdirectories = ARM", lib/Target/LLVMBuild.txt
|
||||
sed -i s,"subdirectories = .*","subdirectories = PowerPC", lib/Target/LLVMBuild.txt
|
||||
%endif
|
||||
|
||||
%ifarch s390 s390x
|
||||
%ifarch s390x
|
||||
sed -i s,"subdirectories = .*","subdirectories = SystemZ", lib/Target/LLVMBuild.txt
|
||||
%endif
|
||||
|
||||
@ -223,18 +240,12 @@ sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g ../cmake/modules/AddLLVM.cmak
|
||||
%define host_triple powerpc64le-suse-linux
|
||||
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g ../cmake/modules/AddLLVM.cmake
|
||||
%endif
|
||||
%ifarch s390
|
||||
%define host_triple s390-suse-linux
|
||||
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"SystemZ"',g ../cmake/modules/AddLLVM.cmake
|
||||
rm -rf ../projects/compiler-rt
|
||||
%endif
|
||||
%ifarch s390x
|
||||
%ifarch 390x
|
||||
%define host_triple s390x-suse-linux
|
||||
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"SystemZ"',g ../cmake/modules/AddLLVM.cmake
|
||||
rm -rf ../projects/compiler-rt
|
||||
%endif
|
||||
|
||||
cmake -G "Unix Makefiles" \
|
||||
cmake -G "Ninja" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
@ -244,15 +255,72 @@ cmake -G "Unix Makefiles" \
|
||||
-DLLVM_HOST_TRIPLE=%{host_triple} \
|
||||
..
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1 clang
|
||||
ninja %{?_smp_mflags} clang
|
||||
|
||||
popd
|
||||
pushd stage2
|
||||
|
||||
%if "%{_lib}" == "lib64"
|
||||
ln -sf lib lib64
|
||||
%endif
|
||||
|
||||
export CC=$TOPLEVEL/stage1/bin/clang
|
||||
export CXX=$TOPLEVEL/stage1/bin/clang++
|
||||
|
||||
cmake -G "Unix Makefiles" \
|
||||
cmake -G "Ninja" \
|
||||
%ifnarch ppc64 ppc64le
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
%endif
|
||||
%ifarch %arm ppc64 ppc64le
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
%else
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DLLVM_HOST_TRIPLE=%{host_triple} \
|
||||
%endif
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
%ifarch armv6hl
|
||||
-DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
|
||||
-DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE=armv6-unknown-linux-gnueabihf \
|
||||
%endif
|
||||
%ifarch armv7hl
|
||||
-DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \
|
||||
-DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE=armv7l-unknown-linux-gnueabihf \
|
||||
%endif
|
||||
%if "%{_lib}" == "lib64"
|
||||
-DLLVM_LIBDIR_SUFFIX=64 \
|
||||
%endif
|
||||
-DLLVM_REQUIRES_RTTI=ON \
|
||||
-DLLVM_ENABLE_TIMESTAMPS=OFF \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
-DLLVM_ENABLE_PIC=ON \
|
||||
-DLLVM_BINUTILS_INCDIR=/usr/include \
|
||||
%ifarch %{ix86} x86_64
|
||||
-DLLVM_TARGETS_TO_BUILD="host;R600" \
|
||||
%else
|
||||
-DLLVM_TARGETS_TO_BUILD=host \
|
||||
%endif
|
||||
-DLLVM_INCLUDE_TESTS=OFF \
|
||||
..
|
||||
|
||||
ninja %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
cd stage2
|
||||
%ifnarch armv7hl armv7l
|
||||
%if 0%{!?qemu_user_space_build:1}
|
||||
# we just do not have enough memory with qemu emulation
|
||||
|
||||
%if "%{_lib}" == "lib64"
|
||||
ln -s lib lib64
|
||||
%endif
|
||||
|
||||
# Rebuild to enable tests, if we enable
|
||||
# at first time gtest junk ends up in installed
|
||||
# cmake files
|
||||
rm CMakeCache.txt
|
||||
cmake -G "Ninja" \
|
||||
%ifnarch ppc64 ppc64le
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
%endif
|
||||
@ -278,37 +346,30 @@ cmake -G "Unix Makefiles" \
|
||||
-DLLVM_ENABLE_TIMESTAMPS=OFF \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
-DLLVM_ENABLE_PIC=ON \
|
||||
%if 0%{?suse_version} >= 1220
|
||||
-DLLVM_BINUTILS_INCDIR=/usr/include \
|
||||
%endif
|
||||
%ifarch %{ix86} x86_64
|
||||
-DLLVM_TARGETS_TO_BUILD="host;R600" \
|
||||
%else
|
||||
-DLLVM_TARGETS_TO_BUILD=host \
|
||||
%endif
|
||||
-DLLVM_INCLUDE_TESTS=ON \
|
||||
-DLLVM_BUILD_TESTS=ON \
|
||||
..
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
ninja %{?_smp_mflags}
|
||||
ninja check
|
||||
ninja clang-test
|
||||
|
||||
%check
|
||||
cd stage2
|
||||
%ifnarch armv7hl armv7l
|
||||
%if 0%{!?qemu_user_space_build:1}
|
||||
# we just do not have enough memory with qemu emulation
|
||||
|
||||
%if "%{_lib}" == "lib64"
|
||||
ln -s lib lib64
|
||||
%ifarch x86_64
|
||||
ninja check-libcxxabi
|
||||
%endif
|
||||
|
||||
make check
|
||||
make clang-test
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%install
|
||||
cd stage2
|
||||
make install DESTDIR=%{buildroot}
|
||||
DESTDIR=%{buildroot} ninja install
|
||||
cd ..
|
||||
|
||||
# Build man/html pages
|
||||
@ -363,10 +424,8 @@ pushd %{buildroot}%{_bindir}
|
||||
ln -s ccc-analyzer c++-analyzer
|
||||
popd
|
||||
|
||||
%if 0%{?suse_version} >= 1220
|
||||
mkdir -p %{buildroot}%{_libdir}/bfd-plugins
|
||||
ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/
|
||||
%endif
|
||||
|
||||
sed -i 's,RealBin/bin/clang,RealBin/clang,' \
|
||||
%{buildroot}%{_bindir}/scan-build
|
||||
@ -391,9 +450,6 @@ install -m 644 utils/vim/*.vim %{buildroot}%{_datadir}/vim/site/syntax/
|
||||
mv utils/vim/README utils/vim/README.vim
|
||||
|
||||
# Stuff we don't want to include
|
||||
rm %{buildroot}%{_libdir}/BugpointPasses.*
|
||||
rm %{buildroot}%{_libdir}/LLVMHello.*
|
||||
rm %{buildroot}%{_libdir}/libgtest*
|
||||
rm %{buildroot}%{_mandir}/man1/lit.1
|
||||
|
||||
%fdupes -s %{buildroot}%{_docdir}/%{name}
|
||||
@ -402,6 +458,9 @@ rm %{buildroot}%{_mandir}/man1/lit.1
|
||||
%post -n libLLVM -p /sbin/ldconfig
|
||||
%postun -n libLLVM -p /sbin/ldconfig
|
||||
|
||||
%post clang -p /sbin/ldconfig
|
||||
%postun clang -p /sbin/ldconfig
|
||||
|
||||
%post -n libclang -p /sbin/ldconfig
|
||||
%postun -n libclang -p /sbin/ldconfig
|
||||
|
||||
@ -413,7 +472,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,14 +507,14 @@ rm %{buildroot}%{_mandir}/man1/lit.1
|
||||
%{_datadir}/clang
|
||||
%{_mandir}/man1/clang.1%{ext_man}
|
||||
%{_libdir}/libLTO.*
|
||||
%if 0%{?suse_version} >= 1220
|
||||
%ifarch x86_64
|
||||
%{_libdir}/libc++*
|
||||
%{_includedir}/c++/*
|
||||
%endif
|
||||
%{_libdir}/LLVMgold.so
|
||||
%{_libdir}/bfd-plugins/
|
||||
%endif
|
||||
%{_libdir}/clang
|
||||
%ifnarch %arm aarch64 ppc64 s390 s390x
|
||||
%{_libdir}/clang/%{_release_version}/lib/linux/
|
||||
%endif
|
||||
|
||||
%files -n libclang
|
||||
%defattr(-,root,root,-)
|
||||
@ -477,6 +535,8 @@ rm %{buildroot}%{_mandir}/man1/lit.1
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/%{name}-config
|
||||
%{_libdir}/BugpointPasses.*
|
||||
%{_libdir}/LLVMHello.*
|
||||
%doc %{_mandir}/man1/%{name}-config.1%{ext_man}
|
||||
%{_includedir}/%{name}/
|
||||
%{_includedir}/%{name}-c/
|
||||
|
@ -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() {
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user