---- llvm-3.0./tools/clang/lib/Driver/ToolChains.cpp.orig 2012-02-09 11:41:41.000000000 +0100
-+++ llvm-3.0./tools/clang/lib/Driver/ToolChains.cpp 2012-02-09 12:25:54.844008378 +0100
-@@ -1190,6 +1190,7 @@
+--- llvm-3.2.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2012-12-16 16:59:27.000000000 +0100
++++ llvm-3.2.src/tools/clang/lib/Driver/ToolChains.cpp 2013-01-24 12:42:19.582377854 +0100
+@@ -1062,6 +1062,7 @@
static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
static const char *const X86_64Triples[] = {
"x86_64-linux-gnu",
"x86_64-unknown-linux-gnu",
"x86_64-pc-linux-gnu",
-@@ -1202,6 +1203,8 @@
+@@ -1074,6 +1075,9 @@
};
static const char *const X86LibDirs[] = { "/lib32", "/lib" };
static const char *const X86Triples[] = {
+ "i686-pld-linux",
++ "i586-pld-linux",
+ "i486-pld-linux",
"i686-linux-gnu",
"i686-pc-linux-gnu",
"i486-linux-gnu",
-@@ -1815,6 +1818,7 @@
+@@ -1830,6 +1834,7 @@
enum LinuxDistro {
ArchLinux,
DebianLenny,
DebianSqueeze,
DebianWheezy,
-@@ -1860,6 +1864,10 @@
- return Distro >= UbuntuHardy && Distro <= UbuntuPrecise;
+@@ -1877,6 +1882,10 @@
+ return Distro >= UbuntuHardy && Distro <= UbuntuRaring;
}
+static bool IsPLD(enum LinuxDistro Distro) {
static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
OwningPtr<llvm::MemoryBuffer> File;
if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) {
-@@ -1936,6 +1944,9 @@
+@@ -1955,6 +1964,9 @@
if (!llvm::sys::fs::exists("/etc/arch-release", Exists) && Exists)
return ArchLinux;
return UnknownDistro;
}
-@@ -2003,7 +2014,7 @@
+@@ -2072,7 +2084,7 @@
LinuxDistro Distro = DetectLinuxDistro(Arch);
ExtraOpts.push_back("-z");
ExtraOpts.push_back("relro");
}
-@@ -2024,7 +2035,7 @@
+@@ -2088,7 +2100,7 @@
// ABI requires a mapping between the GOT and the symbol table.
// Android loader does not support .gnu.hash.
- if (!IsMips && !IsAndroid) {
+ if (!isMipsArch(Arch) && !IsAndroid) {
- if (IsRedhat(Distro) || IsOpenSuse(Distro) ||
+ if (IsRedhat(Distro) || IsOpenSuse(Distro) || IsPLD(Distro) ||
(IsUbuntu(Distro) && Distro >= UbuntuMaverick))
ExtraOpts.push_back("--hash-style=gnu");
-@@ -2033,11 +2044,11 @@
+@@ -2097,11 +2109,11 @@
ExtraOpts.push_back("--hash-style=both");
}
# Conditional build:
%bcond_without ocaml # ocaml binding
%bcond_with apidocs # The doxygen docs are HUGE, so they are not built by default.
+%bcond_without man # man pages
%bcond_with tests # run tests
%ifarch s390 s390x sparc64
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.1
-Release: 4
+Version: 3.2
+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: 16eaa7679f84113f65b12760fdfe4ee1
+# Source0-md5: 71610289bbc819e3e15fdd562809a2d7
Source1: http://llvm.org/releases/%{version}/clang-%{version}.src.tar.gz
-# Source1-md5: 59bf2d3120a3805f27cafda3823caaf8
+# Source1-md5: 3896ef4334df08563b05d0848ba80582
Patch0: %{name}-config.patch
# Data files should be installed with timestamps preserved
Patch1: %{name}-2.6-timestamp.patch
BuildRequires: bash
BuildRequires: bison
BuildRequires: flex
-%if %{with apidocs}
-BuildRequires: doxygen
-BuildRequires: graphviz
-%endif
-%if %{with tests}
-BuildRequires: dejagnu
-BuildRequires: python
-BuildRequires: tcl-devel
+BuildRequires: gcc >= 5:3.4
+# gcc4 might be installed, but not current __cc
+%if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
+BuildRequires: __cc >= 3.4
%endif
BuildRequires: groff
BuildRequires: libltdl-devel
BuildRequires: perl-base >= 1:5.6
BuildRequires: perl-tools-pod
BuildRequires: rpm-pythonprov
-# gcc4 might be installed, but not current __cc
-%if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
-BuildRequires: __cc >= 3.4
+%{?with_man:BuildRequires: sphinx-pdg}
+%if %{with apidocs}
+BuildRequires: doxygen
+BuildRequires: graphviz
+%endif
+%if %{with tests}
+BuildRequires: dejagnu
+BuildRequires: python
+BuildRequires: tcl-devel
%endif
# LLVM is not supported on PPC64
# http://llvm.org/bugs/show_bug.cgi?id=3729
%{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
%endif
+cd ..
+
+%if %{with man}
+%{__make} -C docs -f Makefile.sphinx man
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
%{__make} -C obj -j1 install \
ln -s %{_libdir}/clang-analyzer/$f/$f $RPM_BUILD_ROOT%{_bindir}/$f
cp -pr tools/clang/tools/$f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
done
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-build/scan-build.1 $RPM_BUILD_ROOT%{_mandir}/man1
%py_comp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view
%py_ocomp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view
%py_postclean %{_libdir}/clang-analyzer/scan-view
+%if %{with man}
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+cp -p docs/_build/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
+# these tools are not installed
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
+%endif
+
# Move documentation back to build directory
rm -rf moredocs
mv $RPM_BUILD_ROOT/moredocs .
%attr(755,root,root) %{_bindir}/llvm-dis
%attr(755,root,root) %{_bindir}/llvm-dwarfdump
%attr(755,root,root) %{_bindir}/llvm-extract
-%attr(755,root,root) %{_bindir}/llvm-ld
%attr(755,root,root) %{_bindir}/llvm-link
%attr(755,root,root) %{_bindir}/llvm-mc
+%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-prof
%attr(755,root,root) %{_bindir}/llvm-rtdyld
%attr(755,root,root) %{_bindir}/llvm-size
%attr(755,root,root) %{_bindir}/llvm-stress
-%attr(755,root,root) %{_bindir}/llvm-stub
%attr(755,root,root) %{_bindir}/llvm-tblgen
%attr(755,root,root) %{_bindir}/macho-dump
%attr(755,root,root) %{_bindir}/opt
-%attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
+%attr(755,root,root) %{_libdir}/libLLVM-%{version}svn.so
%{_mandir}/man1/bugpoint.1*
%{_mandir}/man1/lit.1*
%{_mandir}/man1/llc.1*
%{_mandir}/man1/llvm-diff.1*
%{_mandir}/man1/llvm-dis.1*
%{_mandir}/man1/llvm-extract.1*
-%{_mandir}/man1/llvm-ld.1*
%{_mandir}/man1/llvm-link.1*
%{_mandir}/man1/llvm-nm.1*
%{_mandir}/man1/llvm-prof.1*
%{_mandir}/man1/llvm-ranlib.1*
%{_mandir}/man1/llvm-stress.1*
%{_mandir}/man1/opt.1*
+%{_mandir}/man1/tblgen.1*
%files devel
%defattr(644,root,root,755)
%files -n clang
%defattr(644,root,root,755)
%doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
+%attr(755,root,root) %{_bindir}/c-index-test
%attr(755,root,root) %{_bindir}/clang
%attr(755,root,root) %{_bindir}/clang++
+%attr(755,root,root) %{_bindir}/clang-check
%attr(755,root,root) %{_bindir}/clang-tblgen
%attr(755,root,root) %{_libdir}/libclang.so
%{_libdir}/clang
%{_mandir}/man1/clang.1*
-%{_mandir}/man1/tblgen.1*
%files -n clang-analyzer
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/scan-build
%attr(755,root,root) %{_bindir}/scan-view
+%{_mandir}/man1/scan-build.1*
%dir %{_libdir}/clang-analyzer
%dir %{_libdir}/clang-analyzer/scan-build