[packages/llvm] - updated to 3.5.0 - updated config,pld patches - added polly-update,lldb patches to successfully bu
qboosh
qboosh at pld-linux.org
Sun Oct 5 10:01:00 CEST 2014
commit b883cf1e6b04005cc0163f8b0bb13a53a50602c4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Oct 5 10:01:11 2014 +0200
- updated to 3.5.0
- updated config,pld patches
- added polly-update,lldb patches to successfully build polly and lldb addons
llvm-config.patch | 112 ++++++++++++++++++++++++------------------------
llvm-lldb.patch | 11 +++++
llvm-pld.patch | 55 ++++++++++++++++++------
llvm-polly-update.patch | 41 ++++++++++++++++++
llvm.spec | 74 +++++++++++++++++++++-----------
5 files changed, 199 insertions(+), 94 deletions(-)
---
diff --git a/llvm.spec b/llvm.spec
index 50f40f2..8d90fb0 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -1,3 +1,4 @@
+# TODO: dragonegg, lld, openmp?
#
# Conditional build:
%bcond_without lldb # LLDB debugger
@@ -16,27 +17,29 @@
Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
Name: llvm
-Version: 3.4.2
+Version: 3.5.0
Release: 1
License: University of Illinois/NCSA Open Source License
Group: Development/Languages
#Source0Download: http://llvm.org/releases/download.html
-Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.gz
-# Source0-md5: a20669f75967440de949ac3b1bad439c
-Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.gz
-# Source1-md5: 87945973b7c73038871c5f849a818588
-Source2: http://llvm.org/releases/3.4/compiler-rt-3.4.src.tar.gz
-# Source2-md5: 7938353e3a3bda85733a165e7ac4bb84
-Source3: http://llvm.org/releases/3.4/lldb-3.4.src.tar.gz
-# Source3-md5: 7ed60a0463f9fdfa20db7109d4624cee
-Source4: http://llvm.org/releases/3.4/polly-3.4.src.tar.gz
-# Source4-md5: 5b2958c9076a584f710423bdca9e6d5d
-Source5: http://llvm.org/releases/3.4/clang-tools-extra-3.4.src.tar.gz
-# Source5-md5: fc25c6b90eaf8a9b0702940c7c57183c
+Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.xz
+# Source0-md5: d6987305a1a0e58e128c1374cd3b8fef
+Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
+# Source1-md5: 27718dd13c7df83e15f997116bbb4aef
+Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
+# Source2-md5: 02624d2a9144278c3808c00dbbab56c8
+Source3: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
+# Source3-md5: 9597d5376309805ac586adfbd1e992f4
+Source4: http://llvm.org/releases/%{version}/polly-%{version}.src.tar.xz
+# Source4-md5: 2ee0167c7ed7c85026cdb18ad6f4ade8
+Source5: http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.xz
+# Source5-md5: 6e2830316638ec0de9534b98361dfbec
Patch0: %{name}-config.patch
# Data files should be installed with timestamps preserved
Patch1: %{name}-2.6-timestamp.patch
Patch2: %{name}-pld.patch
+Patch3: %{name}-polly-update.patch
+Patch4: %{name}-lldb.patch
URL: http://llvm.org/
BuildRequires: autoconf >= 2.60
BuildRequires: automake >= 1:1.9.6
@@ -57,6 +60,8 @@ BuildRequires: perl-base >= 1:5.6
BuildRequires: perl-tools-pod
BuildRequires: rpm-pythonprov
%{?with_doc:BuildRequires: sphinx-pdg}
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
%if %{with apidocs}
BuildRequires: doxygen
BuildRequires: graphviz
@@ -66,14 +71,21 @@ BuildRequires: dejagnu
BuildRequires: python
BuildRequires: tcl-devel
%endif
+%if %{with lldb}
+BuildRequires: libedit-devel
+BuildRequires: libxml2-devel >= 2
+BuildRequires: ncurses-ext-devel
+BuildRequires: python-devel >= 2
+%endif
%if %{with polly}
BuildRequires: cloog-isl-devel
+# >= 0.18.2-2
BuildRequires: gmp-devel
-BuildRequires: isl-devel
+BuildRequires: isl-devel >= 0.13
+# optional
+BuildRequires: scoplib-devel >= 0.2.1-2
# optional
#BuildRequires: libpluto-devel
-#BuildRequires: openscop-devel
-#BuildRequires: scoplib-devel
#cuda-devel
%endif
Requires: %{name}-libs = %{version}-%{release}
@@ -361,14 +373,16 @@ Dokumentacja HTML wiązania OCamla do LLVM-a.
%prep
%setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5
mv cfe-%{version}.src tools/clang
-%{?with_rt:mv compiler-rt-3.4 projects/compiler-rt}
-%{?with_lldb:mv lldb-3.4 tools/lldb}
-%{?with_polly:mv polly-3.4 tools/polly}
-mv clang-tools-extra-3.4 tools/clang/tools/extra
+%{?with_rt:mv compiler-rt-%{version}.src projects/compiler-rt}
+%{?with_lldb:mv lldb-%{version}.src tools/lldb}
+%{?with_polly:mv polly-%{version}.src tools/polly}
+mv clang-tools-extra-%{version}.src tools/clang/tools/extra
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
+%patch4 -p1
# configure does not properly specify libdir
%{__sed} -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}|g' Makefile.config.in
@@ -453,8 +467,8 @@ done
%if %{with doc}
install -d $RPM_BUILD_ROOT%{_mandir}/man1
cp -p docs/_build/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
-# these tools are not installed (llvm-prof has been removed before LLVM 3.4)
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build,llvm-prof}.1
+# these tools are not installed
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
# make links
echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
%endif
@@ -481,6 +495,8 @@ done
# Get rid of erroneously installed example files.
%{__rm} -v $RPM_BUILD_ROOT%{_libdir}/*LLVMHello.*
+# parts of test suite
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/{FileCheck,count,not}
# remove documentation makefiles:
# they require the build directory to work
@@ -520,6 +536,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/llvm-mcmarkup
%attr(755,root,root) %{_bindir}/llvm-nm
%attr(755,root,root) %{_bindir}/llvm-objdump
+%attr(755,root,root) %{_bindir}/llvm-profdata
%attr(755,root,root) %{_bindir}/llvm-ranlib
%attr(755,root,root) %{_bindir}/llvm-readobj
%attr(755,root,root) %{_bindir}/llvm-rtdyld
@@ -540,9 +557,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/llvm-cov.1*
%{_mandir}/man1/llvm-diff.1*
%{_mandir}/man1/llvm-dis.1*
+%{_mandir}/man1/llvm-dwarfdump.1*
%{_mandir}/man1/llvm-extract.1*
%{_mandir}/man1/llvm-link.1*
%{_mandir}/man1/llvm-nm.1*
+%{_mandir}/man1/llvm-profdata.1*
%{_mandir}/man1/llvm-ranlib.1*
%{_mandir}/man1/llvm-readobj.1*
%{_mandir}/man1/llvm-stress.1*
@@ -554,7 +573,7 @@ rm -rf $RPM_BUILD_ROOT
%files libs
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
-%attr(755,root,root) %{_libdir}/libLLVM-3.4.so
+%attr(755,root,root) %{_libdir}/libLLVM-3.5.so
%files devel
%defattr(644,root,root,755)
@@ -567,6 +586,8 @@ rm -rf $RPM_BUILD_ROOT
%endif
%{_includedir}/llvm
%{_includedir}/llvm-c
+%dir %{_datadir}/llvm
+%{_datadir}/llvm/cmake
%if %{with doc}
%{_mandir}/man1/llvm-config.1*
%endif
@@ -589,7 +610,6 @@ rm -rf $RPM_BUILD_ROOT
%files polly-devel
%defattr(644,root,root,755)
-%{_libdir}/libpolly*.a
%{_includedir}/polly
%endif
@@ -650,6 +670,7 @@ rm -rf $RPM_BUILD_ROOT
%doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt,docs/_build/html/{*.html,*.js,_static}}
%attr(755,root,root) %{_bindir}/clang-apply-replacements
%attr(755,root,root) %{_bindir}/clang-modernize
+%attr(755,root,root) %{_bindir}/clang-query
%attr(755,root,root) %{_bindir}/clang-tidy
%attr(755,root,root) %{_bindir}/pp-trace
%{_libdir}/libmodernizeCore.a
@@ -658,8 +679,13 @@ rm -rf $RPM_BUILD_ROOT
%files -n lldb
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/lldb
+%attr(755,root,root) %{_bindir}/lldb-gdbserver
+%attr(755,root,root) %{_bindir}/lldb-mi
%attr(755,root,root) %{_bindir}/lldb-platform
%attr(755,root,root) %{_libdir}/liblldb.so
+%dir %{py_sitedir}/lldb
+%attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
+%attr(755,root,root) %{py_sitedir}/readline.so
%files -n lldb-devel
%defattr(644,root,root,755)
diff --git a/llvm-config.patch b/llvm-config.patch
index eaa311c..d59109c 100644
--- a/llvm-config.patch
+++ b/llvm-config.patch
@@ -1,6 +1,6 @@
---- llvm-3.1.src/tools/llvm-config/llvm-config.cpp.orig 2012-05-16 00:06:08.000000000 +0200
-+++ llvm-3.1.src/tools/llvm-config/llvm-config.cpp 2012-10-12 17:44:41.041037043 +0200
-@@ -234,11 +234,11 @@
+--- llvm-3.5.0.src/tools/llvm-config/llvm-config.cpp.orig 2014-03-29 02:08:53.000000000 +0100
++++ llvm-3.5.0.src/tools/llvm-config/llvm-config.cpp 2014-10-01 20:43:44.679547719 +0200
+@@ -247,12 +247,12 @@
break;
case CMakeStyle:
ActiveBinDir = ActiveObjRoot + "/bin";
@@ -8,13 +8,14 @@
+ ActiveLibDir = LLVM_LIBDIR;
break;
case CMakeBuildModeStyle:
- ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE;
-- ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE;
-+ ActiveLibDir = LLVM_LIBDIR "/" LLVM_BUILDMODE;
+ ActivePrefix = ActiveObjRoot;
+ ActiveBinDir = ActiveObjRoot + "/bin/" + build_mode;
+- ActiveLibDir = ActiveObjRoot + "/lib/" + build_mode;
++ ActiveLibDir = std::string(LLVM_LIBDIR "/") + build_mode;
break;
}
-@@ -249,7 +249,7 @@
+@@ -263,7 +263,7 @@
ActivePrefix = CurrentExecPrefix;
ActiveIncludeDir = ActivePrefix + "/include";
ActiveBinDir = ActivePrefix + "/bin";
@@ -54,59 +55,53 @@
AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
[Time at which LLVM was configured])
AC_DEFINE_UNQUOTED(LLVM_HOST_TRIPLE, "$host",
---- llvm-3.4.1.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2014-05-21 18:42:38.311372419 +0200
-+++ llvm-3.4.1.src/tools/clang/lib/Driver/ToolChains.cpp 2014-05-22 21:00:55.159398641 +0200
-@@ -2358,19 +2358,6 @@ static StringRef getMultilibDir(const ll
+--- llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2014-08-27 22:07:31.000000000 +0200
++++ llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp 2014-10-01 20:56:40.312848502 +0200
+@@ -2999,19 +2999,6 @@
return Triple.isArch32Bit() ? "lib" : "lib64";
}
-- // It happens that only x86 and PPC use the 'lib32' variant of multilib, and
+- // It happens that only x86 and PPC use the 'lib32' variant of oslibdir, and
- // using that variant while targeting other architectures causes problems
- // because the libraries are laid out in shared system roots that can't cope
-- // with a 'lib32' multilib search path being considered. So we only enable
+- // with a 'lib32' library search path being considered. So we only enable
- // them when we know we may need it.
- //
- // FIXME: This is a bit of a hack. We should really unify this code for
-- // reasoning about multilib spellings with the lib dir spellings in the
+- // reasoning about oslibdir spellings with the lib dir spellings in the
- // GCCInstallationDetector, but that is a more significant refactoring.
- if (Triple.getArch() == llvm::Triple::x86 ||
- Triple.getArch() == llvm::Triple::ppc)
- return "lib32";
-
- return Triple.isArch32Bit() ? "lib" : "lib64";
- }
-
-@@ -2504,14 +2491,14 @@ Linux::Linux(const Driver &D, const llvm
- }
- }
- addPathIfExists(SysRoot + "/lib/" + MultiarchTriple, Paths);
-- addPathIfExists(SysRoot + "/lib/../" + Multilib, Paths);
-+ addPathIfExists(SysRoot + "/" + Multilib, Paths);
- addPathIfExists(SysRoot + "/usr/lib/" + MultiarchTriple, Paths);
-- addPathIfExists(SysRoot + "/usr/lib/../" + Multilib, Paths);
-+ addPathIfExists(SysRoot + "/usr/" + Multilib, Paths);
-
+ if (Triple.getArch() == llvm::Triple::x86_64 &&
+ Triple.getEnvironment() == llvm::Triple::GNUX32)
+ return "libx32";
+@@ -3160,7 +3147,7 @@
// Try walking via the GCC triple path in case of biarch or multiarch GCC
// installations with strange symlinks.
if (GCCInstallation.isValid()) {
- addPathIfExists(SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() +
-+ addPathIfExists(SysRoot + "/usr/" + Multilib + "/" + GCCInstallation.getTriple().str() +
- "/../../" + Multilib, Paths);
++ addPathIfExists(SysRoot + "/usr/" + OSLibDir + "/" + GCCInstallation.getTriple().str() +
+ "/../../" + OSLibDir, Paths);
+
+ // Add the 'other' biarch variant path
+@@ -3190,10 +3177,10 @@
+ // FIXME: It's not clear whether we should use the driver's installed
+ // directory ('Dir' below) or the ResourceDir.
+ if (StringRef(D.Dir).startswith(SysRoot))
+- addPathIfExists(D.Dir + "/../lib", Paths);
++ addPathIfExists(D.Dir + "/../" + OSLibDir, Paths);
- // Add the non-multilib suffixed paths (if potentially different).
-@@ -2531,8 +2518,8 @@ Linux::Linux(const Driver &D, const llvm
- if (StringRef(LibPath).startswith(SysRoot))
- addPathIfExists(LibPath, Paths);
- }
- addPathIfExists(SysRoot + "/lib", Paths);
- addPathIfExists(SysRoot + "/usr/lib", Paths);
-+ addPathIfExists(SysRoot + "/" + Multilib, Paths);
-+ addPathIfExists(SysRoot + "/usr/" + Multilib, Paths);
++ addPathIfExists(SysRoot + "/" + OSLibDir, Paths);
++ addPathIfExists(SysRoot + "/usr/" + OSLibDir, Paths);
}
- bool FreeBSD::HasNativeLLVMSupport() const {
---- llvm-3.2.src/tools/clang/lib/Driver/Tools.cpp.orig 2012-11-21 08:56:23.000000000 +0100
-+++ llvm-3.2.src/tools/clang/lib/Driver/Tools.cpp 2013-01-26 18:43:56.952167604 +0100
+ bool Linux::HasNativeLLVMSupport() const {
+--- llvm-3.5.0.src/tools/clang/lib/Driver/Tools.cpp.orig 2014-08-07 06:51:51.000000000 +0200
++++ llvm-3.5.0.src/tools/clang/lib/Driver/Tools.cpp 2014-10-01 21:04:32.002828710 +0200
@@ -26,6 +26,7 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
@@ -115,16 +110,30 @@
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
-@@ -218,7 +218,7 @@ static void addProfileRT(const ToolChain
- // libprofile_rt.so. We used to use the -l:libprofile_rt.a syntax, but that is
- // not supported by old linkers.
- std::string ProfileRT =
-- std::string(TC.getDriver().Dir) + "/../lib/libprofile_rt.a";
-+ LLVM_LIBDIR "/libprofile_rt.a";
+@@ -1425,7 +1426,7 @@
+ // as gold requires -plugin to come before any -plugin-opt that -Wl might
+ // forward.
+ CmdArgs.push_back("-plugin");
+- std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so";
++ std::string Plugin = LLVM_LIBDIR "/LLVMgold.so";
+ CmdArgs.push_back(Args.MakeArgString(Plugin));
+
+ // Try to pass driver level flags relevant to LTO code generation down to
+@@ -2037,12 +2038,7 @@
- CmdArgs.push_back(Args.MakeArgString(ProfileRT));
+ static SmallString<128> getCompilerRTLibDir(const ToolChain &TC) {
+ // The runtimes are located in the OS-specific resource directory.
+- SmallString<128> Res(TC.getDriver().ResourceDir);
+- const llvm::Triple &Triple = TC.getTriple();
+- // TC.getOS() yield "freebsd10.0" whereas "freebsd" is expected.
+- StringRef OSLibName = (Triple.getOS() == llvm::Triple::FreeBSD) ?
+- "freebsd" : TC.getOS();
+- llvm::sys::path::append(Res, "lib", OSLibName);
++ SmallString<128> Res(LLVM_LIBDIR);
+ return Res;
}
-@@ -4881,9 +4881,9 @@ void solaris::Link::ConstructJob(Compila
+
+@@ -5899,9 +5895,9 @@
const ArgList &Args,
const char *LinkingOutput) const {
// FIXME: Find a real GCC, don't hard-code versions here
@@ -135,13 +144,4 @@
+ std::string LibPath = LLVM_LIBDIR "/";
llvm::Triple::ArchType Arch = T.getArch();
switch (Arch) {
- case llvm::Triple::x86:
-@@ -6049,7 +6049,7 @@ void linuxtools::Link::ConstructJob(Comp
- // forward.
- if (D.IsUsingLTO(Args) || Args.hasArg(options::OPT_use_gold_plugin)) {
- CmdArgs.push_back("-plugin");
-- std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so";
-+ std::string Plugin = LLVM_LIBDIR "/LLVMgold.so";
- CmdArgs.push_back(Args.MakeArgString(Plugin));
- }
-
+ case llvm::Triple::x86:
diff --git a/llvm-lldb.patch b/llvm-lldb.patch
new file mode 100644
index 0000000..aa970cf
--- /dev/null
+++ b/llvm-lldb.patch
@@ -0,0 +1,11 @@
+--- llvm-3.5.0.src/tools/lldb/Makefile.orig 2014-03-12 11:35:00.000000000 +0100
++++ llvm-3.5.0.src/tools/lldb/Makefile 2014-10-04 08:18:52.270545688 +0200
+@@ -41,6 +41,8 @@
+ # Disable python and curses on mingw build
+ ifeq ($(HOST_OS),MingW)
+ CXXFLAGS += -DLLDB_DISABLE_PYTHON -DLLDB_DISABLE_CURSES
++else
++CPP.Flags += -I/usr/include/ncurses
+ endif
+
+ ifeq (,$(findstring -DLLDB_DISABLE_PYTHON,$(CXXFLAGS)))
diff --git a/llvm-pld.patch b/llvm-pld.patch
index 1b8418b..0d00ac7 100644
--- a/llvm-pld.patch
+++ b/llvm-pld.patch
@@ -1,21 +1,48 @@
---- llvm-3.4.1.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2014-05-22 21:48:10.216006217 +0200
-+++ llvm-3.4.1.src/tools/clang/lib/Driver/ToolChains.cpp 2014-05-23 17:11:10.551218440 +0200
-@@ -1122,12 +1122,14 @@
+--- llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2014-10-01 21:07:02.242822402 +0200
++++ llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp 2014-10-01 21:29:07.449433463 +0200
+@@ -1333,6 +1333,7 @@
static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
static const char *const X86_64Triples[] = {
+ "x86_64-pld-linux", "amd64-pld-linux",
"x86_64-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-pc-linux-gnu",
"x86_64-redhat-linux6E", "x86_64-redhat-linux", "x86_64-suse-linux",
- "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux"
- };
+ "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux",
+@@ -1341,6 +1342,7 @@
+ static const char *const X32LibDirs[] = { "/libx32" };
static const char *const X86LibDirs[] = { "/lib32", "/lib" };
static const char *const X86Triples[] = {
-+ "i686-pld-linux", "i586-pld-linux", "i485-pld-linux", "i386-pld-linux", "athlon-pld-linux",
++ "i686-pld-linux", "i586-pld-linux", "i486-pld-linux", "i386-pld-linux", "athlon-pld-linux",
"i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu", "i386-linux-gnu",
"i386-redhat-linux6E", "i686-redhat-linux", "i586-redhat-linux",
"i386-redhat-linux", "i586-suse-linux", "i486-slackware-linux",
-@@ -2167,6 +2169,7 @@
+@@ -1370,6 +1372,7 @@
+
+ static const char *const PPCLibDirs[] = { "/lib32", "/lib" };
+ static const char *const PPCTriples[] = {
++ "powerpc-pld-linux",
+ "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",
+ "powerpc-suse-linux", "powerpc-montavista-linuxspe"
+ };
+@@ -1385,14 +1388,14 @@
+ "ppc64le-redhat-linux" };
+
+ static const char *const SPARCv8LibDirs[] = { "/lib32", "/lib" };
+- static const char *const SPARCv8Triples[] = { "sparc-linux-gnu",
++ static const char *const SPARCv8Triples[] = { "sparc-pld-linux", "sparc-linux-gnu",
+ "sparcv8-linux-gnu" };
+ static const char *const SPARCv9LibDirs[] = { "/lib64", "/lib" };
+- static const char *const SPARCv9Triples[] = { "sparc64-linux-gnu",
++ static const char *const SPARCv9Triples[] = { "sparc64-pld-linux", "sparc64-linux-gnu",
+ "sparcv9-linux-gnu" };
+
+ static const char *const SystemZLibDirs[] = { "/lib64", "/lib" };
+- static const char *const SystemZTriples[] = {
++ static const char *const SystemZTriples[] = { "s390x-pld-linux",
+ "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu",
+ "s390x-suse-linux", "s390x-redhat-linux"
+ };
+@@ -2778,6 +2781,7 @@
enum Distro {
ArchLinux,
@@ -23,7 +50,7 @@
DebianLenny,
DebianSqueeze,
DebianWheezy,
-@@ -2209,6 +2212,10 @@
+@@ -2820,6 +2824,10 @@
return Distro >= UbuntuHardy && Distro <= UbuntuTrusty;
}
@@ -32,9 +59,9 @@
+}
+
static Distro DetectDistro(llvm::Triple::ArchType Arch) {
- OwningPtr<llvm::MemoryBuffer> File;
- if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) {
-@@ -2276,6 +2283,9 @@
+ llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
+ llvm::MemoryBuffer::getFile("/etc/lsb-release");
+@@ -2888,6 +2896,9 @@
if (llvm::sys::fs::exists("/etc/arch-release"))
return ArchLinux;
@@ -44,7 +71,7 @@
return UnknownDistro;
}
-@@ -2382,7 +2392,7 @@
+@@ -3029,7 +3040,7 @@
Distro Distro = DetectDistro(Arch);
@@ -53,7 +80,7 @@
ExtraOpts.push_back("-z");
ExtraOpts.push_back("relro");
}
-@@ -2402,7 +2412,7 @@
+@@ -3049,7 +3060,7 @@
// ABI requires a mapping between the GOT and the symbol table.
// Android loader does not support .gnu.hash.
if (!IsMips && !IsAndroid) {
@@ -62,7 +89,7 @@
(IsUbuntu(Distro) && Distro >= UbuntuMaverick))
ExtraOpts.push_back("--hash-style=gnu");
-@@ -2411,11 +2421,11 @@
+@@ -3058,11 +3069,11 @@
ExtraOpts.push_back("--hash-style=both");
}
diff --git a/llvm-polly-update.patch b/llvm-polly-update.patch
new file mode 100644
index 0000000..aaa6f41
--- /dev/null
+++ b/llvm-polly-update.patch
@@ -0,0 +1,41 @@
+--- llvm-3.5.0.src/tools/polly/lib/Transform/Pocc.cpp.orig 2014-06-28 10:59:45.000000000 +0200
++++ llvm-3.5.0.src/tools/polly/lib/Transform/Pocc.cpp 2014-10-03 22:56:19.591962149 +0200
+@@ -238,8 +238,6 @@
+ }
+
+ void Pocc::printScop(raw_ostream &OS) const {
+- std::unique_ptr<MemoryBuffer> stdoutBuffer;
+- std::unique_ptr<MemoryBuffer> stderrBuffer;
+
+ OS << "Command line: ";
+
+@@ -249,20 +247,20 @@
+
+ OS << "\n";
+
+- if (std::error_code ec =
+- MemoryBuffer::getFile(PlutoStdout.str(), stdoutBuffer))
+- OS << "Could not open pocc stdout file: " + ec.message() << "\n";
++ ErrorOr<std::unique_ptr<MemoryBuffer>> stdoutResult = MemoryBuffer::getFile(PlutoStdout.str());
++ if (!stdoutResult)
++ OS << "Could not open pocc stdout file: " + stdoutResult.getError().message() << "\n";
+ else {
+- OS << "pocc stdout: " << stdoutBuffer->getBufferIdentifier() << "\n";
+- OS << stdoutBuffer->getBuffer() << "\n";
++ OS << "pocc stdout: " << stdoutResult.get()->getBufferIdentifier() << "\n";
++ OS << stdoutResult.get()->getBuffer() << "\n";
+ }
+
+- if (std::error_code ec =
+- MemoryBuffer::getFile(PlutoStderr.str(), stderrBuffer))
+- OS << "Could not open pocc stderr file: " + ec.message() << "\n";
++ ErrorOr<std::unique_ptr<MemoryBuffer>> stderrResult = MemoryBuffer::getFile(PlutoStderr.str());
++ if (!stderrResult)
++ OS << "Could not open pocc stderr file: " + stderrResult.getError().message() << "\n";
+ else {
+ OS << "pocc stderr: " << PlutoStderr << "\n";
+- OS << stderrBuffer->getBuffer() << "\n";
++ OS << stderrResult.get()->getBuffer() << "\n";
+ }
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/llvm.git/commitdiff/b883cf1e6b04005cc0163f8b0bb13a53a50602c4
More information about the pld-cvs-commit
mailing list