From f981d747bc073b5da745f5c14676da3ce422304e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Sikora?= Date: Wed, 23 May 2012 12:51:34 +0000 Subject: [PATCH] - updated to 3.1. Changed files: llvm-bug11177.patch -> 1.2 llvm-pld.patch -> 1.3 llvm.spec -> 1.32 --- llvm-bug11177.patch | 45 ---------------------------- llvm-pld.patch | 71 +++++++++++++++++++++++---------------------- llvm.spec | 17 ++++++----- 3 files changed, 45 insertions(+), 88 deletions(-) delete mode 100644 llvm-bug11177.patch diff --git a/llvm-bug11177.patch b/llvm-bug11177.patch deleted file mode 100644 index 7eff486..0000000 --- a/llvm-bug11177.patch +++ /dev/null @@ -1,45 +0,0 @@ -make *** No rule to make target (...)/rpm/BUILD/llvm-3.0.src/obj/bindings/ocaml/llvm/Release/META.llvm, needed by install-meta. - -Index: bindings/ocaml/Makefile.ocaml -=================================================================== ---- bindings/ocaml/Makefile.ocaml (revision 144182) -+++ bindings/ocaml/Makefile.ocaml (revision 144183) -@@ -238,14 +238,14 @@ - # Also install the .mli's (headers) as documentation. - install-cmis: $(OutputsCMI) $(OcamlHeaders) - $(Verb) $(MKDIR) $(PROJ_libocamldir) -+ $(Verb) for i in $(OcamlHeaders:$(ObjDir)/%=%); do \ -+ $(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \ -+ $(DataInstall) $(ObjDir)/$$i "$(PROJ_libocamldir)/$$i"; \ -+ done - $(Verb) for i in $(OutputsCMI:$(OcamlDir)/%=%); do \ - $(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \ - $(DataInstall) $(OcamlDir)/$$i "$(PROJ_libocamldir)/$$i"; \ - done -- $(Verb) for i in $(OcamlHeaders:$(ObjDir)/%=%); do \ -- $(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \ -- $(DataInstall) $(ObjDir)/$$i "$(PROJ_libocamldir)/$$i"; \ -- done - - uninstall-cmis:: - $(Verb) for i in $(OutputsCMI:$(OcamlDir)/%=%); do \ -Index: bindings/ocaml/llvm/Makefile -=================================================================== ---- bindings/ocaml/llvm/Makefile (revision 144182) -+++ bindings/ocaml/llvm/Makefile (revision 144183) -@@ -30,11 +30,13 @@ - $(OcamlDir)/META.llvm: META.llvm - $(Verb) $(CP) -f $< $@ - --install-meta:: $(ObjDir)/META.llvm -+install-meta:: $(OcamlDir)/META.llvm - $(Echo) "Install $(BuildMode) $(DestMETA)" - $(Verb) $(MKDIR) $(PROJ_libocamldir) -- $(Verb) $(DataInstall) META.llvm "$(DestMETA)" -+ $(Verb) $(DataInstall) $< "$(DestMETA)" - - uninstall-meta:: - $(Echo) "Uninstalling $(DestMETA)" - -$(Verb) $(RM) -f "$(DestMETA)" -+ -+.PHONY: copy-meta install-meta uninstall-meta diff --git a/llvm-pld.patch b/llvm-pld.patch index 01a25c6..b945ad7 100644 --- a/llvm-pld.patch +++ b/llvm-pld.patch @@ -1,6 +1,23 @@ --- 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 -@@ -1378,6 +1378,7 @@ +@@ -1190,6 +1190,7 @@ + + static const char *const X86_64LibDirs[] = { "/lib64", "/lib" }; + static const char *const X86_64Triples[] = { ++ "x86_64-pld-linux", + "x86_64-linux-gnu", + "x86_64-unknown-linux-gnu", + "x86_64-pc-linux-gnu", +@@ -1202,6 +1203,8 @@ + }; + static const char *const X86LibDirs[] = { "/lib32", "/lib" }; + static const char *const X86Triples[] = { ++ "i686-pld-linux", ++ "i486-pld-linux", + "i686-linux-gnu", + "i686-pc-linux-gnu", + "i486-linux-gnu", +@@ -1815,6 +1818,7 @@ enum LinuxDistro { ArchLinux, @@ -8,8 +25,8 @@ DebianLenny, DebianSqueeze, DebianWheezy, -@@ -1426,6 +1427,10 @@ - Distro == UbuntuNatty || Distro == UbuntuOneiric; +@@ -1860,6 +1864,10 @@ + return Distro >= UbuntuHardy && Distro <= UbuntuPrecise; } +static bool IsPLD(enum LinuxDistro Distro) { @@ -17,9 +34,9 @@ +} + static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) { - llvm::OwningPtr File; + OwningPtr File; if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) { -@@ -1507,6 +1512,9 @@ +@@ -1936,6 +1944,9 @@ if (!llvm::sys::fs::exists("/etc/arch-release", Exists) && Exists) return ArchLinux; @@ -29,24 +46,7 @@ return UnknownDistro; } -@@ -1647,6 +1655,7 @@ - } else if (HostArch == llvm::Triple::x86_64) { - static const char *const X86_64LibDirs[] = { "/lib64", "/lib" }; - static const char *const X86_64Triples[] = { -+ "x86_64-pld-linux", - "x86_64-linux-gnu", - "x86_64-unknown-linux-gnu", - "x86_64-pc-linux-gnu", -@@ -1664,6 +1673,8 @@ - } else if (HostArch == llvm::Triple::x86) { - static const char *const X86LibDirs[] = { "/lib32", "/lib" }; - static const char *const X86Triples[] = { -+ "i486-pld-linux", -+ "i686-pld-linux", - "i686-linux-gnu", - "i686-pc-linux-gnu", - "i486-linux-gnu", -@@ -1802,7 +1813,7 @@ +@@ -2003,7 +2014,7 @@ LinuxDistro Distro = DetectLinuxDistro(Arch); @@ -55,17 +55,18 @@ ExtraOpts.push_back("-z"); ExtraOpts.push_back("relro"); } -@@ -1811,18 +1822,18 @@ - ExtraOpts.push_back("-X"); - - if (IsRedhat(Distro) || IsOpenSuse(Distro) || Distro == UbuntuMaverick || -- Distro == UbuntuNatty || Distro == UbuntuOneiric) -+ Distro == UbuntuNatty || Distro == UbuntuOneiric || IsPLD(Distro)) - ExtraOpts.push_back("--hash-style=gnu"); +@@ -2024,7 +2035,7 @@ + // ABI requires a mapping between the GOT and the symbol table. + // Android loader does not support .gnu.hash. + if (!IsMips && !IsAndroid) { +- if (IsRedhat(Distro) || IsOpenSuse(Distro) || ++ if (IsRedhat(Distro) || IsOpenSuse(Distro) || IsPLD(Distro) || + (IsUbuntu(Distro) && Distro >= UbuntuMaverick)) + ExtraOpts.push_back("--hash-style=gnu"); - if (IsDebian(Distro) || IsOpenSuse(Distro) || Distro == UbuntuLucid || - Distro == UbuntuJaunty || Distro == UbuntuKarmic) - ExtraOpts.push_back("--hash-style=both"); +@@ -2033,11 +2044,11 @@ + ExtraOpts.push_back("--hash-style=both"); + } - if (IsRedhat(Distro)) + if (IsRedhat(Distro) || IsPLD(Distro)) @@ -75,5 +76,5 @@ - IsOpenSuse(Distro) || + IsOpenSuse(Distro) || IsPLD(Distro) || (IsRedhat(Distro) && Distro != RHEL4 && Distro != RHEL5) || - Distro == UbuntuLucid || - Distro == UbuntuMaverick || Distro == UbuntuKarmic || + (IsUbuntu(Distro) && Distro >= UbuntuKarmic)) + ExtraOpts.push_back("--build-id"); diff --git a/llvm.spec b/llvm.spec index d3ce221..1c7d1e5 100644 --- a/llvm.spec +++ b/llvm.spec @@ -12,18 +12,17 @@ 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.0 +Version: 3.1 Release: 1 License: University of Illinois/NCSA Open Source License Group: Development/Languages -Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.tar.gz -# Source0-md5: a8e5f5f1c1adebae7b4a654c376a6005 -Source1: http://llvm.org/releases/%{version}/clang-%{version}.tar.gz -# Source1-md5: 43350706ae6cf05d0068885792ea0591 +Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.gz +# Source0-md5: 16eaa7679f84113f65b12760fdfe4ee1 +Source1: http://llvm.org/releases/%{version}/clang-%{version}.src.tar.gz +# Source1-md5: 59bf2d3120a3805f27cafda3823caaf8 # Data files should be installed with timestamps preserved Patch3: %{name}-2.6-timestamp.patch Patch4: %{name}-pld.patch -Patch5: %{name}-bug11177.patch URL: http://llvm.org/ BuildRequires: bash BuildRequires: bison @@ -243,7 +242,6 @@ Dokumentacja HTML wiązania OCamla do LLVM-a. mv clang-*.* tools/clang %patch3 -p1 %patch4 -p1 -%patch5 -p0 # configure does not properly specify libdir sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}|g' Makefile.config.in @@ -366,8 +364,10 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/llvm-objdump %attr(755,root,root) %{_bindir}/llvm-prof %attr(755,root,root) %{_bindir}/llvm-ranlib +%attr(755,root,root) %{_bindir}/llvm-readobj %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 @@ -380,6 +380,7 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/llvm-ar.1* %{_mandir}/man1/llvm-as.1* %{_mandir}/man1/llvm-bcanalyzer.1* +%{_mandir}/man1/llvm-cov.1* %{_mandir}/man1/llvm-diff.1* %{_mandir}/man1/llvm-dis.1* %{_mandir}/man1/llvm-extract.1* @@ -388,6 +389,7 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/llvm-nm.1* %{_mandir}/man1/llvm-prof.1* %{_mandir}/man1/llvm-ranlib.1* +%{_mandir}/man1/llvm-stress.1* %{_mandir}/man1/opt.1* %files devel @@ -399,7 +401,6 @@ rm -rf $RPM_BUILD_ROOT %ifarch %{x8664} %attr(755,root,root) %{_libdir}/BugpointPasses.so %attr(755,root,root) %{_libdir}/libLTO.so -%{_libdir}/libEnhancedDisassembly.a %{_libdir}/libLTO.a %endif %{_includedir}/llvm -- 2.44.0