2011-04-20 13:53:17 +00:00
|
|
|
#
|
2011-06-03 13:52:45 +00:00
|
|
|
# spec file for package llvm
|
2011-04-20 13:53:17 +00:00
|
|
|
#
|
2013-01-09 13:17:01 +00:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-04-20 13:53:17 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-03-20 12:39:06 +00:00
|
|
|
|
2013-12-04 10:10:13 +00:00
|
|
|
%define _revision 196371
|
2013-11-19 09:12:59 +00:00
|
|
|
%define _release_version 3.4
|
2013-08-28 11:02:17 +00:00
|
|
|
|
2011-04-20 13:53:17 +00:00
|
|
|
Name: llvm
|
2013-11-19 09:12:59 +00:00
|
|
|
Version: 3.3.93
|
2011-12-22 15:34:18 +00:00
|
|
|
Release: 0
|
2011-05-30 14:35:16 +00:00
|
|
|
Summary: Low Level Virtual Machine
|
2011-12-22 15:34:18 +00:00
|
|
|
License: NCSA
|
2011-05-30 14:35:16 +00:00
|
|
|
Group: Development/Languages/Other
|
2011-12-22 15:34:18 +00:00
|
|
|
Url: http://www.llvm.org
|
2013-11-19 09:12:59 +00:00
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
2011-04-20 13:53:17 +00:00
|
|
|
Source100: %{name}-rpmlintrc
|
2011-05-29 16:36:18 +00:00
|
|
|
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
|
|
|
|
Patch1: set-revision.patch
|
2011-08-12 10:31:37 +00:00
|
|
|
# PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features
|
2012-04-17 09:02:19 +00:00
|
|
|
Patch2: assume-opensuse.patch
|
2011-12-25 15:48:32 +00:00
|
|
|
# PATCH-FIX-OPENSUSE clang-disable-ada-extension.patch idoenmez@suse.de -- Don't run gcc for ada files
|
2012-04-17 09:02:19 +00:00
|
|
|
Patch3: clang-disable-ada-extension.patch
|
2012-03-21 14:01:15 +00:00
|
|
|
# PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit
|
2012-04-17 09:02:19 +00:00
|
|
|
Patch4: default-to-i586.patch
|
2013-06-26 10:07:09 +00:00
|
|
|
Patch5: llvm-config-lib64.patch
|
2012-12-04 14:41:04 +00:00
|
|
|
# PATCH-FIX-OPENSUSE arm_suse_support.diff --Enable ARM suse toolchain support
|
|
|
|
Patch6: arm_suse_support.diff
|
2013-11-21 13:46:44 +00:00
|
|
|
Patch7: cmake-host-triple.patch
|
2013-08-28 11:07:57 +00:00
|
|
|
# PATCH-FIX-OPENSUSE aarch64-suse-support.patch -- Enable AArch64 suse toolchain support
|
2013-11-21 13:46:44 +00:00
|
|
|
Patch8: aarch64-suse-support.patch
|
|
|
|
Patch9: arm-remove-xfails.diff
|
2013-12-02 11:10:33 +00:00
|
|
|
# PATCH-FIX-OPENSUSE asan-disable-hugemalloctest.patch -- Disable ASAN HugeMallocTest
|
|
|
|
Patch10: asan-disable-hugemalloctest.patch
|
2011-04-20 13:53:17 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-05-30 14:35:16 +00:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2013-06-14 14:24:42 +00:00
|
|
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
2011-11-06 22:03:33 +00:00
|
|
|
%if 0%{?suse_version} >= 1220
|
|
|
|
BuildRequires: binutils-devel >= 2.21.90
|
|
|
|
%endif
|
2011-05-30 14:35:16 +00:00
|
|
|
BuildRequires: bison
|
2011-04-20 13:53:17 +00:00
|
|
|
BuildRequires: fdupes
|
2011-05-30 14:35:16 +00:00
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: gcc-c++
|
2012-10-27 11:09:20 +00:00
|
|
|
BuildRequires: groff
|
2012-04-27 10:00:32 +00:00
|
|
|
BuildRequires: libffi-devel
|
2011-05-30 14:35:16 +00:00
|
|
|
BuildRequires: libtool
|
2012-05-10 11:37:54 +00:00
|
|
|
BuildRequires: python-base
|
2013-07-03 13:13:45 +00:00
|
|
|
Requires: libLLVM = %{version}-%{release}
|
2012-12-14 18:14:26 +00:00
|
|
|
# llvm does not work on ppc, only ppc64
|
|
|
|
ExcludeArch: ppc
|
2011-04-20 13:53:17 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
LLVM is a compiler infrastructure designed for compile-time,
|
|
|
|
link-time, runtime, and idle-time optimization of programs from
|
|
|
|
arbitrary programming languages.
|
|
|
|
|
2011-05-30 14:35:16 +00:00
|
|
|
The compiler infrastructure includes mirror sets of programming
|
2011-04-20 13:53:17 +00:00
|
|
|
tools as well as libraries with equivalent functionality.
|
|
|
|
|
2013-07-03 13:13:45 +00:00
|
|
|
%package -n libLLVM
|
|
|
|
Summary: Libraries for LLVM
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n libLLVM
|
|
|
|
This package contains the shared libraries needed for LLVM.
|
|
|
|
|
2011-04-20 13:53:17 +00:00
|
|
|
%package devel
|
2013-07-03 13:13:45 +00:00
|
|
|
Summary: Header Files for LLVM
|
2011-04-20 13:53:17 +00:00
|
|
|
Group: Development/Languages/Other
|
2011-05-30 14:35:16 +00:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: libffi-devel
|
|
|
|
Requires: libstdc++-devel >= 3.4
|
2012-11-12 12:33:06 +00:00
|
|
|
Obsoletes: llvm-doc < %{version}
|
|
|
|
Provides: llvm-doc = %{version}
|
2011-04-20 13:53:17 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains library and header files needed to develop
|
|
|
|
new native programs that use the LLVM infrastructure.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for LLVM
|
|
|
|
Group: Documentation/HTML
|
2011-05-30 14:35:16 +00:00
|
|
|
Requires: %{name} = %{version}
|
2011-04-20 13:53:17 +00:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
Documentation for the LLVM compiler infrastructure.
|
|
|
|
|
|
|
|
%package clang
|
|
|
|
Summary: CLANG frontend for LLVM
|
|
|
|
Group: Development/Languages/Other
|
2011-05-30 14:35:16 +00:00
|
|
|
Requires: %{name} = %{version}
|
2012-04-23 12:57:07 +00:00
|
|
|
Requires: binutils
|
2013-07-03 13:13:45 +00:00
|
|
|
Requires: libclang = %{version}-%{release}
|
2012-04-23 12:57:07 +00:00
|
|
|
Requires: libstdc++-devel
|
2011-07-11 12:41:14 +00:00
|
|
|
Provides: clang
|
2011-04-20 13:53:17 +00:00
|
|
|
|
|
|
|
%description clang
|
|
|
|
This package contains the clang (C language) frontend for LLVM.
|
|
|
|
|
2013-07-03 13:13:45 +00:00
|
|
|
%package -n libclang
|
|
|
|
Summary: Library files needed for clang
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n libclang
|
|
|
|
This package contains the shared libraries needed for clang.
|
|
|
|
|
2011-05-30 14:35:16 +00:00
|
|
|
%package clang-devel
|
2011-04-20 13:53:17 +00:00
|
|
|
Summary: CLANG frontend for LLVM (devel package)
|
|
|
|
Group: Development/Languages/Other
|
2011-10-25 18:59:57 +00:00
|
|
|
Requires: clang = %{version}
|
2012-03-20 12:39:06 +00:00
|
|
|
Requires: llvm-devel = %{version}
|
2011-04-20 13:53:17 +00:00
|
|
|
|
|
|
|
%description clang-devel
|
|
|
|
This package contains the clang (C language) frontend for LLVM.
|
|
|
|
(development files)
|
|
|
|
|
|
|
|
%package vim-plugins
|
|
|
|
Summary: Vim plugins for LLVM
|
|
|
|
Group: Productivity/Text/Editors
|
|
|
|
Requires: vim
|
|
|
|
|
|
|
|
%description vim-plugins
|
|
|
|
This package contains vim plugins for LLVM like syntax highlighting.
|
|
|
|
|
2013-12-04 08:20:44 +00:00
|
|
|
%package -n python-clang
|
|
|
|
Summary: Python bindings for libclang
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
Requires: libclang = %{version}
|
|
|
|
Requires: python
|
|
|
|
|
|
|
|
%description -n python-clang
|
|
|
|
This package contains the Python bindings to clang (C language) frontend for LLVM.
|
|
|
|
|
2011-04-20 13:53:17 +00:00
|
|
|
%prep
|
2013-11-19 09:12:59 +00:00
|
|
|
%setup -q -n %{name}
|
2012-04-17 09:02:19 +00:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
2013-06-26 10:07:09 +00:00
|
|
|
%if "%{_lib}" == "lib64"
|
|
|
|
%patch5 -p1
|
|
|
|
%endif
|
2012-12-04 14:41:04 +00:00
|
|
|
%patch6 -p1
|
2013-11-21 13:46:44 +00:00
|
|
|
%patch7 -p1
|
2013-05-09 09:06:53 +00:00
|
|
|
%patch8 -p1
|
2013-11-21 13:46:44 +00:00
|
|
|
%patch9
|
2013-12-02 11:10:33 +00:00
|
|
|
%patch10 -p1
|
2011-09-29 20:33:54 +00:00
|
|
|
|
2012-03-21 15:15:58 +00:00
|
|
|
# We hardcode i586
|
|
|
|
rm tools/clang/test/Driver/x86_features.c
|
|
|
|
|
2013-06-19 22:35:16 +00:00
|
|
|
# lib64 related problems on 64bit
|
|
|
|
%if "%{_lib}" == "lib64"
|
|
|
|
rm tools/clang/test/Driver/linux-ld.c
|
|
|
|
%endif
|
|
|
|
|
2011-05-29 16:36:18 +00:00
|
|
|
sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
|
2012-04-17 09:02:19 +00:00
|
|
|
sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
|
|
|
|
|
2013-06-19 22:06:48 +00:00
|
|
|
%if "%{_lib}" == "lib64"
|
|
|
|
# Nasty hardcoded path
|
2013-11-19 10:02:27 +00:00
|
|
|
sed -i s,"/lib/","/lib64/",g tools/clang/lib/Driver/Tools.cpp \
|
|
|
|
tools/clang/test/Driver/dyld-prefix.c
|
|
|
|
sed -i s,"}lib{","}lib64{",g tools/clang/test/Preprocessor/iwithprefix.c
|
2013-06-19 22:06:48 +00:00
|
|
|
%endif
|
|
|
|
|
2012-04-24 10:10:57 +00:00
|
|
|
# Only enable target archs otherwise llvm-config is messed up
|
2013-11-21 13:44:50 +00:00
|
|
|
%ifarch %{ix86} x86_64
|
|
|
|
sed -i s,"subdirectories = .*","subdirectories = R600 X86", lib/Target/LLVMBuild.txt
|
2013-08-06 07:56:07 +00:00
|
|
|
%endif
|
|
|
|
|
2013-10-10 07:50:55 +00:00
|
|
|
%ifarch %arm
|
2013-08-06 07:56:07 +00:00
|
|
|
sed -i s,"subdirectories = .*","subdirectories = ARM", lib/Target/LLVMBuild.txt
|
|
|
|
%endif
|
|
|
|
|
2013-08-21 11:04:48 +00:00
|
|
|
%ifarch ppc64
|
|
|
|
sed -i s,"subdirectories = .*","subdirectories = PowerPC", lib/Target/LLVMBuild.txt
|
|
|
|
%endif
|
|
|
|
|
2013-08-28 11:02:17 +00:00
|
|
|
%ifarch s390x
|
2013-08-28 11:05:00 +00:00
|
|
|
sed -i s,"subdirectories = .*","subdirectories = SystemZ", lib/Target/LLVMBuild.txt
|
2013-08-28 11:02:17 +00:00
|
|
|
%endif
|
|
|
|
|
2012-04-25 09:38:22 +00:00
|
|
|
sed -i s,"IntelJITEvents OProfileJIT","", lib/ExecutionEngine/LLVMBuild.txt
|
|
|
|
echo > utils/unittest/LLVMBuild.txt
|
2012-04-24 10:10:57 +00:00
|
|
|
|
2011-04-20 13:53:17 +00:00
|
|
|
%build
|
2011-05-26 11:59:52 +00:00
|
|
|
TOPLEVEL=$PWD
|
2012-04-26 10:53:01 +00:00
|
|
|
mkdir stage1 stage2
|
2011-12-05 13:38:51 +00:00
|
|
|
pushd stage1
|
2013-05-24 11:34:11 +00:00
|
|
|
|
2013-07-04 11:56:15 +00:00
|
|
|
# Define host-triple
|
|
|
|
%ifarch %{ix86}
|
|
|
|
%define host_triple i586-suse-linux
|
|
|
|
%endif
|
|
|
|
%ifarch x86_64
|
|
|
|
%define host_triple x86_64-suse-linux
|
|
|
|
%endif
|
|
|
|
%ifarch armv6hl
|
|
|
|
%define host_triple armv6hl-suse-linux-gnueabi
|
|
|
|
%endif
|
|
|
|
%ifarch armv7hl
|
|
|
|
%define host_triple armv7hl-suse-linux-gnueabi
|
|
|
|
%endif
|
2013-08-26 09:23:45 +00:00
|
|
|
%ifarch aarch64
|
|
|
|
%define host_triple aarch64-suse-linux
|
|
|
|
%endif
|
2013-07-04 14:19:01 +00:00
|
|
|
%ifarch ppc64
|
2013-07-04 14:12:02 +00:00
|
|
|
%define host_triple powerpc64-suse-linux
|
2013-07-17 12:55:50 +00:00
|
|
|
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g ../cmake/modules/AddLLVM.cmake
|
2013-07-04 14:12:02 +00:00
|
|
|
%endif
|
2013-08-28 11:02:17 +00:00
|
|
|
%ifarch s390x
|
|
|
|
%define host_triple s390x-suse-linux
|
2013-08-29 08:55:00 +00:00
|
|
|
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"SystemZ"',g ../cmake/modules/AddLLVM.cmake
|
2013-12-04 10:10:13 +00:00
|
|
|
rm -rf ../projects/compiler-rt
|
2013-08-28 11:02:17 +00:00
|
|
|
%endif
|
2013-07-04 11:56:15 +00:00
|
|
|
|
2013-06-14 14:24:42 +00:00
|
|
|
cmake -G "Unix Makefiles" \
|
2013-06-20 12:28:28 +00:00
|
|
|
-DBUILD_SHARED_LIBS=OFF \
|
2013-06-19 12:42:23 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2013-11-20 20:37:39 +00:00
|
|
|
-DLLVM_ENABLE_ASSERTIONS=ON \
|
2013-11-19 09:12:59 +00:00
|
|
|
-DLLVM_TARGETS_TO_BUILD=host \
|
2013-07-17 12:55:50 +00:00
|
|
|
-DCMAKE_C_FLAGS="-O0" \
|
|
|
|
-DCMAKE_CXX_FLAGS="-O0" \
|
2013-07-04 11:56:15 +00:00
|
|
|
-DLLVM_HOST_TRIPLE=%{host_triple} \
|
2013-06-19 12:42:23 +00:00
|
|
|
..
|
2011-04-20 13:53:17 +00:00
|
|
|
|
2013-08-13 07:19:17 +00:00
|
|
|
make %{?_smp_mflags} VERBOSE=1 clang
|
2011-05-26 11:59:52 +00:00
|
|
|
|
2011-12-05 13:38:51 +00:00
|
|
|
popd
|
|
|
|
pushd stage2
|
2011-05-29 16:36:18 +00:00
|
|
|
|
2013-06-14 14:24:42 +00:00
|
|
|
export CC=$TOPLEVEL/stage1/bin/clang
|
|
|
|
export CXX=$TOPLEVEL/stage1/bin/clang++
|
2012-03-21 14:01:15 +00:00
|
|
|
|
2013-06-14 14:24:42 +00:00
|
|
|
cmake -G "Unix Makefiles" \
|
2013-08-13 07:19:17 +00:00
|
|
|
%ifnarch ppc64
|
2013-06-14 14:24:42 +00:00
|
|
|
-DBUILD_SHARED_LIBS=ON \
|
2013-08-13 07:19:17 +00:00
|
|
|
%endif
|
2013-06-19 12:42:23 +00:00
|
|
|
%ifarch %arm ppc64
|
2013-08-13 07:19:17 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2013-06-19 12:42:23 +00:00
|
|
|
%else
|
2013-06-14 14:24:42 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
2013-07-04 11:56:15 +00:00
|
|
|
-DLLVM_HOST_TRIPLE=%{host_triple} \
|
2013-06-19 12:42:23 +00:00
|
|
|
%endif
|
2013-06-14 14:24:42 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
2013-08-22 10:59:54 +00:00
|
|
|
%ifarch armv6hl
|
2013-08-28 10:58:33 +00:00
|
|
|
-DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
|
|
|
|
-DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
|
2013-08-22 10:59:54 +00:00
|
|
|
%endif
|
2013-07-04 11:56:15 +00:00
|
|
|
%ifarch armv7hl
|
2013-06-14 14:24:42 +00:00
|
|
|
-DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \
|
|
|
|
-DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \
|
2012-07-16 10:36:51 +00:00
|
|
|
%endif
|
2013-06-19 22:06:48 +00:00
|
|
|
%if "%{_lib}" == "lib64"
|
2013-06-14 14:24:42 +00:00
|
|
|
-DLLVM_LIBDIR_SUFFIX=64 \
|
2013-06-19 19:08:01 +00:00
|
|
|
-DCLANG_RESOURCE_DIR=../%{_lib}/clang/%{_release_version} \
|
2012-12-04 14:41:04 +00:00
|
|
|
%endif
|
2013-06-14 14:24:42 +00:00
|
|
|
-DLLVM_REQUIRES_RTTI=ON \
|
|
|
|
-DLLVM_ENABLE_TIMESTAMPS=OFF \
|
2013-11-20 20:33:12 +00:00
|
|
|
-DLLVM_ENABLE_ASSERTIONS=ON \
|
2013-06-14 14:24:42 +00:00
|
|
|
-DLLVM_ENABLE_PIC=ON \
|
2012-12-04 14:41:04 +00:00
|
|
|
%if 0%{?suse_version} >= 1220
|
2013-06-14 14:24:42 +00:00
|
|
|
-DLLVM_BINUTILS_INCDIR=/usr/include \
|
2012-12-04 14:41:04 +00:00
|
|
|
%endif
|
2013-11-19 09:12:59 +00:00
|
|
|
%ifarch %{ix86} x86_64
|
|
|
|
-DLLVM_TARGETS_TO_BUILD="host;R600" \
|
|
|
|
%else
|
|
|
|
-DLLVM_TARGETS_TO_BUILD=host \
|
2013-05-24 11:21:52 +00:00
|
|
|
%endif
|
2013-06-19 12:42:23 +00:00
|
|
|
..
|
2012-03-21 14:01:15 +00:00
|
|
|
|
2013-08-13 07:19:17 +00:00
|
|
|
make %{?_smp_mflags} VERBOSE=1
|
2011-04-20 13:53:17 +00:00
|
|
|
|
|
|
|
%check
|
2012-04-26 10:53:01 +00:00
|
|
|
cd stage2
|
2013-10-23 06:01:59 +00:00
|
|
|
%ifnarch armv7hl armv7l
|
2012-07-16 10:36:51 +00:00
|
|
|
%if 0%{!?qemu_user_space_build:1}
|
|
|
|
# we just do not have enough memory with qemu emulation
|
2013-06-14 14:24:42 +00:00
|
|
|
|
2013-06-19 22:06:48 +00:00
|
|
|
%if "%{_lib}" == "lib64"
|
|
|
|
ln -s lib lib64
|
|
|
|
%endif
|
|
|
|
|
2013-11-21 13:45:49 +00:00
|
|
|
make check-all
|
2012-07-16 10:36:51 +00:00
|
|
|
%endif
|
2013-10-23 06:01:59 +00:00
|
|
|
%endif
|
2011-04-20 13:53:17 +00:00
|
|
|
|
|
|
|
%install
|
2012-04-26 10:53:01 +00:00
|
|
|
cd stage2
|
2013-06-14 14:24:42 +00:00
|
|
|
make install DESTDIR=%{buildroot}
|
2011-05-26 11:59:52 +00:00
|
|
|
cd ..
|
|
|
|
|
2012-11-12 12:21:50 +00:00
|
|
|
# Build man/html pages
|
|
|
|
cd docs
|
2013-01-11 11:56:52 +00:00
|
|
|
# Docs are prebuilt due to sphinx dependency -- cartman
|
|
|
|
#make -f Makefile.sphinx html man
|
2012-11-12 12:21:50 +00:00
|
|
|
rm -rf %{buildroot}/usr/docs
|
2013-06-14 14:24:42 +00:00
|
|
|
|
2013-06-19 14:58:47 +00:00
|
|
|
mkdir -p %{buildroot}%{_docdir}/llvm/html
|
|
|
|
mkdir -p %{buildroot}/usr/share/man/man1
|
|
|
|
cp -r _build/man/* %{buildroot}/usr/share/man/man1
|
|
|
|
cp -r _build/html/* %{buildroot}%{_docdir}/llvm/html
|
2012-03-21 16:39:54 +00:00
|
|
|
|
2012-11-12 12:33:06 +00:00
|
|
|
cd ../tools/clang/docs
|
2012-11-14 18:30:05 +00:00
|
|
|
mkdir -p %{buildroot}%{_docdir}/llvm-clang/html
|
2013-06-19 14:58:47 +00:00
|
|
|
cp -r _build/man/* %{buildroot}/usr/share/man/man1
|
|
|
|
cp -r _build/html/* %{buildroot}%{_docdir}/llvm-clang/html
|
2012-11-12 12:33:06 +00:00
|
|
|
cd ../../..
|
|
|
|
|
2011-04-20 13:53:17 +00:00
|
|
|
# install scan-build et al
|
2011-09-01 14:35:13 +00:00
|
|
|
install -d %{buildroot}%{_datadir}/clang
|
2011-05-29 16:36:18 +00:00
|
|
|
install -d %{buildroot}%{py_sitedir}
|
|
|
|
|
2011-04-20 13:53:17 +00:00
|
|
|
pushd tools/clang/tools
|
|
|
|
for file in scan-build/ccc-analyzer scan-build/scan-build \
|
|
|
|
scan-view/scan-view; do
|
|
|
|
install $file %{buildroot}%{_bindir}
|
|
|
|
done
|
|
|
|
for file in scan-build/scanview.css scan-build/sorttable.js; do
|
2011-09-01 14:35:13 +00:00
|
|
|
install -m 644 $file %{buildroot}%{_datadir}/clang/
|
2011-04-20 13:53:17 +00:00
|
|
|
done
|
|
|
|
for file in scan-view/Reporter.py scan-view/ScanView.py \
|
|
|
|
scan-view/startfile.py; do
|
|
|
|
install -m 644 $file %{buildroot}%{py_sitedir}
|
|
|
|
done
|
|
|
|
install -d %{buildroot}%{py_sitedir}/Resources/
|
|
|
|
for file in scan-view/Resources/*; do
|
|
|
|
install -m 644 $file %{buildroot}%{py_sitedir}/Resources/
|
|
|
|
done
|
|
|
|
popd
|
2013-12-04 08:20:44 +00:00
|
|
|
|
|
|
|
# install python bindings
|
|
|
|
install -d %{buildroot}%{py_sitedir}/clang
|
|
|
|
pushd tools/clang/bindings/python
|
|
|
|
cp clang/*.py %{buildroot}%{py_sitedir}/clang
|
|
|
|
install -d %{buildroot}%{_docdir}/python-clang/examples/cindex
|
|
|
|
cp -r examples %{buildroot}%{_docdir}/python-clang
|
|
|
|
install -d %{buildroot}%{_docdir}/python-clang/tests/cindex/INPUTS
|
|
|
|
cp -r tests %{buildroot}%{_docdir}/python-clang
|
|
|
|
popd
|
2011-04-20 13:53:17 +00:00
|
|
|
pushd %{buildroot}%{_bindir}
|
|
|
|
ln -s ccc-analyzer c++-analyzer
|
|
|
|
popd
|
|
|
|
|
2012-07-20 11:25:55 +00:00
|
|
|
%if 0%{?suse_version} >= 1220
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/bfd-plugins
|
|
|
|
ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/
|
|
|
|
%endif
|
|
|
|
|
2011-04-20 13:53:17 +00:00
|
|
|
sed -i 's,RealBin/bin/clang,RealBin/clang,' \
|
|
|
|
%{buildroot}%{_bindir}/scan-build
|
|
|
|
|
|
|
|
sed -i 's,RealBin/bin/ccc-analyzer,RealBin/ccc-analyzer,' \
|
|
|
|
%{buildroot}%{_bindir}/scan-build
|
|
|
|
|
|
|
|
sed -i 's,RealBin/bin/ccc-analyzer,RealBin/ccc-analyzer,' \
|
|
|
|
%{buildroot}%{_bindir}/scan-build
|
|
|
|
|
2011-09-01 14:35:13 +00:00
|
|
|
sed -i 's,$RealBin/sorttable.js,%{_datadir}/clang/sorttable.js,' \
|
2011-04-20 13:53:17 +00:00
|
|
|
%{buildroot}%{_bindir}/scan-build
|
|
|
|
|
2011-09-01 14:35:13 +00:00
|
|
|
sed -i 's,$RealBin/scanview.css,%{_datadir}/clang/scanview.css,' \
|
2011-04-20 13:53:17 +00:00
|
|
|
%{buildroot}%{_bindir}/scan-build
|
|
|
|
|
|
|
|
sed -i 's,RealBin/bin,RealBin,' \
|
|
|
|
%{buildroot}%{_bindir}/scan-build
|
|
|
|
|
|
|
|
install -m 755 -d %{buildroot}%{_datadir}/vim/site/syntax/
|
|
|
|
install -m 644 utils/vim/*.vim %{buildroot}%{_datadir}/vim/site/syntax/
|
|
|
|
mv utils/vim/README utils/vim/README.vim
|
|
|
|
|
2011-06-02 11:29:39 +00:00
|
|
|
# Stuff we don't want to include
|
2012-04-22 19:23:50 +00:00
|
|
|
rm %{buildroot}%{_libdir}/BugpointPasses.*
|
|
|
|
rm %{buildroot}%{_libdir}/LLVMHello.*
|
2013-06-19 16:08:16 +00:00
|
|
|
rm %{buildroot}%{_libdir}/libgtest*
|
2013-06-19 20:06:27 +00:00
|
|
|
rm %{buildroot}%{_mandir}/man1/lit.1
|
2011-06-02 11:29:39 +00:00
|
|
|
|
2013-06-14 14:24:42 +00:00
|
|
|
# Remove cmake files
|
|
|
|
rm -rf %{buildroot}/usr/share/llvm/cmake
|
|
|
|
|
2011-04-20 13:53:17 +00:00
|
|
|
%fdupes -s %{buildroot}%{_docdir}/%{name}
|
|
|
|
%fdupes -s %{buildroot}%{_docdir}/%{name}-doc
|
|
|
|
|
2013-07-03 13:13:45 +00:00
|
|
|
%post -n libLLVM -p /sbin/ldconfig
|
|
|
|
%postun -n libLLVM -p /sbin/ldconfig
|
2011-10-25 18:59:57 +00:00
|
|
|
|
2013-07-03 13:13:45 +00:00
|
|
|
%post -n libclang -p /sbin/ldconfig
|
|
|
|
%postun -n libclang -p /sbin/ldconfig
|
2011-10-25 18:59:57 +00:00
|
|
|
|
|
|
|
%post clang-devel -p /sbin/ldconfig
|
|
|
|
%postun clang-devel -p /sbin/ldconfig
|
2011-04-20 13:53:17 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/bugpoint
|
|
|
|
%{_bindir}/llc
|
|
|
|
%{_bindir}/lli
|
2013-11-19 10:52:51 +00:00
|
|
|
%{_bindir}/lli-child-target
|
2011-04-20 13:53:17 +00:00
|
|
|
%{_bindir}/macho-dump
|
|
|
|
%exclude %{_bindir}/%{name}-config
|
|
|
|
%{_bindir}/%{name}*
|
|
|
|
%{_bindir}/opt
|
2013-06-19 23:41:11 +00:00
|
|
|
%exclude %{_mandir}/man1/%{name}-config.1%{ext_man}
|
2013-06-19 14:58:47 +00:00
|
|
|
%{_mandir}/man1/bugpoint.1%{ext_man}
|
|
|
|
%{_mandir}/man1/tblgen.1%{ext_man}
|
|
|
|
%{_mandir}/man1/llc.1%{ext_man}
|
|
|
|
%{_mandir}/man1/lli.1%{ext_man}
|
|
|
|
%{_mandir}/man1/llvm*.1%{ext_man}
|
|
|
|
%{_mandir}/man1/FileCheck.1%{ext_man}
|
|
|
|
%{_mandir}/man1/opt.1%{ext_man}
|
2011-04-20 13:53:17 +00:00
|
|
|
|
2013-07-03 13:13:45 +00:00
|
|
|
%files -n libLLVM
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/libLLVM*
|
|
|
|
|
2011-04-20 13:53:17 +00:00
|
|
|
%files clang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/clang
|
2011-05-29 16:36:18 +00:00
|
|
|
%{_bindir}/clang-*
|
2011-04-20 13:53:17 +00:00
|
|
|
%{_bindir}/clang++
|
2013-05-08 10:24:33 +00:00
|
|
|
%{_bindir}/clang-format
|
2011-04-20 13:53:17 +00:00
|
|
|
%{_bindir}/ccc-analyzer
|
|
|
|
%{_bindir}/c++-analyzer
|
2013-11-19 10:52:51 +00:00
|
|
|
%{_bindir}/git-clang-format
|
2011-04-20 13:53:17 +00:00
|
|
|
%{_bindir}/scan-build
|
|
|
|
%{_bindir}/scan-view
|
|
|
|
%{py_sitedir}/ScanView.py
|
|
|
|
%{py_sitedir}/Reporter.py
|
|
|
|
%{py_sitedir}/startfile.py
|
|
|
|
%{py_sitedir}/Resources
|
2011-09-01 14:35:13 +00:00
|
|
|
%{_datadir}/clang
|
2013-06-19 19:05:31 +00:00
|
|
|
%{_mandir}/man1/clang.1%{ext_man}
|
2013-08-13 07:19:17 +00:00
|
|
|
%{_libdir}/libLTO.*
|
2011-11-06 22:03:33 +00:00
|
|
|
%if 0%{?suse_version} >= 1220
|
|
|
|
%{_libdir}/LLVMgold.so
|
2012-07-20 11:25:55 +00:00
|
|
|
%{_libdir}/bfd-plugins/
|
2011-11-06 22:03:33 +00:00
|
|
|
%endif
|
2012-04-26 13:19:08 +00:00
|
|
|
%{_libdir}/clang
|
2013-11-22 16:21:56 +00:00
|
|
|
%ifnarch %arm aarch64 s390 s390x
|
2013-06-20 09:24:43 +00:00
|
|
|
%{_libdir}/clang/%{_release_version}/lib/linux/
|
2013-08-13 07:19:17 +00:00
|
|
|
%endif
|
2011-04-20 13:53:17 +00:00
|
|
|
|
2013-07-03 13:13:45 +00:00
|
|
|
%files -n libclang
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%exclude %{_libdir}/libclang.so
|
|
|
|
%{_libdir}/libclang*.so
|
|
|
|
%{_libdir}/libclang.so.*
|
2013-08-13 07:19:17 +00:00
|
|
|
%ifarch ppc64
|
|
|
|
%{_libdir}/libclang*.a
|
|
|
|
%endif
|
2013-07-03 13:13:45 +00:00
|
|
|
|
2011-04-20 13:53:17 +00:00
|
|
|
%files clang-devel
|
|
|
|
%defattr(-,root,root)
|
2013-07-03 13:13:45 +00:00
|
|
|
%{_libdir}/libclang.so
|
2011-04-20 13:53:17 +00:00
|
|
|
%{_includedir}/clang
|
|
|
|
%{_includedir}/clang-c
|
2013-06-19 23:09:04 +00:00
|
|
|
%doc %{_docdir}/llvm-clang
|
2011-04-20 13:53:17 +00:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_bindir}/%{name}-config
|
2013-06-19 14:58:47 +00:00
|
|
|
%doc %{_mandir}/man1/%{name}-config.1%{ext_man}
|
2011-05-30 14:35:16 +00:00
|
|
|
%{_includedir}/%{name}/
|
|
|
|
%{_includedir}/%{name}-c/
|
2013-06-19 23:09:04 +00:00
|
|
|
%doc %{_docdir}/%{name}
|
2011-04-20 13:53:17 +00:00
|
|
|
|
|
|
|
%files vim-plugins
|
|
|
|
%defattr(-,root,root,-)
|
2013-06-19 14:58:47 +00:00
|
|
|
%doc utils/vim/README.vim
|
2011-04-20 13:53:17 +00:00
|
|
|
%{_datadir}/vim/
|
|
|
|
|
2013-12-04 08:20:44 +00:00
|
|
|
%files -n python-clang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{py_sitedir}/clang
|
|
|
|
%{py_sitedir}/clang/__init__.py
|
|
|
|
%{py_sitedir}/clang/cindex.py
|
|
|
|
%{py_sitedir}/clang/enumerations.py
|
|
|
|
|
|
|
|
%doc %{_docdir}/python-clang
|
|
|
|
|
2011-04-20 13:53:17 +00:00
|
|
|
%changelog
|