2011-04-20 15:53:17 +02:00
|
|
|
#
|
2011-06-03 15:52:45 +02:00
|
|
|
# spec file for package llvm
|
2011-04-20 15:53:17 +02:00
|
|
|
#
|
2013-01-09 14:17:01 +01:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-04-20 15:53:17 +02: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 13:39:06 +01:00
|
|
|
|
2013-05-22 12:59:02 +02:00
|
|
|
%define _revision 182457
|
2013-05-08 11:19:05 +02:00
|
|
|
%define _release_version 3.3
|
2013-05-15 09:42:45 +02:00
|
|
|
%define _supported_archs "arm,aarch64,powerpc,x86"
|
2011-05-26 13:59:52 +02:00
|
|
|
|
2011-04-20 15:53:17 +02:00
|
|
|
Name: llvm
|
2013-05-22 12:59:02 +02:00
|
|
|
Version: 3.2.91
|
2011-12-22 16:34:18 +01:00
|
|
|
Release: 0
|
2011-05-30 16:35:16 +02:00
|
|
|
Summary: Low Level Virtual Machine
|
2011-12-22 16:34:18 +01:00
|
|
|
License: NCSA
|
2011-05-30 16:35:16 +02:00
|
|
|
Group: Development/Languages/Other
|
2011-12-22 16:34:18 +01:00
|
|
|
Url: http://www.llvm.org
|
2013-05-08 12:24:33 +02:00
|
|
|
Source0: %{name}-%{_release_version}.tar.bz2
|
2011-04-20 15:53:17 +02:00
|
|
|
Source100: %{name}-rpmlintrc
|
2011-05-29 18:36:18 +02:00
|
|
|
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
|
|
|
|
Patch1: set-revision.patch
|
2011-08-12 12:31:37 +02:00
|
|
|
# PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features
|
2012-04-17 11:02:19 +02:00
|
|
|
Patch2: assume-opensuse.patch
|
2011-12-25 16:48:32 +01:00
|
|
|
# PATCH-FIX-OPENSUSE clang-disable-ada-extension.patch idoenmez@suse.de -- Don't run gcc for ada files
|
2012-04-17 11:02:19 +02:00
|
|
|
Patch3: clang-disable-ada-extension.patch
|
2012-03-21 15:01:15 +01:00
|
|
|
# PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit
|
2012-04-17 11:02:19 +02:00
|
|
|
Patch4: default-to-i586.patch
|
2012-12-03 14:52:22 +01:00
|
|
|
Patch5: llvm-config-lib64.patch
|
2012-12-04 15:41:04 +01:00
|
|
|
# PATCH-FIX-OPENSUSE arm_suse_support.diff --Enable ARM suse toolchain support
|
|
|
|
Patch6: arm_suse_support.diff
|
|
|
|
# PATCH-FIX-OPENSUSE disable_neon_in_armv7.diff -- Disable use of neon in armv7 openSUSE
|
|
|
|
Patch7: disable_neon_in_armv7.diff
|
2013-05-09 11:06:53 +02:00
|
|
|
# PATCH-FIX-OPENSUSE unreachable-code.patch -- Unreachable code warning triggered on SLE
|
|
|
|
Patch8: unreachable-code.patch
|
2011-04-20 15:53:17 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-05-30 16:35:16 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2011-11-06 23:03:33 +01:00
|
|
|
%if 0%{?suse_version} >= 1220
|
|
|
|
BuildRequires: binutils-devel >= 2.21.90
|
|
|
|
%endif
|
2011-05-30 16:35:16 +02:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: chrpath
|
2011-04-20 15:53:17 +02:00
|
|
|
BuildRequires: fdupes
|
2011-05-30 16:35:16 +02:00
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: gcc-c++
|
2012-10-27 13:09:20 +02:00
|
|
|
BuildRequires: groff
|
2012-04-17 11:02:19 +02:00
|
|
|
%ifarch x86_64
|
|
|
|
# For tests
|
|
|
|
BuildRequires: glibc-devel-32bit
|
|
|
|
%endif
|
2012-04-27 12:00:32 +02:00
|
|
|
BuildRequires: libffi-devel
|
2011-05-30 16:35:16 +02:00
|
|
|
BuildRequires: libtool
|
2012-05-10 13:37:54 +02:00
|
|
|
BuildRequires: python-base
|
2012-12-14 19:14:26 +01:00
|
|
|
# llvm does not work on ppc, only ppc64
|
|
|
|
ExcludeArch: ppc
|
2011-04-20 15:53:17 +02: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 16:35:16 +02:00
|
|
|
The compiler infrastructure includes mirror sets of programming
|
2011-04-20 15:53:17 +02:00
|
|
|
tools as well as libraries with equivalent functionality.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Libraries and Header Files for LLVM
|
|
|
|
Group: Development/Languages/Other
|
2011-05-30 16:35:16 +02:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: libffi-devel
|
|
|
|
Requires: libstdc++-devel >= 3.4
|
2012-11-12 13:33:06 +01:00
|
|
|
Obsoletes: llvm-doc < %{version}
|
|
|
|
Provides: llvm-doc = %{version}
|
2011-04-20 15:53:17 +02: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 16:35:16 +02:00
|
|
|
Requires: %{name} = %{version}
|
2011-04-20 15:53:17 +02:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
Documentation for the LLVM compiler infrastructure.
|
|
|
|
|
|
|
|
%package clang
|
|
|
|
Summary: CLANG frontend for LLVM
|
|
|
|
Group: Development/Languages/Other
|
2011-05-30 16:35:16 +02:00
|
|
|
Requires: %{name} = %{version}
|
2012-04-23 14:57:07 +02:00
|
|
|
Requires: binutils
|
|
|
|
Requires: libstdc++-devel
|
2011-07-11 14:41:14 +02:00
|
|
|
Provides: clang
|
2011-04-20 15:53:17 +02:00
|
|
|
|
|
|
|
%description clang
|
|
|
|
This package contains the clang (C language) frontend for LLVM.
|
|
|
|
|
2011-05-30 16:35:16 +02:00
|
|
|
%package clang-devel
|
2011-04-20 15:53:17 +02:00
|
|
|
Summary: CLANG frontend for LLVM (devel package)
|
|
|
|
Group: Development/Languages/Other
|
2011-10-25 20:59:57 +02:00
|
|
|
Requires: clang = %{version}
|
2012-03-20 13:39:06 +01:00
|
|
|
Requires: llvm-devel = %{version}
|
2011-04-20 15:53:17 +02: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.
|
|
|
|
|
|
|
|
%prep
|
2013-05-08 12:24:33 +02:00
|
|
|
%setup -q -n %{name}-%{_release_version}
|
2012-04-17 11:02:19 +02:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
2012-12-03 14:52:22 +01:00
|
|
|
%if "%{_lib}" == "lib64"
|
|
|
|
%patch5 -p1
|
|
|
|
%endif
|
2012-12-04 15:41:04 +01:00
|
|
|
%ifarch %arm
|
|
|
|
%patch6 -p1
|
|
|
|
%endif
|
|
|
|
%ifarch armv7l armv7hl
|
|
|
|
%patch7 -p0
|
|
|
|
%endif
|
2013-05-09 11:06:53 +02:00
|
|
|
%patch8 -p1
|
2011-09-29 22:33:54 +02:00
|
|
|
|
2012-03-21 16:15:58 +01:00
|
|
|
# We hardcode i586
|
|
|
|
rm tools/clang/test/Driver/x86_features.c
|
|
|
|
|
2012-11-12 11:33:39 +01:00
|
|
|
# lib64 related problems on 64bit
|
|
|
|
%if "%{_lib}" == "lib64"
|
|
|
|
rm tools/clang/test/Driver/linux-ld.c
|
|
|
|
%endif
|
|
|
|
|
2011-05-29 18:36:18 +02:00
|
|
|
sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
|
2012-04-17 11:02:19 +02:00
|
|
|
sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
|
|
|
|
|
2011-11-07 10:17:59 +01:00
|
|
|
# Nasty hardcoded path
|
2013-05-08 14:32:52 +02:00
|
|
|
sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp tools/clang/test/Preprocessor/iwithprefix.c
|
2011-11-07 10:17:59 +01:00
|
|
|
|
2012-04-24 12:10:57 +02:00
|
|
|
# Only enable target archs otherwise llvm-config is messed up
|
2013-05-15 09:42:45 +02:00
|
|
|
sed -i s,"subdirectories = .*","subdirectories = AArch64 ARM PowerPC X86", lib/Target/LLVMBuild.txt
|
2012-04-25 11:38:22 +02:00
|
|
|
sed -i s,"IntelJITEvents OProfileJIT","", lib/ExecutionEngine/LLVMBuild.txt
|
|
|
|
echo > utils/unittest/LLVMBuild.txt
|
2012-04-24 12:10:57 +02:00
|
|
|
|
2011-04-20 15:53:17 +02:00
|
|
|
%build
|
2011-05-26 13:59:52 +02:00
|
|
|
TOPLEVEL=$PWD
|
2012-07-20 13:25:55 +02:00
|
|
|
# as-needed avoids linking LLVMgold to LTO, just because cmake places -lLTO before the .o file is used
|
|
|
|
export SUSE_ASNEEDED=0
|
2012-04-26 12:53:01 +02:00
|
|
|
mkdir stage1 stage2
|
2011-12-05 14:38:51 +01:00
|
|
|
pushd stage1
|
2012-12-03 14:52:22 +01:00
|
|
|
mkdir Release
|
2011-05-26 13:59:52 +02:00
|
|
|
|
2013-05-24 13:34:11 +02:00
|
|
|
# autotools ignore --libdir
|
|
|
|
ln -s lib Release/lib64
|
|
|
|
|
2011-12-02 13:22:27 +01:00
|
|
|
../configure \
|
2012-03-21 15:01:15 +01:00
|
|
|
--enable-optimized \
|
|
|
|
--disable-assertions \
|
|
|
|
--with-optimize-option="-O0" \
|
2013-01-08 10:52:39 +01:00
|
|
|
%ifarch %arm
|
2012-07-16 12:36:51 +02:00
|
|
|
--disable-sjlj-exceptions \
|
|
|
|
--disable-werror --enable-checking=release \
|
2013-01-08 10:52:39 +01:00
|
|
|
%ifarch armv5el armv5tel
|
|
|
|
--with-arch=armv5te --with-float=soft --with-mode=arm \
|
2012-12-04 15:41:04 +01:00
|
|
|
--build=armv5tel-suse-linux-gnueabi --host=armv5tel-suse-linux-gnueabi --target=armv5tel-suse-linux-gnueabi \
|
|
|
|
%endif
|
|
|
|
%ifarch armv7l armv7hl
|
2013-01-08 10:52:39 +01:00
|
|
|
--with-arch=armv7-a \
|
|
|
|
--with-tune=cortex-a9 \
|
|
|
|
--with-float=hard \
|
|
|
|
--with-fpu=vfpv3-d16 \
|
|
|
|
--with-abi=aapcs-vfp \
|
2012-12-04 15:41:04 +01:00
|
|
|
--build=armv7hl-suse-linux-gnueabi --host=armv7hl-suse-linux-gnueabi --target=armv7hl-suse-linux-gnueabi \
|
|
|
|
%if 0%{?suse_version} >= 1220
|
2013-01-08 10:52:39 +01:00
|
|
|
--with-mode=thumb \
|
2012-12-04 15:41:04 +01:00
|
|
|
%else
|
2013-01-08 10:52:39 +01:00
|
|
|
--with-mode=arm \
|
|
|
|
%endif
|
2012-12-04 15:41:04 +01:00
|
|
|
%endif
|
2012-07-16 12:36:51 +02:00
|
|
|
%endif
|
2012-03-21 15:01:15 +01:00
|
|
|
--enable-targets=host
|
2011-04-20 15:53:17 +02:00
|
|
|
|
2012-11-12 11:06:01 +01:00
|
|
|
make %{?_smp_mflags} clang-only
|
2011-05-26 13:59:52 +02:00
|
|
|
|
2011-12-05 14:38:51 +01:00
|
|
|
popd
|
|
|
|
pushd stage2
|
2011-05-29 18:36:18 +02:00
|
|
|
|
2012-12-03 22:14:21 +01:00
|
|
|
# autotools ignore --libdir
|
2013-05-24 13:21:52 +02:00
|
|
|
%ifnarch ppc64
|
|
|
|
mkdir Release+Debug
|
2012-09-11 14:08:15 +02:00
|
|
|
ln -s lib Release+Debug/lib64
|
2013-05-24 13:21:52 +02:00
|
|
|
%else
|
|
|
|
mkdir Release
|
|
|
|
ln -s lib Release/lib64
|
2012-12-03 22:14:21 +01:00
|
|
|
%endif
|
2011-12-05 14:38:51 +01:00
|
|
|
|
2012-04-26 12:53:01 +02:00
|
|
|
export CC=$TOPLEVEL/stage1/Release/bin/clang
|
|
|
|
export CXX=$TOPLEVEL/stage1/Release/bin/clang++
|
2012-03-21 15:01:15 +01:00
|
|
|
|
2013-01-08 10:52:39 +01:00
|
|
|
%ifarch armv7l armv7hl
|
|
|
|
# This fixes the armv7 build. (Allow to run stage2 without problem)
|
|
|
|
export CFLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16"
|
|
|
|
export CXXFLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16"
|
|
|
|
%endif
|
|
|
|
|
2012-03-21 15:01:15 +01:00
|
|
|
../configure \
|
2012-04-24 12:10:57 +02:00
|
|
|
--prefix=%{_prefix} \
|
2012-03-21 15:01:15 +01:00
|
|
|
--enable-optimized \
|
|
|
|
--disable-assertions \
|
|
|
|
--enable-pic \
|
|
|
|
--disable-timestamps \
|
2011-11-06 23:03:33 +01:00
|
|
|
%if 0%{?suse_version} >= 1220
|
2012-03-21 15:01:15 +01:00
|
|
|
--with-binutils-include=/usr/include \
|
2012-07-16 12:36:51 +02:00
|
|
|
%endif
|
2013-01-08 10:52:39 +01:00
|
|
|
%ifarch %arm
|
2012-12-04 15:41:04 +01:00
|
|
|
--with-optimize-option="-U_GLIBCXX_ATOMIC_BUILTINS" \
|
2013-05-24 13:21:52 +02:00
|
|
|
--disable-sjlj-exceptions \
|
|
|
|
--disable-werror --enable-checking=release \
|
2013-01-08 10:52:39 +01:00
|
|
|
%ifarch armv5el armv5tel
|
2013-05-24 13:21:52 +02:00
|
|
|
--with-arch=armv5te --with-float=soft --with-mode=arm \
|
2012-12-04 15:41:04 +01:00
|
|
|
%endif
|
|
|
|
%ifarch armv7l armv7hl
|
2013-05-24 13:21:52 +02:00
|
|
|
--with-arch=armv7-a \
|
|
|
|
--with-tune=cortex-a9 \
|
|
|
|
--with-float=hard \
|
|
|
|
--with-fpu=vfpv3-d16 \
|
|
|
|
--with-abi=aapcs-vfp \
|
2012-12-04 15:41:04 +01:00
|
|
|
%if 0%{?suse_version} >= 1220
|
2013-05-24 13:21:52 +02:00
|
|
|
--with-mode=thumb \
|
2012-12-04 15:41:04 +01:00
|
|
|
%else
|
2013-05-24 13:21:52 +02:00
|
|
|
--with-mode=arm \
|
2012-12-04 15:41:04 +01:00
|
|
|
%endif
|
2013-01-08 10:52:39 +01:00
|
|
|
%endif
|
2013-05-24 13:21:52 +02:00
|
|
|
--enable-targets=arm \
|
2013-01-08 10:52:39 +01:00
|
|
|
%else
|
2013-05-24 13:21:52 +02:00
|
|
|
--enable-targets=%{_supported_archs} \
|
2011-04-20 15:53:17 +02:00
|
|
|
%endif
|
2013-05-24 13:21:52 +02:00
|
|
|
%ifnarch ppc64
|
2012-09-10 12:35:03 +02:00
|
|
|
--enable-debug-symbols \
|
2013-05-24 13:21:52 +02:00
|
|
|
--enable-debug-runtime \
|
|
|
|
%endif
|
|
|
|
--with-clang-resource-dir="../%{_lib}/clang/%{_release_version}"
|
2012-03-21 15:01:15 +01:00
|
|
|
|
|
|
|
make %{?_smp_mflags} REQUIRES_RTTI=1
|
2011-04-20 15:53:17 +02:00
|
|
|
|
|
|
|
%check
|
2012-04-26 12:53:01 +02:00
|
|
|
cd stage2
|
2012-07-16 12:36:51 +02:00
|
|
|
%if 0%{!?qemu_user_space_build:1}
|
|
|
|
# we just do not have enough memory with qemu emulation
|
2011-04-20 15:53:17 +02:00
|
|
|
make check
|
2012-03-21 15:01:15 +01:00
|
|
|
cd tools/clang
|
|
|
|
make test
|
2012-07-16 12:36:51 +02:00
|
|
|
%endif
|
2011-04-20 15:53:17 +02:00
|
|
|
|
|
|
|
%install
|
2012-04-26 12:53:01 +02:00
|
|
|
cd stage2
|
2011-05-29 18:36:18 +02:00
|
|
|
%makeinstall
|
2011-05-26 13:59:52 +02:00
|
|
|
cd ..
|
|
|
|
|
2011-11-29 14:23:48 +01:00
|
|
|
# Fixup libdir
|
|
|
|
%if "%{_lib}" == "lib64"
|
2012-03-22 00:56:05 +01:00
|
|
|
mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/lib64
|
2011-10-19 17:46:09 +02:00
|
|
|
%endif
|
|
|
|
|
2012-11-12 13:21:50 +01:00
|
|
|
# Build man/html pages
|
|
|
|
cd docs
|
2013-01-11 12:56:52 +01:00
|
|
|
# Docs are prebuilt due to sphinx dependency -- cartman
|
|
|
|
#make -f Makefile.sphinx html man
|
2012-11-12 13:21:50 +01:00
|
|
|
rm -rf %{buildroot}/usr/docs
|
2012-11-14 19:30:05 +01:00
|
|
|
mkdir -p %{buildroot}%{_docdir}/llvm
|
2013-01-11 14:27:39 +01:00
|
|
|
cp -r _build/man/* %{buildroot}/usr/share/man/man1
|
|
|
|
cp -r _build/html/* %{buildroot}%{_docdir}/llvm/
|
2012-03-21 17:39:54 +01:00
|
|
|
|
2012-11-12 13:33:06 +01:00
|
|
|
cd ../tools/clang/docs
|
2012-11-14 19:30:05 +01:00
|
|
|
mkdir -p %{buildroot}%{_docdir}/llvm-clang/html
|
|
|
|
cp *.txt %{buildroot}%{_docdir}/llvm-clang
|
|
|
|
cp *.css *.png *.html %{buildroot}%{_docdir}/llvm-clang/html
|
|
|
|
cp -r analyzer %{buildroot}%{_docdir}/llvm-clang
|
2012-11-12 13:33:06 +01:00
|
|
|
cd ../../..
|
|
|
|
|
2011-04-20 15:53:17 +02:00
|
|
|
# cleanup
|
|
|
|
file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
|
|
|
file %{buildroot}/%{_libdir}/%{name}/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
|
|
|
find %{buildroot}%{_includedir}/clang -name '*.tmp' -exec rm {} +
|
2012-03-21 20:19:14 +01:00
|
|
|
chmod -x %{buildroot}/%{_libdir}/*.a
|
2011-04-20 15:53:17 +02:00
|
|
|
|
|
|
|
# install scan-build et al
|
2011-09-01 16:35:13 +02:00
|
|
|
install -d %{buildroot}%{_datadir}/clang
|
2011-05-29 18:36:18 +02:00
|
|
|
install -d %{buildroot}%{py_sitedir}
|
|
|
|
|
2011-04-20 15:53:17 +02: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 16:35:13 +02:00
|
|
|
install -m 644 $file %{buildroot}%{_datadir}/clang/
|
2011-04-20 15:53:17 +02: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
|
|
|
|
pushd %{buildroot}%{_bindir}
|
|
|
|
ln -s ccc-analyzer c++-analyzer
|
|
|
|
popd
|
|
|
|
|
2012-07-20 13:25:55 +02: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 15:53:17 +02: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 16:35:13 +02:00
|
|
|
sed -i 's,$RealBin/sorttable.js,%{_datadir}/clang/sorttable.js,' \
|
2011-04-20 15:53:17 +02:00
|
|
|
%{buildroot}%{_bindir}/scan-build
|
|
|
|
|
2011-09-01 16:35:13 +02:00
|
|
|
sed -i 's,$RealBin/scanview.css,%{_datadir}/clang/scanview.css,' \
|
2011-04-20 15:53:17 +02: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 13:29:39 +02:00
|
|
|
# Stuff we don't want to include
|
2012-04-24 12:10:57 +02:00
|
|
|
rm %{buildroot}%{_libdir}/libclang.a
|
2012-04-22 21:23:50 +02:00
|
|
|
rm %{buildroot}%{_libdir}/BugpointPasses.*
|
|
|
|
rm %{buildroot}%{_libdir}/LLVMHello.*
|
2011-06-02 13:29:39 +02:00
|
|
|
|
2011-04-20 15:53:17 +02:00
|
|
|
%fdupes -s %{buildroot}%{_docdir}/%{name}
|
|
|
|
%fdupes -s %{buildroot}%{_docdir}/%{name}-doc
|
|
|
|
|
2012-04-26 15:19:08 +02:00
|
|
|
%post clang -p /sbin/ldconfig
|
2011-10-25 20:59:57 +02:00
|
|
|
|
|
|
|
%postun clang -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%post clang-devel -p /sbin/ldconfig
|
2011-09-02 09:56:10 +02:00
|
|
|
|
2011-10-25 20:59:57 +02:00
|
|
|
%postun clang-devel -p /sbin/ldconfig
|
2011-04-20 15:53:17 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/bugpoint
|
|
|
|
%{_bindir}/llc
|
|
|
|
%{_bindir}/lli
|
|
|
|
%{_bindir}/macho-dump
|
|
|
|
%exclude %{_bindir}/%{name}-config
|
|
|
|
%{_bindir}/%{name}*
|
|
|
|
%{_bindir}/opt
|
2011-05-30 16:35:16 +02:00
|
|
|
%{_mandir}/man1/bugpoint.1%{ext_man}
|
|
|
|
%exclude %{_mandir}/man1/lit.1%{ext_man}
|
2012-03-21 19:38:28 +01:00
|
|
|
%{_mandir}/man1/tblgen.1%{ext_man}
|
2011-05-30 16:35:16 +02:00
|
|
|
%{_mandir}/man1/llc.1%{ext_man}
|
|
|
|
%{_mandir}/man1/lli.1%{ext_man}
|
|
|
|
%exclude %{_mandir}/man1/%{name}-config.1%{ext_man}
|
|
|
|
%{_mandir}/man1/llvm*.1%{ext_man}
|
2012-11-12 15:12:30 +01:00
|
|
|
%{_mandir}/man1/FileCheck.1%{ext_man}
|
2011-05-30 16:35:16 +02:00
|
|
|
%{_mandir}/man1/opt.1%{ext_man}
|
2011-04-20 15:53:17 +02:00
|
|
|
|
|
|
|
%files clang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/clang
|
2011-05-29 18:36:18 +02:00
|
|
|
%{_bindir}/clang-*
|
2011-04-20 15:53:17 +02:00
|
|
|
%{_bindir}/clang++
|
2013-05-08 12:24:33 +02:00
|
|
|
%{_bindir}/clang-format
|
2011-09-29 22:33:54 +02:00
|
|
|
%{_bindir}/c-index-test
|
2011-04-20 15:53:17 +02:00
|
|
|
%{_bindir}/ccc-analyzer
|
|
|
|
%{_bindir}/c++-analyzer
|
|
|
|
%{_bindir}/scan-build
|
|
|
|
%{_bindir}/scan-view
|
|
|
|
%{py_sitedir}/ScanView.py
|
|
|
|
%{py_sitedir}/Reporter.py
|
|
|
|
%{py_sitedir}/startfile.py
|
|
|
|
%{py_sitedir}/Resources
|
2011-09-01 16:35:13 +02:00
|
|
|
%{_datadir}/clang
|
2011-04-20 15:53:17 +02:00
|
|
|
%{_mandir}/man1/clang.1.gz
|
2012-03-21 18:58:13 +01:00
|
|
|
%{_libdir}/libclang.so
|
2011-12-25 22:15:52 +01:00
|
|
|
%{_libdir}/libLTO.so
|
2011-12-22 17:10:59 +01:00
|
|
|
%{_libdir}/*profile*.a
|
2011-11-06 23:03:33 +01:00
|
|
|
%if 0%{?suse_version} >= 1220
|
|
|
|
%{_libdir}/LLVMgold.so
|
2012-07-20 13:25:55 +02:00
|
|
|
%{_libdir}/bfd-plugins/
|
2011-11-06 23:03:33 +01:00
|
|
|
%endif
|
2012-04-26 15:19:08 +02:00
|
|
|
%{_libdir}/clang
|
2011-04-20 15:53:17 +02:00
|
|
|
|
|
|
|
%files clang-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/clang
|
|
|
|
%{_includedir}/clang-c
|
2011-12-25 22:15:52 +01:00
|
|
|
%{_libdir}/libLTO.a
|
2011-10-25 20:59:57 +02:00
|
|
|
%{_libdir}/libclang*.a
|
2011-12-22 17:10:59 +01:00
|
|
|
%{_libdir}/*profile*.so
|
2012-11-14 11:15:00 +01:00
|
|
|
%doc %{_docdir}/llvm-clang
|
2011-04-20 15:53:17 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_bindir}/%{name}-config
|
2011-05-30 16:35:16 +02:00
|
|
|
%doc %{_mandir}/man1/%{name}-config.1%{ext_man}
|
|
|
|
%{_includedir}/%{name}/
|
|
|
|
%{_includedir}/%{name}-c/
|
2011-06-01 21:48:25 +02:00
|
|
|
%{_libdir}/libLLVM*
|
2012-11-12 13:33:06 +01:00
|
|
|
%doc %{_docdir}/%{name}
|
2011-04-20 15:53:17 +02:00
|
|
|
|
|
|
|
%files vim-plugins
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc utils/vim/README.vim
|
|
|
|
%{_datadir}/vim/
|
|
|
|
|
|
|
|
%changelog
|