Accepting request 215039 from devel:tools:compiler
- Remove non-existing doc subpackage - Add a dependency on ncurses-devel since libLLVM now links to tinfo. - Add 32bit libclang bnc#857131 - Update to final llvm 3.4 release * See http://llvm.org/releases/3.4/docs/ReleaseNotes.html for complete changelog. - Update to final release candidate (r197980) - Update to r197866 from release_34 branch - Update to r197490 from release_34 branch - Update to r197142 from release_34 branch - Disable assertions again now that PPC64 backend is fixed - Update to r196899 from release_34 branch - Remove compiler_rt-r196612.patch, merged upstream - Add compiler_rt-r196612.patch to fix ubsan failures on i586 - Update to r196762 from release_34 branch - Update to r196503 from release_34 branch to get compiler_rt fixes - Update to r196487 from release_34 branch to get compiler_rt fixes OBS-URL: https://build.opensuse.org/request/show/215039 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm?expand=0&rev=55
This commit is contained in:
commit
6c9d30cc21
@ -1,10 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<constraints>
|
||||
<hardware>
|
||||
<physicalmemory>
|
||||
<size unit="M">2000</size>
|
||||
</physicalmemory>
|
||||
<memory>
|
||||
<size unit="M">4000</size>
|
||||
</memory>
|
||||
</hardware>
|
||||
<sandbox>kvm</sandbox>
|
||||
<hostlabel exclude="true">SLOW_CPU</hostlabel>
|
||||
</constraints>
|
||||
|
@ -1,16 +1,15 @@
|
||||
Index: llvm-3.3/tools/clang/lib/Driver/ToolChains.cpp
|
||||
Index: llvm/tools/clang/lib/Driver/ToolChains.cpp
|
||||
===================================================================
|
||||
--- llvm-3.3.orig/tools/clang/lib/Driver/ToolChains.cpp
|
||||
+++ llvm-3.3/tools/clang/lib/Driver/ToolChains.cpp
|
||||
@@ -1073,9 +1073,10 @@ Generic_GCC::GCCInstallationDetector::GC
|
||||
--- 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" };
|
||||
static const char *const AArch64Triples[] = {
|
||||
"aarch64-none-linux-gnu",
|
||||
+ "aarch64-suse-linux",
|
||||
"aarch64-linux-gnu"
|
||||
};
|
||||
static const char *const AArch64Triples[] = { "aarch64-none-linux-gnu",
|
||||
+ "aarch64-suse-linux",
|
||||
"aarch64-linux-gnu" };
|
||||
|
||||
static const char *const ARMLibDirs[] = { "/lib" };
|
||||
|
@ -1,16 +1,18 @@
|
||||
--- /tools/clang/lib/Driver/ToolChains.cpp.orig 2012-11-22 10:26:49.202107824 +0100
|
||||
+++ /tools/clang/lib/Driver/ToolChains.cpp 2012-11-22 12:20:33.662825882 +0100
|
||||
@@ -1082,11 +1082,13 @@ Generic_GCC::GCCInstallationDetector::GC
|
||||
Index: llvm/tools/clang/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
|
||||
|
||||
static const char *const ARMLibDirs[] = { "/lib" };
|
||||
static const char *const ARMTriples[] = {
|
||||
"arm-linux-gnueabi",
|
||||
+ "armv5tel-suse-linux-gnueabi",
|
||||
"arm-linux-androideabi"
|
||||
};
|
||||
static const char *const ARMHFTriples[] = {
|
||||
"arm-linux-gnueabihf",
|
||||
+ "armv7hl-suse-linux-gnueabi",
|
||||
"armv7hl-redhat-linux-gnueabi"
|
||||
};
|
||||
static const char *const ARMTriples[] = { "arm-linux-gnueabi",
|
||||
- "arm-linux-androideabi" };
|
||||
+ "arm-linux-androideabi",
|
||||
+ "armv5tel-suse-linux-gnueabi"};
|
||||
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[] = {
|
||||
|
17
asan-disable-hugemalloctest.patch
Normal file
17
asan-disable-hugemalloctest.patch
Normal file
@ -0,0 +1,17 @@
|
||||
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,11 +1,78 @@
|
||||
--- a/tools/clang/lib/Driver/ToolChains.cpp (revision 178453)
|
||||
+++ b/tools/clang/lib/Driver/ToolChains.cpp (working copy)
|
||||
@@ -1878,7 +1878,7 @@
|
||||
Index: llvm/tools/clang/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)
|
||||
}
|
||||
|
||||
static bool IsOpenSuse(enum Distro Distro) {
|
||||
- return Distro >= OpenSuse11_3 && Distro <= OpenSuse12_2;
|
||||
+ return true;
|
||||
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 UnknownDistro;
|
||||
}
|
||||
|
||||
static bool IsDebian(enum Distro Distro) {
|
||||
/// \brief Get our best guess at the multiarch triple for a target.
|
||||
|
@ -1 +1,3 @@
|
||||
libLLVM
|
||||
libclang
|
||||
|
||||
|
@ -1,20 +1,24 @@
|
||||
Index: llvm-3.3/tools/clang/lib/Driver/Tools.cpp
|
||||
Index: llvm/tools/clang/lib/Driver/Tools.cpp
|
||||
===================================================================
|
||||
--- llvm-3.3.orig/tools/clang/lib/Driver/Tools.cpp
|
||||
+++ llvm-3.3/tools/clang/lib/Driver/Tools.cpp
|
||||
@@ -1243,12 +1243,12 @@ static const char *getX86TargetCPU(const
|
||||
if (Triple.getOSName().startswith("netbsd"))
|
||||
return "i486";
|
||||
--- 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";
|
||||
|
||||
- // Fallback to p4.
|
||||
- return "pentium4";
|
||||
+ // Fallback to i586.
|
||||
+ return "i586";
|
||||
@@ -1322,8 +1322,8 @@ static const char *getX86TargetCPU(const
|
||||
case llvm::Triple::Bitrig:
|
||||
return "i686";
|
||||
default:
|
||||
- // Fallback to p4.
|
||||
- return "pentium4";
|
||||
+ // Fallback to i586.
|
||||
+ return "i586";
|
||||
}
|
||||
}
|
||||
|
||||
void Clang::AddX86TargetArgs(const ArgList &Args,
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:489179223491c39fc0274cab6540338bb0a6c18e581396d8b75341586181ade2
|
||||
size 24912910
|
3
llvm-3.4.tar.bz2
Normal file
3
llvm-3.4.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:29c1121d34d0309b9c2e5a39b7c79a1e83ac11c3b54acd6654d1ebf81ba1c08e
|
||||
size 27905661
|
@ -1,25 +0,0 @@
|
||||
Index: llvm-3.3/lib/Support/PrettyStackTrace.cpp
|
||||
===================================================================
|
||||
--- llvm-3.3.orig/lib/Support/PrettyStackTrace.cpp
|
||||
+++ llvm-3.3/lib/Support/PrettyStackTrace.cpp
|
||||
@@ -27,7 +27,7 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace llvm {
|
||||
- bool DisablePrettyStackTrace = false;
|
||||
+ bool DisablePrettyStackTrace = true;
|
||||
}
|
||||
|
||||
// FIXME: This should be thread local when llvm supports threads.
|
||||
Index: llvm-3.3/tools/clang/tools/driver/driver.cpp
|
||||
===================================================================
|
||||
--- llvm-3.3.orig/tools/clang/tools/driver/driver.cpp
|
||||
+++ llvm-3.3/tools/clang/tools/driver/driver.cpp
|
||||
@@ -341,6 +341,7 @@ static void ParseProgName(SmallVectorImp
|
||||
}
|
||||
|
||||
int main(int argc_, const char **argv_) {
|
||||
+ llvm::DisablePrettyStackTrace = false;
|
||||
llvm::sys::PrintStackTraceOnErrorSignal();
|
||||
llvm::PrettyStackTraceProgram X(argc_, argv_);
|
||||
|
@ -1,18 +0,0 @@
|
||||
Index: llvm-3.3/cmake/modules/HandleLLVMOptions.cmake
|
||||
===================================================================
|
||||
--- llvm-3.3.orig/cmake/modules/HandleLLVMOptions.cmake
|
||||
+++ llvm-3.3/cmake/modules/HandleLLVMOptions.cmake
|
||||
@@ -104,13 +104,6 @@ if( LLVM_ENABLE_PIC )
|
||||
# On Windows all code is PIC. MinGW warns if -fPIC is used.
|
||||
else()
|
||||
add_flag_or_print_warning("-fPIC")
|
||||
-
|
||||
- if( WIN32 OR CYGWIN)
|
||||
- # MinGW warns if -fvisibility-inlines-hidden is used.
|
||||
- else()
|
||||
- check_cxx_compiler_flag("-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
|
||||
- append_if(SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG "-fvisibility-inlines-hidden" CMAKE_CXX_FLAGS)
|
||||
- endif()
|
||||
endif()
|
||||
endif()
|
||||
|
109
llvm.changes
109
llvm.changes
@ -1,3 +1,112 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 24 13:15:48 UTC 2014 - idonmez@suse.com
|
||||
|
||||
- Remove non-existing doc subpackage
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 24 09:23:08 UTC 2014 - idonmez@suse.com
|
||||
|
||||
- Add a dependency on ncurses-devel since libLLVM now links to
|
||||
tinfo.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 14 13:57:57 UTC 2014 - idonmez@suse.com
|
||||
|
||||
- Add 32bit libclang bnc#857131
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 7 08:47:50 UTC 2014 - idonmez@suse.com
|
||||
|
||||
- Update to final llvm 3.4 release
|
||||
* See http://llvm.org/releases/3.4/docs/ReleaseNotes.html for
|
||||
complete changelog.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 24 13:47:24 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Update to final release candidate (r197980)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 21 18:20:20 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Update to r197866 from release_34 branch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 17 11:31:23 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Update to r197490 from release_34 branch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 12 10:43:42 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Update to r197142 from release_34 branch
|
||||
- Disable assertions again now that PPC64 backend is fixed
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 10 09:48:59 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Update to r196899 from release_34 branch
|
||||
- Remove compiler_rt-r196612.patch, merged upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 9 11:42:44 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Add compiler_rt-r196612.patch to fix ubsan failures on i586
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 9 08:54:48 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Update to r196762 from release_34 branch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 5 13:10:13 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Update to r196503 from release_34 branch to get compiler_rt fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 5 08:31:52 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Update to r196487 from release_34 branch to get compiler_rt fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 4 13:33:55 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Ship cmake files for llvm (needed for lldb and such)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 4 10:07:59 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Update to r196371 from release_34 branch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 4 03:27:29 UTC 2013 - termim@gmail.com
|
||||
|
||||
- install python binding to libclang
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 1 08:42:08 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Update to r196358 from llvm 3.4 branch
|
||||
- Add asan-disable-hugemalloctest.patch to disable
|
||||
ASAN HugeMallocTest, it requires 4.1+ GB of RAM.
|
||||
- Refresh patches
|
||||
* aarch64-suse-support.patch
|
||||
* arm_suse_support.diff
|
||||
* assume-opensuse.patch
|
||||
* default-to-i586.patch
|
||||
- Drop upstream patches
|
||||
* llvm-disable-pretty-stack-trace.patch
|
||||
* r189852.diff
|
||||
* unreachable-code.patch
|
||||
* llvm-no-visibility.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 22 20:57:00 UTC 2013 - dmueller@suse.com
|
||||
|
||||
- add r189852.diff: Remove vtables optimisation that breaks ARM
|
||||
and PowerPC
|
||||
- Disable testsuite on ARMv7, takes forever to run
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 17 10:23:32 UTC 2013 - schwab@suse.de
|
||||
|
||||
|
131
llvm.spec
131
llvm.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package llvm
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,31 +16,17 @@
|
||||
#
|
||||
|
||||
|
||||
%define _revision 183898
|
||||
%define _release_version 3.3
|
||||
%define _supported_archs "AArch64;ARM;PowerPC;X86"
|
||||
%define _experimental_archs "R600"
|
||||
|
||||
%ifarch %arm
|
||||
%define _supported_archs "ARM"
|
||||
%endif
|
||||
|
||||
%ifarch ppc64
|
||||
%define _supported_archs "PowerPC"
|
||||
%endif
|
||||
|
||||
%ifarch s390x
|
||||
%define _supported_archs "SystemZ"
|
||||
%endif
|
||||
%define _revision 198681
|
||||
%define _release_version 3.4
|
||||
|
||||
Name: llvm
|
||||
Version: 3.3
|
||||
Version: 3.4
|
||||
Release: 0
|
||||
Summary: Low Level Virtual Machine
|
||||
License: NCSA
|
||||
Group: Development/Languages/Other
|
||||
Url: http://www.llvm.org
|
||||
Source0: %{name}-%{_release_version}.tar.bz2
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Source100: %{name}-rpmlintrc
|
||||
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
|
||||
Patch1: set-revision.patch
|
||||
@ -53,22 +39,16 @@ Patch4: default-to-i586.patch
|
||||
Patch5: llvm-config-lib64.patch
|
||||
# PATCH-FIX-OPENSUSE arm_suse_support.diff --Enable ARM suse toolchain support
|
||||
Patch6: arm_suse_support.diff
|
||||
# PATCH-FIX-OPENSUSE unreachable-code.patch -- Unreachable code warning triggered on SLE
|
||||
Patch7: unreachable-code.patch
|
||||
Patch8: cmake-host-triple.patch
|
||||
Patch7: cmake-host-triple.patch
|
||||
# PATCH-FIX-OPENSUSE aarch64-suse-support.patch -- Enable AArch64 suse toolchain support
|
||||
Patch9: aarch64-suse-support.patch
|
||||
# PATCH-FIX-OPENSUSE llvm-no-visibility.patch -- Disable visibility
|
||||
Patch10: llvm-no-visibility.patch
|
||||
# PATCH-FIX-OPENSUSE llvm-disable-pretty-stack-trace.patch -- https://bugs.freedesktop.org/show_bug.cgi?id=60929
|
||||
Patch11: llvm-disable-pretty-stack-trace.patch
|
||||
Patch12: arm-remove-xfails.diff
|
||||
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
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
|
||||
BuildRequires: cmake
|
||||
|
||||
%if 0%{?suse_version} >= 1220
|
||||
BuildRequires: binutils-devel >= 2.21.90
|
||||
%endif
|
||||
@ -80,6 +60,7 @@ BuildRequires: gcc-c++
|
||||
BuildRequires: groff
|
||||
BuildRequires: libffi-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: python-base
|
||||
Requires: libLLVM = %{version}-%{release}
|
||||
# llvm does not work on ppc, only ppc64
|
||||
@ -106,21 +87,12 @@ Group: Development/Languages/Other
|
||||
Requires: %{name} = %{version}
|
||||
Requires: libffi-devel
|
||||
Requires: libstdc++-devel >= 3.4
|
||||
Obsoletes: llvm-doc < %{version}
|
||||
Provides: llvm-doc = %{version}
|
||||
Requires: ncurses-devel
|
||||
|
||||
%description devel
|
||||
This package contains library and header files needed to develop
|
||||
new native programs that use the LLVM infrastructure.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for LLVM
|
||||
Group: Documentation/HTML
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description doc
|
||||
Documentation for the LLVM compiler infrastructure.
|
||||
|
||||
%package clang
|
||||
Summary: CLANG frontend for LLVM
|
||||
Group: Development/Languages/Other
|
||||
@ -158,8 +130,17 @@ Requires: vim
|
||||
%description vim-plugins
|
||||
This package contains vim plugins for LLVM like syntax highlighting.
|
||||
|
||||
%package -n python-clang
|
||||
Summary: Python bindings for libclang
|
||||
Group: Development/Languages/Python
|
||||
Requires: libclang = %{version}
|
||||
Requires: python
|
||||
|
||||
%description -n python-clang
|
||||
This package contains the Python bindings to clang (C language) frontend for LLVM.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{_release_version}
|
||||
%setup -q -n %{name}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
@ -170,18 +151,14 @@ This package contains vim plugins for LLVM like syntax highlighting.
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%ifarch s390 s390x
|
||||
%patch9
|
||||
%patch10 -p1
|
||||
%endif
|
||||
%patch11 -p1
|
||||
%patch12
|
||||
|
||||
# We hardcode i586
|
||||
rm tools/clang/test/Driver/x86_features.c
|
||||
|
||||
# lib64 related problems on 64bit
|
||||
%if "%{_lib}" == "lib64"
|
||||
# lib64 related problems on 64bit
|
||||
rm tools/clang/test/Driver/linux-ld.c
|
||||
%endif
|
||||
|
||||
@ -190,13 +167,14 @@ sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
|
||||
|
||||
%if "%{_lib}" == "lib64"
|
||||
# Nasty hardcoded path
|
||||
sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp \
|
||||
tools/clang/test/Preprocessor/iwithprefix.c
|
||||
sed -i s,"/lib/","/lib64/",g tools/clang/lib/Driver/Tools.cpp \
|
||||
tools/clang/test/Driver/dyld-prefix.c
|
||||
sed -i s,"}lib{","}lib64{",g tools/clang/test/Preprocessor/iwithprefix.c
|
||||
%endif
|
||||
|
||||
# Only enable target archs otherwise llvm-config is messed up
|
||||
%ifnarch %arm ppc64 s390x
|
||||
sed -i s,"subdirectories = .*","subdirectories = AArch64 ARM PowerPC R600 X86", lib/Target/LLVMBuild.txt
|
||||
%ifarch %{ix86} x86_64
|
||||
sed -i s,"subdirectories = .*","subdirectories = R600 X86", lib/Target/LLVMBuild.txt
|
||||
%endif
|
||||
|
||||
%ifarch %arm
|
||||
@ -243,13 +221,14 @@ rm -rf ../projects/compiler-rt
|
||||
%ifarch s390x
|
||||
%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" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
-DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
|
||||
-DLLVM_TARGETS_TO_BUILD=host \
|
||||
-DCMAKE_C_FLAGS="-O0" \
|
||||
-DCMAKE_CXX_FLAGS="-O0" \
|
||||
-DLLVM_HOST_TRIPLE=%{host_triple} \
|
||||
@ -293,17 +272,18 @@ cmake -G "Unix Makefiles" \
|
||||
%if 0%{?suse_version} >= 1220
|
||||
-DLLVM_BINUTILS_INCDIR=/usr/include \
|
||||
%endif
|
||||
-DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
|
||||
%ifnarch %arm ppc64 s390x
|
||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{_experimental_archs} \
|
||||
%ifarch %{ix86} x86_64
|
||||
-DLLVM_TARGETS_TO_BUILD="host;R600" \
|
||||
%else
|
||||
-DLLVM_TARGETS_TO_BUILD=host \
|
||||
%endif
|
||||
-DLLVM_BUILD_TESTS=OFF \
|
||||
..
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
|
||||
%check
|
||||
cd stage2
|
||||
%ifnarch armv7hl armv7l
|
||||
%if 0%{!?qemu_user_space_build:1}
|
||||
# we just do not have enough memory with qemu emulation
|
||||
|
||||
@ -311,20 +291,10 @@ cd stage2
|
||||
ln -s lib lib64
|
||||
%endif
|
||||
|
||||
# Due to http://llvm.org/bugs/show_bug.cgi?id=15242
|
||||
for i in crash-narrowfunctiontest metadata remove_arguments_test; do
|
||||
rm ../test/BugPoint/$i.ll;
|
||||
done
|
||||
|
||||
%ifarch s390 s390x
|
||||
for i in TestClassDecl.m TestClassForwardDecl.m c-index-getCursor-test.m; do
|
||||
rm ../tools/clang/test/Index/$i;
|
||||
done
|
||||
%endif
|
||||
|
||||
make check
|
||||
make clang-test
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%install
|
||||
cd stage2
|
||||
@ -369,6 +339,16 @@ for file in scan-view/Resources/*; do
|
||||
install -m 644 $file %{buildroot}%{py_sitedir}/Resources/
|
||||
done
|
||||
popd
|
||||
|
||||
# install python bindings
|
||||
install -d %{buildroot}%{py_sitedir}/clang
|
||||
pushd tools/clang/bindings/python
|
||||
cp clang/*.py %{buildroot}%{py_sitedir}/clang
|
||||
install -d %{buildroot}%{_docdir}/python-clang/examples/cindex
|
||||
cp -r examples %{buildroot}%{_docdir}/python-clang
|
||||
install -d %{buildroot}%{_docdir}/python-clang/tests/cindex/INPUTS
|
||||
cp -r tests %{buildroot}%{_docdir}/python-clang
|
||||
popd
|
||||
pushd %{buildroot}%{_bindir}
|
||||
ln -s ccc-analyzer c++-analyzer
|
||||
popd
|
||||
@ -406,9 +386,6 @@ rm %{buildroot}%{_libdir}/LLVMHello.*
|
||||
rm %{buildroot}%{_libdir}/libgtest*
|
||||
rm %{buildroot}%{_mandir}/man1/lit.1
|
||||
|
||||
# Remove cmake files
|
||||
rm -rf %{buildroot}/usr/share/llvm/cmake
|
||||
|
||||
%fdupes -s %{buildroot}%{_docdir}/%{name}
|
||||
%fdupes -s %{buildroot}%{_docdir}/%{name}-doc
|
||||
|
||||
@ -426,6 +403,7 @@ rm -rf %{buildroot}/usr/share/llvm/cmake
|
||||
%{_bindir}/bugpoint
|
||||
%{_bindir}/llc
|
||||
%{_bindir}/lli
|
||||
%{_bindir}/lli-child-target
|
||||
%{_bindir}/macho-dump
|
||||
%exclude %{_bindir}/%{name}-config
|
||||
%{_bindir}/%{name}*
|
||||
@ -451,6 +429,7 @@ rm -rf %{buildroot}/usr/share/llvm/cmake
|
||||
%{_bindir}/clang-format
|
||||
%{_bindir}/ccc-analyzer
|
||||
%{_bindir}/c++-analyzer
|
||||
%{_bindir}/git-clang-format
|
||||
%{_bindir}/scan-build
|
||||
%{_bindir}/scan-view
|
||||
%{py_sitedir}/ScanView.py
|
||||
@ -460,7 +439,6 @@ rm -rf %{buildroot}/usr/share/llvm/cmake
|
||||
%{_datadir}/clang
|
||||
%{_mandir}/man1/clang.1%{ext_man}
|
||||
%{_libdir}/libLTO.*
|
||||
%{_libdir}/libprofile_rt.*
|
||||
%if 0%{?suse_version} >= 1220
|
||||
%{_libdir}/LLVMgold.so
|
||||
%{_libdir}/bfd-plugins/
|
||||
@ -492,6 +470,8 @@ rm -rf %{buildroot}/usr/share/llvm/cmake
|
||||
%doc %{_mandir}/man1/%{name}-config.1%{ext_man}
|
||||
%{_includedir}/%{name}/
|
||||
%{_includedir}/%{name}-c/
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/cmake/
|
||||
%doc %{_docdir}/%{name}
|
||||
|
||||
%files vim-plugins
|
||||
@ -499,4 +479,13 @@ rm -rf %{buildroot}/usr/share/llvm/cmake
|
||||
%doc utils/vim/README.vim
|
||||
%{_datadir}/vim/
|
||||
|
||||
%files -n python-clang
|
||||
%defattr(-,root,root)
|
||||
%{py_sitedir}/clang
|
||||
%{py_sitedir}/clang/__init__.py
|
||||
%{py_sitedir}/clang/cindex.py
|
||||
%{py_sitedir}/clang/enumerations.py
|
||||
|
||||
%doc %{_docdir}/python-clang
|
||||
|
||||
%changelog
|
||||
|
@ -1,13 +0,0 @@
|
||||
Index: llvm/utils/TableGen/CodeGenInstruction.cpp
|
||||
===================================================================
|
||||
--- llvm.orig/utils/TableGen/CodeGenInstruction.cpp
|
||||
+++ llvm/utils/TableGen/CodeGenInstruction.cpp
|
||||
@@ -191,7 +191,7 @@ CGIOperandList::ParseOperandName(const s
|
||||
return std::make_pair(OpIdx, i);
|
||||
|
||||
// Otherwise, didn't find it!
|
||||
- PrintFatalError(TheDef->getName() + ": unknown suboperand name in '" + Op + "'");
|
||||
+ llvm_unreachable(TheDef->getName() + ": unknown suboperand name in '" + Op + "'");
|
||||
}
|
||||
|
||||
static void ParseConstraint(const std::string &CStr, CGIOperandList &Ops) {
|
Loading…
x
Reference in New Issue
Block a user