From 4e96740d9af1985bd23051217bd65482c4ab64cc Mon Sep 17 00:00:00 2001 From: Rosa Date: Tue, 9 Oct 2012 04:11:42 +0000 Subject: [PATCH] Automatic import for version 3.1-2 --- .abf.yml | 4 +- clang-shared-tooling.patch | 27 ++ clang-soname.patch | 13 + llvm-3.0-mandriva.patch | 36 --- llvm-3.0-soversion.patch | 28 --- llvm.spec | 490 +++++++++++++++++++++++++------------ 6 files changed, 382 insertions(+), 216 deletions(-) create mode 100644 clang-shared-tooling.patch create mode 100644 clang-soname.patch delete mode 100644 llvm-3.0-mandriva.patch delete mode 100644 llvm-3.0-soversion.patch diff --git a/.abf.yml b/.abf.yml index f94b3a8..41d834b 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,3 +1,3 @@ sources: - "clang-3.0.tar.gz": 1fa11f07f957bd9c9de003d1b5a7a9ba1e0055e4 - "llvm-3.0.tar.gz": b683e7294fcf69887c0d709025d4640f5dca755b + "clang-3.1.src.tar.gz": 19f33b187a50d22fda2a6f9ed989699a9a9efd62 + "llvm-3.1.src.tar.gz": 234c96e73ef81aec9a54da92fc2a9024d653b059 diff --git a/clang-shared-tooling.patch b/clang-shared-tooling.patch new file mode 100644 index 0000000..e5129f8 --- /dev/null +++ b/clang-shared-tooling.patch @@ -0,0 +1,27 @@ +From e27537d2cf6936043f7abdf4c6b91ae98fb40f1c Mon Sep 17 00:00:00 2001 +From: "Arnaud A. de Grandmaison" +Date: Sat, 30 Jun 2012 12:49:09 +0000 +Subject: [PATCH] [libclang] Fix autoconf library dependencies for tooling + support + +git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159490 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + tools/libclang/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/libclang/Makefile b/tools/libclang/Makefile +index 8d0a614..3f6774b 100644 +--- a/tools/libclang/Makefile ++++ b/tools/libclang/Makefile +@@ -19,7 +19,7 @@ LINK_COMPONENTS := support mc + USEDLIBS = clangARCMigrate.a clangRewrite.a clangFrontend.a clangDriver.a \ + clangSerialization.a \ + clangParse.a clangSema.a clangEdit.a clangAnalysis.a \ +- clangAST.a clangLex.a clangBasic.a ++ clangAST.a clangLex.a clangTooling.a clangBasic.a + + include $(CLANG_LEVEL)/Makefile + +-- +1.7.10 + diff --git a/clang-soname.patch b/clang-soname.patch new file mode 100644 index 0000000..ea3f580 --- /dev/null +++ b/clang-soname.patch @@ -0,0 +1,13 @@ +Index: clang-3.1.src/tools/libclang/Makefile +=================================================================== +--- clang-3.1.src/tools/libclang/Makefile ++++ clang-3.1.src/tools/libclang/Makefile 2012-08-02 19:26:10.159208928 +0300 +@@ -25,7 +25,7 @@ + + # Add soname to the library. + ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU)) +- LDFLAGS += -Wl,-soname,lib$(LIBRARYNAME)$(SHLIBEXT) ++ LDFLAGS += -Wl,-soname,lib$(LIBRARYNAME)-$(LLVMVersion)$(SHLIBEXT) + endif + + ##===----------------------------------------------------------------------===## diff --git a/llvm-3.0-mandriva.patch b/llvm-3.0-mandriva.patch deleted file mode 100644 index 727736c..0000000 --- a/llvm-3.0-mandriva.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- llvm-3.0.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2011-12-07 14:14:58.862544889 -0200 -+++ llvm-3.0.src/tools/clang/lib/Driver/ToolChains.cpp 2011-12-07 14:24:20.726544993 -0200 -@@ -1389,6 +1389,7 @@ enum LinuxDistro { - Fedora14, - Fedora15, - FedoraRawhide, -+ Mandriva, - OpenSuse11_3, - OpenSuse11_4, - OpenSuse12_1, -@@ -1507,6 +1508,9 @@ static LinuxDistro DetectLinuxDistro(llv - if (!llvm::sys::fs::exists("/etc/arch-release", Exists) && Exists) - return ArchLinux; - -+ if (!llvm::sys::fs::exists("/etc/mandriva-release", Exists) && Exists) -+ return Mandriva; -+ - return UnknownDistro; - } - -@@ -1654,6 +1658,7 @@ Linux::GCCInstallationDetector::GCCInsta - "x86_64-redhat-linux", - "x86_64-suse-linux", - "x86_64-manbo-linux-gnu", -+ "x86_64-mandriva-linux-gnu", - "x86_64-linux-gnu", - "x86_64-slackware-linux" - }; -@@ -1668,6 +1673,7 @@ Linux::GCCInstallationDetector::GCCInsta - "i686-pc-linux-gnu", - "i486-linux-gnu", - "i386-linux-gnu", -+ "i586-mandriva-linux-gnu", - "i686-redhat-linux", - "i586-redhat-linux", - "i386-redhat-linux", diff --git a/llvm-3.0-soversion.patch b/llvm-3.0-soversion.patch deleted file mode 100644 index 79bf175..0000000 --- a/llvm-3.0-soversion.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- llvm-3.0.src/cmake/modules/AddLLVM.cmake.orig 2011-12-29 18:06:26.000000000 +0000 -+++ llvm-3.0.src/cmake/modules/AddLLVM.cmake 2011-12-29 18:08:18.000000000 +0000 -@@ -11,6 +11,10 @@ macro(add_llvm_library name) - - if( BUILD_SHARED_LIBS ) - llvm_config( ${name} ${LLVM_LINK_COMPONENTS} ) -+ SET_TARGET_PROPERTIES(${name} -+ PROPERTIES -+ VERSION ${PACKAGE_VERSION} -+ SOVERSION ${PACKAGE_VERSION}) - endif() - - # Ensure that the system libraries always comes last on the ---- llvm-3.0.src/tools/clang/CMakeLists.txt.orig 2011-12-29 18:18:24.000000000 +0000 -+++ llvm-3.0.src/tools/clang/CMakeLists.txt 2011-12-29 18:19:44.000000000 +0000 -@@ -190,6 +190,12 @@ macro(add_clang_library name) - - target_link_libraries( ${name} ${LLVM_USED_LIBS} ) - llvm_config( ${name} ${LLVM_LINK_COMPONENTS} ) -+ if( BUILD_SHARED_LIBS ) -+ SET_TARGET_PROPERTIES(${name} -+ PROPERTIES -+ VERSION ${PACKAGE_VERSION} -+ SOVERSION ${PACKAGE_VERSION}) -+ endif() - target_link_libraries( ${name} ${LLVM_COMMON_LIBS} ) - link_system_libs( ${name} ) - diff --git a/llvm.spec b/llvm.spec index fe875a2..f0ac377 100644 --- a/llvm.spec +++ b/llvm.spec @@ -1,43 +1,45 @@ -%define _disable_ld_no_undefined 0 -%define _requires_exceptions devel(libLLVMSupport\\|devel(libclangARCMigrate\\|devel(libclangAST\\|devel(libclangBasic\\|devel(libclangFrontend\\|devel(libclangLex\\|devel(libclangSema\\|libclangBasic -%define ffi_include_dir %(pkg-config libffi --cflags-only-I | sed -e 's/-I//') -%define c_include_dirs %(echo `gcc -print-search-dirs | grep install | sed -e 's/install: //'`include:%{_includedir}) -%define version 3.0 -%define major 3 -%define minor 0 -%define libllvm %mklibname llvm %{major}.%{minor} -%define libllvm_devel %mklibname -d llvm -%define libclang %mklibname clang %{major}.%{minor} -%define libclang_devel %mklibname -d clang +%define _disable_ld_no_undefined 0 -Name: llvm -Version: %{version} -Release: 4 -Summary: Low Level Virtual Machine (LLVM) -License: NCSA -Group: Development/Other -URL: http://llvm.org/ -Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tar.gz -Source1: http://llvm.org/releases/%{version}/clang-%{version}.tar.gz -%rename llvm-doc -Requires: %{libllvm} = %{EVRD} -Requires: libstdc++-devel -BuildRequires: bison -BuildRequires: binutils-devel -BuildRequires: cmake -BuildRequires: chrpath -BuildRequires: ffi-devel -BuildRequires: flex -BuildRequires: graphviz -BuildRequires: groff -BuildRequires: libstdc++-devel -BuildRequires: libtool -BuildRequires: sed -BuildRequires: tcl -BuildRequires: zip +# clang header paths are hard-coded at compile time +# and need adjustment whenever there's a new GCC version +%define gcc_version %(gcc -dumpversion) -Patch0: llvm-3.0-mandriva.patch -Patch1: llvm-3.0-soversion.patch +%define compile_apidox 0 +%{?_with_apidox: %{expand: %%global compile_apidox 1}} + +%bcond_without clang + +Name: llvm +Version: 3.1 +Release: %mkrel 2 +Summary: Low Level Virtual Machine (LLVM) +License: NCSA +Group: Development/Other +URL: http://llvm.org/ +Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.gz +Source1: http://llvm.org/releases/%{version}/clang-%{version}.src.tar.gz +# Versionize libclang.so (Anssi 08/2012): +Patch0: clang-soname.patch +# Add libclangTooling.a to libclang.so, backport from upstream +Patch1: clang-shared-tooling.patch +Obsoletes: llvm-ocaml +Requires: libstdc++-devel +BuildRequires: bison +BuildRequires: groff +BuildRequires: chrpath +BuildRequires: ocaml +BuildRequires: tcl +%if %{compile_apidox} +BuildRequires: doxygen +%endif +BuildRequires: flex +BuildRequires: sed +BuildRequires: graphviz +BuildRequires: libstdc++-devel +BuildRequires: libtool +BuildRequires: zip +BuildRequires: libffi-devel +BuildRequires: chrpath %description LVM is a robust system, particularly well suited for developing new mid-level @@ -48,156 +50,348 @@ including those which require compile-time, link-time, or run-time optimization for effective implementation, proper tail calls or garbage collection. %files -%{_bindir}/* -%exclude %{_bindir}/clang* -%exclude %{_bindir}/llvm-config -%exclude %{_bindir}/c-index-test +%defattr(-,root,root,-) %doc LICENSE.TXT +%{_bindir}/bugpoint +%{_bindir}/llc +%{_bindir}/lli +%{_bindir}/opt +%{_bindir}/llvm-ar +%{_bindir}/llvm-as +%{_bindir}/llvm-bcanalyzer +%{_bindir}/llvm-diff +%{_bindir}/llvm-dis +%{_bindir}/llvm-extract +%{_bindir}/llvm-ld +%{_bindir}/llvm-link +%{_bindir}/llvm-mc +%{_bindir}/llvm-nm +%{_bindir}/llvm-objdump +%{_bindir}/llvm-prof +%{_bindir}/llvm-ranlib +%{_bindir}/llvm-readobj +%{_bindir}/llvm-stub +%{_bindir}/llvm-cov +%{_bindir}/llvm-dwarfdump +%{_bindir}/llvm-rtdyld +%{_bindir}/llvm-size +%{_bindir}/llvm-stress +%{_bindir}/llvm-tblgen +%{_bindir}/macho-dump +%{_mandir}/man1/bugpoint.1* +%{_mandir}/man1/l* +%{_mandir}/man1/opt.1* +%{_mandir}/man1/tblgen.1* +%{_libdir}/ocaml/* + +#----------------------------------------------------------- + +%define major %version +%define libname %mklibname %name %major + +%package -n %libname +Summary: LLVM shared libraries +Group: System/Libraries +Conflicts: llvm < 3.0-4 + +%description -n %libname +Shared libraries for the LLVM compiler infrastructure. This is needed by +programs that are dynamically linked against libLLVM. + +%files -n %libname +%{_libdir}/libLLVM-%major.so + +#----------------------------------------------------------- + +%define libname_devel %mklibname -d %name + +%package -n %{libname_devel} +Summary: Development files for LLVM +Group: Development/Other +Provides: llvm-devel = %version-%release +Requires: %libname = %version-%release +Requires: %name = %version-%release +Conflicts: llvm < 3.0-7 +Conflicts: %{_lib}llvm3.0 < 3.0-9 + +%description -n %{libname_devel} +This package contains the development files for LLVM; + +%files -n %{libname_devel} +%{_bindir}/%{name}-config +%{_libdir}/libLLVM.so +%{_includedir}/%{name} +%{_includedir}/%{name}-c +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/BugpointPasses.so +%{_libdir}/%{name}/libLLVM*.a +%{_libdir}/%{name}/libLLVM*.so +%{_libdir}/%{name}/libLTO.a +%{_libdir}/%{name}/libLTO.so +%{_libdir}/%{name}/libprofile_rt.a +%{_libdir}/%{name}/libprofile_rt.so +%{_libdir}/%{name}/libllvm*.a + +#----------------------------------------------------------- + +%package doc +Summary: Documentation for LLVM +Group: Books/Computer books +Requires: %{name} = %{version} +BuildArch: noarch +Obsoletes: llvm-doc-devel + +%description doc +Documentation for the LLVM compiler infrastructure. + +%files doc +%defattr(-,root,root,-) %doc README.txt %doc docs/*.css %doc docs/*.html %doc docs/img %doc docs/tutorial +%doc docs/ocamldoc %doc examples - -#----------------------------------------------------------- -%package -n %{libllvm} -Summary: LLVM %{version} shared libraries -Group: System/Libraries -%if "%{major}.%{minor}" == "3.0" -# removed before next submit -%define libllvm3 %mklibname llvm 3 -%rename %{libllvm3} +%if %{compile_apidox} +%doc docs/doxygen %endif -%description -n %{libllvm} -%{summary}. - -%files -n %{libllvm} -%{_libdir}/*.so.%{major}.%{minor} -%exclude %{_libdir}/lib*clang*.so.%{major}.%{minor} - #----------------------------------------------------------- -%package -n %{libllvm_devel} -Summary: LLVM %{version} development files -Group: Development/Other -Requires: %{libllvm} = %{EVRD} -Requires: llvm = %{EVRD} -%rename llvm-devel -%description -n %{libllvm_devel} -%{summary}. +%if %{with clang} +%define clang_major %version +%define clang_libname %mklibname clang %clang_major -%files -n %{libllvm_devel} -%{_bindir}/llvm-config -%{_libdir}/*.so -%exclude %{_libdir}/lib*clang*.so -%{_includedir}/llvm -%{_includedir}/llvm-c -%{_libdir}/cmake/llvm +# TODO: %{_bindir}/clang is linked against static libclang.a, could it be +# linked against libclang.so instead, like llvm-* are against livLLVM.so? -#----------------------------------------------------------- -%package -n clang -Summary: C/C++/Objective-C Frontend Toolkit -Group: Development/Other -Requires: llvm = %{EVRD} -Requires: %{libclang} = %{EVRD} -Requires: gcc-c++ +%package -n clang +Summary: A C language family front-end for LLVM +License: NCSA +Group: Development/Other +# TODO: is this requires:llvm needed, or just legacy from fedora pkg layout? +Requires: llvm%{?_isa} = %{version}-%{release} +# clang requires gcc, clang++ requires libstdc++-devel +Requires: gcc +Requires: libstdc++-devel = %{gcc_version} -%description -n clang -Clang is an LLVM front end for the C, C++, and Objective-C languages. -Clang aims to provide a better user experience through expressive -diagnostics, a high level of conformance to language standards, fast -compilation, and low memory use. Like LLVM, Clang provides a modular, -library-based architecture that makes it suitable for creating or -integrating with other development tools. Clang is considered a -production-quality compiler for C, Objective-C, C++ and Objective-C++ -on x86 (32- and 64-bit), and for Darwin/ARM targets. +%description -n clang +clang: noun + 1. A loud, resonant, metallic sound. + 2. The strident call of a crane or goose. + 3. C-language family front-end toolkit. -%files -n clang +The goal of the Clang project is to create a new C, C++, Objective C +and Objective C++ front-end for the LLVM compiler. Its tools are built +as libraries and designed to be loosely-coupled and extensible. + +%files -n clang +%doc clang-docs/* %{_bindir}/clang* %{_bindir}/c-index-test -%{_libdir}/clang +%{_prefix}/lib/clang +%doc %{_mandir}/man1/clang.1.* + +%package -n %clang_libname +Summary: Shared library for clang +Group: System/Libraries + +%description -n %clang_libname +Shared libraries for the clang compiler. This is needed by +programs that are dynamically linked against libclang. + +%files -n %clang_libname +%{_libdir}/libclang-%clang_major.so #----------------------------------------------------------- -%package -n %{libclang} -Summary: Clang %{version} shared libraries -Group: Development/Other -%if "%{major}.%{minor}" == "3.0" -# removed before next submit -%define libclang3 %mklibname clang 3 -%rename %{libclang3} -%endif -%description -n %{libclang} -%{summary}. +%define clang_libname_devel %mklibname -d clang -%files -n %{libclang} -%{_libdir}/lib*clang*.so.%{major}.%{minor} +%package -n %{clang_libname_devel} +Summary: Development files for clang +Group: Development/Other +Requires: %clang_libname = %version-%release +Provides: clang-devel = %version-%release +Conflicts: llvm-devel < 3.1 +Obsoletes: clang-devel < 3.1 -#----------------------------------------------------------- -%package -n %{libclang_devel} -Summary: Clang %{version} development files -Group: Development/Other -Requires: %{libclang} = %{EVRD} -Provides: clang-devel = %{EVRD} +%description -n %{clang_libname_devel} +This package contains header files and libraries needed for using +libclang. -%description -n %{libclang_devel} -%{summary}. - -%files -n %{libclang_devel} +%files -n %{clang_libname_devel} %{_includedir}/clang %{_includedir}/clang-c -%{_libdir}/lib*clang*.so +%{_libdir}/libclang.so +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/libclang*.a +%{_libdir}/%{name}/libclang*.so + +%package -n clang-analyzer +Summary: A source code analysis framework +License: NCSA +Group: Development/Other +Requires: clang%{?_isa} = %{version}-%{release} +# not picked up automatically since files are currently not instaled +# in standard Python hierarchies yet +Requires: python + +%description -n clang-analyzer +The Clang Static Analyzer consists of both a source code analysis +framework and a standalone tool that finds bugs in C and Objective-C +programs. The standalone tool is invoked from the command-line, and is +intended to run in tandem with a build of a project or code base. + +%files -n clang-analyzer +%{_bindir}/scan-build +%{_bindir}/scan-view +%{_libdir}/clang-analyzer + + +%package -n clang-doc +Summary: Documentation for Clang +Group: Books/Computer books +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description -n clang-doc +Documentation for the Clang compiler front-end. + +%files -n clang-doc +%doc clang-docs-full/* + +%endif #----------------------------------------------------------- + %prep -%setup -q -n %{name}-%{version}.src -a1 -mv clang-%{version}.src tools/clang - -cat > autoconf/config.guess < 3.1-2mdv2012.0 ++ Revision: 818433 +- Bump release, needs to be sent through the build system again + +* Mon Sep 17 2012 Alexander Khrukin 3.1-1 ++ Revision: 817008 +- version update 3.1 and mga sync + * Tue Jan 10 2012 Paulo Andrade 3.0-4 + Revision: 759605 - Rename library packages to match soname. @@ -318,7 +512,3 @@ rm -f %{buildroot}%{_libdir}/{BugpointPasses.so,LLVMHello.so,profile_rt.so} + Revision: 230557 - import llvm - -* Tue Jul 1 2008 Helio Chissini de Castro - 2.3 -- initial build version 2.3 -- Based on fedora-llvm package 2.2-4