mirror of
https://abf.rosa.ru/djam/llvm.git
synced 2025-02-24 00:32:49 +00:00
Automatic import for version 3.1-2
This commit is contained in:
parent
c86d9d540f
commit
4e96740d9a
6 changed files with 382 additions and 216 deletions
4
.abf.yml
4
.abf.yml
|
@ -1,3 +1,3 @@
|
||||||
sources:
|
sources:
|
||||||
"clang-3.0.tar.gz": 1fa11f07f957bd9c9de003d1b5a7a9ba1e0055e4
|
"clang-3.1.src.tar.gz": 19f33b187a50d22fda2a6f9ed989699a9a9efd62
|
||||||
"llvm-3.0.tar.gz": b683e7294fcf69887c0d709025d4640f5dca755b
|
"llvm-3.1.src.tar.gz": 234c96e73ef81aec9a54da92fc2a9024d653b059
|
||||||
|
|
27
clang-shared-tooling.patch
Normal file
27
clang-shared-tooling.patch
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
From e27537d2cf6936043f7abdf4c6b91ae98fb40f1c Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Arnaud A. de Grandmaison" <arnaud.adegm@gmail.com>
|
||||||
|
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
|
||||||
|
|
13
clang-soname.patch
Normal file
13
clang-soname.patch
Normal file
|
@ -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
|
||||||
|
|
||||||
|
##===----------------------------------------------------------------------===##
|
|
@ -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",
|
|
|
@ -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} )
|
|
||||||
|
|
490
llvm.spec
490
llvm.spec
|
@ -1,43 +1,45 @@
|
||||||
%define _disable_ld_no_undefined 0
|
%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
|
|
||||||
|
|
||||||
Name: llvm
|
# clang header paths are hard-coded at compile time
|
||||||
Version: %{version}
|
# and need adjustment whenever there's a new GCC version
|
||||||
Release: 4
|
%define gcc_version %(gcc -dumpversion)
|
||||||
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
|
|
||||||
|
|
||||||
Patch0: llvm-3.0-mandriva.patch
|
%define compile_apidox 0
|
||||||
Patch1: llvm-3.0-soversion.patch
|
%{?_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
|
%description
|
||||||
LVM is a robust system, particularly well suited for developing new mid-level
|
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.
|
for effective implementation, proper tail calls or garbage collection.
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_bindir}/*
|
%defattr(-,root,root,-)
|
||||||
%exclude %{_bindir}/clang*
|
|
||||||
%exclude %{_bindir}/llvm-config
|
|
||||||
%exclude %{_bindir}/c-index-test
|
|
||||||
%doc LICENSE.TXT
|
%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 README.txt
|
||||||
%doc docs/*.css
|
%doc docs/*.css
|
||||||
%doc docs/*.html
|
%doc docs/*.html
|
||||||
%doc docs/img
|
%doc docs/img
|
||||||
%doc docs/tutorial
|
%doc docs/tutorial
|
||||||
|
%doc docs/ocamldoc
|
||||||
%doc examples
|
%doc examples
|
||||||
|
%if %{compile_apidox}
|
||||||
#-----------------------------------------------------------
|
%doc docs/doxygen
|
||||||
%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}
|
|
||||||
%endif
|
%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}
|
%if %{with clang}
|
||||||
%{summary}.
|
%define clang_major %version
|
||||||
|
%define clang_libname %mklibname clang %clang_major
|
||||||
|
|
||||||
%files -n %{libllvm_devel}
|
# TODO: %{_bindir}/clang is linked against static libclang.a, could it be
|
||||||
%{_bindir}/llvm-config
|
# linked against libclang.so instead, like llvm-* are against livLLVM.so?
|
||||||
%{_libdir}/*.so
|
|
||||||
%exclude %{_libdir}/lib*clang*.so
|
|
||||||
%{_includedir}/llvm
|
|
||||||
%{_includedir}/llvm-c
|
|
||||||
%{_libdir}/cmake/llvm
|
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
%package -n clang
|
||||||
%package -n clang
|
Summary: A C language family front-end for LLVM
|
||||||
Summary: C/C++/Objective-C Frontend Toolkit
|
License: NCSA
|
||||||
Group: Development/Other
|
Group: Development/Other
|
||||||
Requires: llvm = %{EVRD}
|
# TODO: is this requires:llvm needed, or just legacy from fedora pkg layout?
|
||||||
Requires: %{libclang} = %{EVRD}
|
Requires: llvm%{?_isa} = %{version}-%{release}
|
||||||
Requires: gcc-c++
|
# clang requires gcc, clang++ requires libstdc++-devel
|
||||||
|
Requires: gcc
|
||||||
|
Requires: libstdc++-devel = %{gcc_version}
|
||||||
|
|
||||||
%description -n clang
|
%description -n clang
|
||||||
Clang is an LLVM front end for the C, C++, and Objective-C languages.
|
clang: noun
|
||||||
Clang aims to provide a better user experience through expressive
|
1. A loud, resonant, metallic sound.
|
||||||
diagnostics, a high level of conformance to language standards, fast
|
2. The strident call of a crane or goose.
|
||||||
compilation, and low memory use. Like LLVM, Clang provides a modular,
|
3. C-language family front-end toolkit.
|
||||||
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.
|
|
||||||
|
|
||||||
%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}/clang*
|
||||||
%{_bindir}/c-index-test
|
%{_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}
|
%define clang_libname_devel %mklibname -d clang
|
||||||
%{summary}.
|
|
||||||
|
|
||||||
%files -n %{libclang}
|
%package -n %{clang_libname_devel}
|
||||||
%{_libdir}/lib*clang*.so.%{major}.%{minor}
|
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
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
%description -n %{clang_libname_devel}
|
||||||
%package -n %{libclang_devel}
|
This package contains header files and libraries needed for using
|
||||||
Summary: Clang %{version} development files
|
libclang.
|
||||||
Group: Development/Other
|
|
||||||
Requires: %{libclang} = %{EVRD}
|
|
||||||
Provides: clang-devel = %{EVRD}
|
|
||||||
|
|
||||||
%description -n %{libclang_devel}
|
%files -n %{clang_libname_devel}
|
||||||
%{summary}.
|
|
||||||
|
|
||||||
%files -n %{libclang_devel}
|
|
||||||
%{_includedir}/clang
|
%{_includedir}/clang
|
||||||
%{_includedir}/clang-c
|
%{_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
|
%prep
|
||||||
%setup -q -n %{name}-%{version}.src -a1
|
%setup -qn %{name}-%{version}.src %{?with_clang:-a1}
|
||||||
mv clang-%{version}.src tools/clang
|
rm -rf tools/clang
|
||||||
|
%if %{with clang}
|
||||||
cat > autoconf/config.guess <<EOF
|
mv clang-%{version}%{?prerel}.src tools/clang
|
||||||
#!/bin/sh
|
cd tools/clang
|
||||||
echo %{_target_platform}
|
|
||||||
EOF
|
|
||||||
chmod +x autoconf/config.guess
|
|
||||||
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
cd -
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake \
|
|
||||||
-DC_INCLUDE_DIRS:STRING=%{c_include_dirs} \
|
|
||||||
-DCLANG_VENDOR:STRING=%{vendor} \
|
|
||||||
-DFFI_INCLUDE_DIR:PATH=%{ffi_include_dir} \
|
|
||||||
-DLLVM_ENABLE_ASSERTIONS:BOOL=false \
|
|
||||||
-DLLVM_INCLUDE_EXAMPLES:BOOL=false \
|
|
||||||
%ifarch x86_64
|
|
||||||
-DLLVM_LIBDIR_SUFFIX:STRING=64 \
|
|
||||||
%endif
|
|
||||||
-DLLVM_ENABLE_FFI:BOOL=true \
|
|
||||||
-DBUILD_SHARED_LIBS:BOOL=true \
|
|
||||||
-DBUILD_STATIC_LIBS:BOOL=false
|
|
||||||
|
|
||||||
LD_LIBRARY_PATH=$PWD/lib:$_LIBRARY_PATH \
|
# Build with gcc/g++, not clang if it happens to be installed
|
||||||
|
# (blino) clang < 3.1 does not handle system headers from gcc 4.7
|
||||||
|
# http://llvm.org/bugs/show_bug.cgi?id=11916
|
||||||
|
export CC=gcc
|
||||||
|
export CXX=g++
|
||||||
|
|
||||||
|
%configure2_5x \
|
||||||
|
--libdir=%{_libdir}/%{name} \
|
||||||
|
--datadir=%{_datadir}/%{name} \
|
||||||
|
--enable-shared \
|
||||||
|
--enable-jit \
|
||||||
|
--enable-libffi \
|
||||||
|
--enable-optimized \
|
||||||
|
--enable-targets=host-only \
|
||||||
|
--disable-expensive-checks \
|
||||||
|
--enable-debug-runtime \
|
||||||
|
--disable-assertions \
|
||||||
|
--enable-threads \
|
||||||
|
%if %{compile_apidox}
|
||||||
|
--enable-doxygen
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# FIXME file this
|
||||||
|
# configure does not properly specify libdir
|
||||||
|
sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
|
||||||
|
|
||||||
|
# FIXME upstream need to fix this
|
||||||
|
# llvm-config.cpp hardcodes lib in it
|
||||||
|
sed -i 's|ActiveLibDir = ActivePrefix + "/lib"|ActiveLibDir = ActivePrefix + "/%{_lib}/%{name}"|g' tools/llvm-config/llvm-config.cpp
|
||||||
|
|
||||||
%make
|
%make
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
|
||||||
%install
|
%install
|
||||||
%makeinstall_std -C build
|
cp bindings/ocaml/llvm/META.llvm bindings/ocaml/llvm/Release/
|
||||||
mkdir -p %{buildroot}%{_libdir}/cmake
|
%makeinstall_std \
|
||||||
mv -f %{buildroot}%{_datadir}/llvm/cmake %{buildroot}%{_libdir}/cmake/llvm
|
KEEP_SYMBOLS=1 \
|
||||||
rmdir %{buildroot}%{_datadir}/llvm
|
PROJ_docsdir=%{_docdir}/%{name} \
|
||||||
|
PROJ_etcdir=%{_sysconfdir}/%{name} \
|
||||||
|
PROJ_libdir=%{_libdir}/%{name}
|
||||||
|
|
||||||
%ifarch x86_64
|
# Invalid dir
|
||||||
# adjust library path
|
rm -rf %buildroot%_bindir/.dir
|
||||||
sed -i -e 's|ABS_RUN_DIR/lib.*"|ABS_RUN_DIR/%{_lib}"|' \
|
|
||||||
%{buildroot}%{_bindir}/llvm-config
|
# wrong rpath entries (Anssi 11/2011)
|
||||||
|
file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
||||||
|
file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
||||||
|
|
||||||
|
# move shared library to standard library path and add devel symlink (Anssi 11/2011)
|
||||||
|
mv %{buildroot}%{_libdir}/llvm/libLLVM-%major.so %{buildroot}%{_libdir}
|
||||||
|
ln -s libLLVM-%major.so %{buildroot}%{_libdir}/libLLVM.so
|
||||||
|
# Also, create shared library symlinks corresponding to all the static library
|
||||||
|
# names, so that using e.g. "-lLLVMBitReader" will cause the binary to be linked
|
||||||
|
# against the shared library instead of static library by default. (Anssi 08/2012)
|
||||||
|
for staticlib in %{buildroot}%{_libdir}/llvm/libLLVM*.a; do
|
||||||
|
sharedlib="${staticlib%.a}.so"
|
||||||
|
[ -e "$sharedlib" ] && exit 1
|
||||||
|
ln -s ../libLLVM.so "$sharedlib"
|
||||||
|
done
|
||||||
|
|
||||||
|
%if %with clang
|
||||||
|
# Versionize libclang.so (patch0 makes the same change to soname) and move it to standard path.
|
||||||
|
mv %{buildroot}%{_libdir}/llvm/libclang.so %{buildroot}%{_libdir}/libclang-%version.so
|
||||||
|
ln -s libclang-%clang_major.so %{buildroot}%{_libdir}/libclang.so
|
||||||
|
ln -s ../libclang.so %{buildroot}%{_libdir}/llvm/libclang.so
|
||||||
|
|
||||||
|
# NOTE: We don't create devel symlinks for the libclang.so for libclang*.a libraries
|
||||||
|
# like for libLLVM above, because libclang.so actually exports much less symbols
|
||||||
|
# - some are not linked in (tools/libclang/Makefile) and others are restricted
|
||||||
|
# by tools/libclang/libclang.exports. - Anssi 09/2012
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -f %{buildroot}%{_libdir}/{BugpointPasses.so,LLVMHello.so,profile_rt.so}
|
# Since the static libraries are very huge, strip them of debug symbols as well
|
||||||
|
# (Anssi 08/2012)
|
||||||
|
strip --strip-debug %{buildroot}%{_libdir}/llvm/*.a
|
||||||
|
|
||||||
|
%if %{with clang}
|
||||||
|
|
||||||
|
# Static analyzer not installed by default:
|
||||||
|
# http://clang-analyzer.llvm.org/installation#OtherPlatforms
|
||||||
|
mkdir -p %{buildroot}%{_libdir}/clang-analyzer
|
||||||
|
# create launchers
|
||||||
|
for f in scan-{build,view}; do
|
||||||
|
ln -s %{_libdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f
|
||||||
|
done
|
||||||
|
|
||||||
|
(cd tools/clang/tools && cp -pr scan-{build,view} \
|
||||||
|
%{buildroot}%{_libdir}/clang-analyzer/)
|
||||||
|
|
||||||
|
# And prepare Clang documentation
|
||||||
|
#
|
||||||
|
rm -rf clang-docs
|
||||||
|
mkdir clang-docs
|
||||||
|
for f in LICENSE.TXT NOTES.txt README.txt; do # TODO.txt; do
|
||||||
|
ln tools/clang/$f clang-docs/
|
||||||
|
done
|
||||||
|
rm -rf clang-docs-full
|
||||||
|
cp -al tools/clang/docs clang-docs-full
|
||||||
|
rm -rf clang-docs-full/{doxygen*,Makefile*,*.graffle,tools}
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Get rid of erroneously installed example files.
|
||||||
|
rm %{buildroot}%{_libdir}/%{name}/LLVMHello.so
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 05 2012 Bernhard Rosenkraenzer <bero@bero.eu> 3.1-2mdv2012.0
|
||||||
|
+ Revision: 818433
|
||||||
|
- Bump release, needs to be sent through the build system again
|
||||||
|
|
||||||
|
* Mon Sep 17 2012 Alexander Khrukin <akhrukin@mandriva.org> 3.1-1
|
||||||
|
+ Revision: 817008
|
||||||
|
- version update 3.1 and mga sync
|
||||||
|
|
||||||
* Tue Jan 10 2012 Paulo Andrade <pcpa@mandriva.com.br> 3.0-4
|
* Tue Jan 10 2012 Paulo Andrade <pcpa@mandriva.com.br> 3.0-4
|
||||||
+ Revision: 759605
|
+ Revision: 759605
|
||||||
- Rename library packages to match soname.
|
- Rename library packages to match soname.
|
||||||
|
@ -318,7 +512,3 @@ rm -f %{buildroot}%{_libdir}/{BugpointPasses.so,LLVMHello.so,profile_rt.so}
|
||||||
+ Revision: 230557
|
+ Revision: 230557
|
||||||
- import llvm
|
- import llvm
|
||||||
|
|
||||||
|
|
||||||
* Tue Jul 1 2008 Helio Chissini de Castro <helio@mandriva.com> - 2.3
|
|
||||||
- initial build version 2.3
|
|
||||||
- Based on fedora-llvm package 2.2-4
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue