|
David Goerger |
1e780f7 |
%global clang_tools_binaries \
|
|
David Goerger |
1e780f7 |
%{_bindir}/clang-apply-replacements \
|
|
|
5617ce0 |
%{_bindir}/clang-change-namespace \
|
|
David Goerger |
1e780f7 |
%{_bindir}/clang-include-fixer \
|
|
David Goerger |
1e780f7 |
%{_bindir}/clang-query \
|
|
|
5617ce0 |
%{_bindir}/clang-reorder-fields \
|
|
David Goerger |
1e780f7 |
%{_bindir}/clang-rename \
|
|
David Goerger |
1e780f7 |
%{_bindir}/clang-tidy
|
|
David Goerger |
1e780f7 |
|
|
David Goerger |
1e780f7 |
%global clang_binaries \
|
|
David Goerger |
1e780f7 |
%{_bindir}/clang \
|
|
David Goerger |
1e780f7 |
%{_bindir}/clang++ \
|
|
|
5617ce0 |
%{_bindir}/clang-4.0 \
|
|
David Goerger |
1e780f7 |
%{_bindir}/clang-check \
|
|
David Goerger |
1e780f7 |
%{_bindir}/clang-cl \
|
|
|
5617ce0 |
%{_bindir}/clang-cpp \
|
|
|
5617ce0 |
%{_bindir}/clang-format \
|
|
|
5617ce0 |
%{_bindir}/clang-import-test \
|
|
|
5617ce0 |
%{_bindir}/clang-offload-bundler
|
|
David Goerger |
1e780f7 |
|
|
|
ce584ee |
%if 0%{?fedora}
|
|
|
ce584ee |
%bcond_without python3
|
|
|
ce584ee |
%else
|
|
|
ce584ee |
%bcond_with python3
|
|
|
ce584ee |
%endif
|
|
|
ce584ee |
|
|
|
4a6eb83 |
Name: clang
|
|
|
35b5199 |
Version: 4.0.0
|
|
|
ce584ee |
Release: 4%{?dist}
|
|
|
4a6eb83 |
Summary: A C language family front-end for LLVM
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
License: NCSA
|
|
|
4a6eb83 |
URL: http://llvm.org
|
|
|
0706e2f |
Source0: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
|
|
David Goerger |
1e780f7 |
Source1: http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.xz
|
|
|
ce584ee |
Source2: http://llvm.org/releases/%{version}/test-suite-%{version}.src.tar.xz
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
Source100: clang-config.h
|
|
|
4a6eb83 |
|
|
|
5617ce0 |
Patch0: 0001-CMake-Fix-pthread-handling-for-out-of-tree-builds.patch
|
|
|
ce584ee |
# This patch is required when the test suite is using python-lit 0.5.0.
|
|
|
ce584ee |
Patch1: 0001-litsupport-Add-compatibility-cludge-so-it-still-work.patch
|
|
|
5617ce0 |
|
|
|
4a6eb83 |
BuildRequires: cmake
|
|
|
4a6eb83 |
BuildRequires: llvm-devel = %{version}
|
|
|
4a6eb83 |
BuildRequires: libxml2-devel
|
|
|
6a62f09 |
BuildRequires: llvm-static = %{version}
|
|
|
37c9494 |
BuildRequires: perl-generators
|
|
|
ccee982 |
BuildRequires: ncurses-devel
|
|
|
ce584ee |
|
|
|
ce584ee |
# These build dependencies are required for the test suite.
|
|
|
ce584ee |
%if %with python3
|
|
|
ce584ee |
BuildRequires: python3-lit
|
|
|
ce584ee |
%else
|
|
|
ce584ee |
BuildRequires: python2-lit
|
|
|
ce584ee |
%endif
|
|
|
ce584ee |
|
|
|
ce584ee |
BuildRequires: zlib-devel
|
|
|
ce584ee |
BuildRequires: tcl
|
|
|
ce584ee |
BuildRequires: python-virtualenv
|
|
|
ce584ee |
BuildRequires: libstdc++-static
|
|
|
ce584ee |
|
|
|
4a6eb83 |
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
# clang requires gcc, clang++ requires libstdc++-devel
|
|
|
4a6eb83 |
# - https://bugzilla.redhat.com/show_bug.cgi?id=1021645
|
|
|
4a6eb83 |
# - https://bugzilla.redhat.com/show_bug.cgi?id=1158594
|
|
|
4a6eb83 |
Requires: libstdc++-devel
|
|
|
4a6eb83 |
Requires: gcc-c++
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%description
|
|
|
4a6eb83 |
clang: noun
|
|
|
4a6eb83 |
1. A loud, resonant, metallic sound.
|
|
|
4a6eb83 |
2. The strident call of a crane or goose.
|
|
|
4a6eb83 |
3. C-language family front-end toolkit.
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
The goal of the Clang project is to create a new C, C++, Objective C
|
|
|
4a6eb83 |
and Objective C++ front-end for the LLVM compiler. Its tools are built
|
|
|
4a6eb83 |
as libraries and designed to be loosely-coupled and extensible.
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%package libs
|
|
|
4a6eb83 |
Summary: Runtime library for clang
|
|
|
0b2ece3 |
Requires: compiler-rt%{?_isa} >= %{version}
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%description libs
|
|
|
4a6eb83 |
Runtime library for clang.
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%package devel
|
|
|
4a6eb83 |
Summary: Development header files for clang.
|
|
|
4a6eb83 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%description devel
|
|
|
4a6eb83 |
Development header files for clang.
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%package analyzer
|
|
|
4a6eb83 |
Summary: A source code analysis framework
|
|
|
4a6eb83 |
License: NCSA and MIT
|
|
|
4a6eb83 |
BuildArch: noarch
|
|
|
4a6eb83 |
Requires: %{name} = %{version}-%{release}
|
|
|
4a6eb83 |
# not picked up automatically since files are currently not installed in
|
|
|
4a6eb83 |
# standard Python hierarchies yet
|
|
|
4a6eb83 |
Requires: python
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%description analyzer
|
|
|
4a6eb83 |
The Clang Static Analyzer consists of both a source code analysis
|
|
|
4a6eb83 |
framework and a standalone tool that finds bugs in C and Objective-C
|
|
|
4a6eb83 |
programs. The standalone tool is invoked from the command-line, and is
|
|
|
4a6eb83 |
intended to run in tandem with a build of a project or code base.
|
|
|
4a6eb83 |
|
|
David Goerger |
1e780f7 |
%package tools-extra
|
|
David Goerger |
1e780f7 |
Summary: Extra tools for clang
|
|
David Goerger |
1e780f7 |
Requires: llvm-libs%{?_isa} = %{version}
|
|
David Goerger |
1e780f7 |
Requires: clang-libs%{?_isa} = %{version}
|
|
David Goerger |
1e780f7 |
|
|
David Goerger |
1e780f7 |
%description tools-extra
|
|
David Goerger |
1e780f7 |
A set of extra tools built using Clang's tooling API.
|
|
David Goerger |
1e780f7 |
|
|
|
4a6eb83 |
%prep
|
|
David Goerger |
1e780f7 |
%setup -T -q -b 1 -n clang-tools-extra-%{version}.src
|
|
|
5617ce0 |
%patch0 -p1 -b .pthread-fix
|
|
|
ce584ee |
|
|
|
ce584ee |
%setup -T -q -b 2 -n test-suite-%{version}.src
|
|
|
ce584ee |
%patch1 -p1 -b .lit-fix
|
|
|
ce584ee |
|
|
|
0706e2f |
%setup -q -n cfe-%{version}.src
|
|
David Goerger |
1e780f7 |
|
|
David Goerger |
1e780f7 |
mv ../clang-tools-extra-%{version}.src tools/extra
|
|
David Goerger |
1e780f7 |
|
|
|
4a6eb83 |
%build
|
|
|
4a6eb83 |
mkdir -p _build
|
|
|
4a6eb83 |
cd _build
|
|
|
4a6eb83 |
%cmake .. \
|
|
|
b486bb1 |
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
|
|
4a6eb83 |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
4a6eb83 |
-DLLVM_CONFIG:FILEPATH=/usr/bin/llvm-config-%{__isa_bits} \
|
|
|
4a6eb83 |
\
|
|
|
4a6eb83 |
-DCLANG_ENABLE_ARCMT:BOOL=ON \
|
|
|
4a6eb83 |
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
|
|
|
4a6eb83 |
-DCLANG_INCLUDE_DOCS:BOOL=ON \
|
|
David Goerger |
1e780f7 |
-DCLANG_INCLUDE_TESTS:BOOL=OFF \
|
|
|
4a6eb83 |
-DCLANG_PLUGIN_SUPPORT:BOOL=ON \
|
|
|
455a190 |
-DENABLE_LINKER_BUILD_ID:BOOL=ON \
|
|
|
f38da92 |
-DLLVM_ENABLE_EH=ON \
|
|
|
f38da92 |
-DLLVM_ENABLE_RTTI=ON \
|
|
|
4a6eb83 |
\
|
|
|
6a62f09 |
-DCLANG_BUILD_EXAMPLES:BOOL=OFF \
|
|
|
ccee982 |
%if 0%{?__isa_bits} == 64
|
|
|
ccee982 |
-DLLVM_LIBDIR_SUFFIX=64 \
|
|
|
ccee982 |
%else
|
|
|
ccee982 |
-DLLVM_LIBDIR_SUFFIX= \
|
|
|
ccee982 |
%endif
|
|
|
6a62f09 |
-DLIB_SUFFIX=
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
make %{?_smp_mflags}
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%install
|
|
|
4a6eb83 |
cd _build
|
|
|
4a6eb83 |
make install DESTDIR=%{buildroot}
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
# multilib fix
|
|
|
4a6eb83 |
mv -v %{buildroot}%{_includedir}/clang/Config/config{,-%{__isa_bits}}.h
|
|
|
4a6eb83 |
install -m 0644 %{SOURCE100} %{buildroot}%{_includedir}/clang/Config/config.h
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
# remove git integration
|
|
|
4a6eb83 |
rm -vf %{buildroot}%{_bindir}/git-clang-format
|
|
|
4a6eb83 |
# remove editor integrations (bbedit, sublime, emacs, vim)
|
|
|
4a6eb83 |
rm -vf %{buildroot}%{_datadir}/clang/clang-format-bbedit.applescript
|
|
|
4a6eb83 |
rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py*
|
|
|
4a6eb83 |
rm -vf %{buildroot}%{_datadir}/clang/clang-format.el
|
|
|
4a6eb83 |
rm -vf %{buildroot}%{_datadir}/clang/clang-format.py*
|
|
David Goerger |
1e780f7 |
# clang-tools-extra
|
|
David Goerger |
1e780f7 |
rm -vf %{buildroot}%{_datadir}/clang/clang-include-fixer.py
|
|
David Goerger |
1e780f7 |
rm -vf %{buildroot}%{_datadir}/clang/clang-tidy-diff.py
|
|
David Goerger |
1e780f7 |
rm -vf %{buildroot}%{_datadir}/clang/run-clang-tidy.py
|
|
David Goerger |
1e780f7 |
rm -vf %{buildroot}%{_datadir}/clang/run-find-all-symbols.py
|
|
|
5617ce0 |
rm -vf %{buildroot}%{_datadir}/clang/clang-include-fixer.el
|
|
|
5617ce0 |
rm -vf %{buildroot}%{_datadir}/clang/clang-rename.el
|
|
|
5617ce0 |
rm -vf %{buildroot}%{_datadir}/clang/clang-rename.py
|
|
|
4a6eb83 |
# remove diff reformatter
|
|
|
4a6eb83 |
rm -vf %{buildroot}%{_datadir}/clang/clang-format-diff.py*
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%check
|
|
|
4a6eb83 |
# requires lit.py from LLVM utilities
|
|
|
4a6eb83 |
#cd _build
|
|
|
4a6eb83 |
#make check-all
|
|
|
4a6eb83 |
|
|
|
ce584ee |
mkdir -p %{_builddir}/test-suite-%{version}.src/_build
|
|
|
ce584ee |
cd %{_builddir}/test-suite-%{version}.src/_build
|
|
|
ce584ee |
|
|
|
ce584ee |
# FIXME: Using the cmake macro adds -Werror=format-security to the C/CXX flags,
|
|
|
ce584ee |
# which causes the test suite to fail to build.
|
|
|
ce584ee |
cmake .. -DCMAKE_C_COMPILER=%{buildroot}/usr/bin/clang \
|
|
|
ce584ee |
-DCMAKE_CXX_COMPILER=%{buildroot}/usr/bin/clang++
|
|
|
ce584ee |
make %{?_smp_mflags} check
|
|
|
ce584ee |
|
|
|
ce584ee |
|
|
|
4a6eb83 |
%files
|
|
|
0700b77 |
%{_libdir}/clang/
|
|
David Goerger |
1e780f7 |
%{clang_binaries}
|
|
|
6a62f09 |
%{_bindir}/c-index-test
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%files libs
|
|
|
4a6eb83 |
%{_libdir}/*.so.*
|
|
|
086d270 |
%{_libdir}/*.so
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%files devel
|
|
|
4a6eb83 |
%{_includedir}/clang/
|
|
|
4a6eb83 |
%{_includedir}/clang-c/
|
|
|
ccee982 |
%{_libdir}/cmake/
|
|
|
4a6eb83 |
%dir %{_datadir}/clang/
|
|
|
4a6eb83 |
|
|
|
4a6eb83 |
%files analyzer
|
|
|
4a6eb83 |
%{_bindir}/scan-view
|
|
|
4a6eb83 |
%{_bindir}/scan-build
|
|
|
6a62f09 |
%{_bindir}/scan-build
|
|
|
6a62f09 |
%{_libexecdir}/ccc-analyzer
|
|
|
6a62f09 |
%{_libexecdir}/c++-analyzer
|
|
|
6a62f09 |
%{_datadir}/scan-view/
|
|
|
6a62f09 |
%{_datadir}/scan-build/
|
|
|
4a6eb83 |
%{_mandir}/man1/scan-build.1.*
|
|
|
4a6eb83 |
|
|
David Goerger |
1e780f7 |
%files tools-extra
|
|
David Goerger |
1e780f7 |
%{clang_tools_binaries}
|
|
David Goerger |
1e780f7 |
%{_bindir}/find-all-symbols
|
|
David Goerger |
1e780f7 |
%{_bindir}/modularize
|
|
David Goerger |
1e780f7 |
|
|
|
4a6eb83 |
%changelog
|
|
|
ce584ee |
* Mon Apr 03 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-4
|
|
|
ce584ee |
- Run llvm test-suite
|
|
|
ce584ee |
|
|
|
f38da92 |
* Mon Mar 27 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-3
|
|
|
f38da92 |
- Enable eh/rtti, which are required by lldb.
|
|
|
f38da92 |
|
|
|
5617ce0 |
* Fri Mar 24 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-2
|
|
|
5617ce0 |
- Fix clang-tools-extra build
|
|
|
5617ce0 |
- Fix install
|
|
|
5617ce0 |
|
|
|
018a18d |
* Thu Mar 23 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
|
|
|
35b5199 |
- clang 4.0.0 final release
|
|
|
35b5199 |
|
|
David Goerger |
1e780f7 |
* Mon Mar 20 2017 David Goerger <david.goerger@yale.edu> - 3.9.1-3
|
|
David Goerger |
1e780f7 |
- add clang-tools-extra rhbz#1328091
|
|
David Goerger |
1e780f7 |
|
|
|
455a190 |
* Thu Mar 16 2017 Tom Stellard <tstellar@redhat.com> - 3.9.1-2
|
|
|
455a190 |
- Enable build-id by default rhbz#1432403
|
|
|
455a190 |
|
|
|
7dd65de |
* Thu Mar 02 2017 Dave Airlie <airlied@redhat.com> - 3.9.1-1
|
|
|
7dd65de |
- clang 3.9.1 final release
|
|
|
7dd65de |
|
|
|
dda9809 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.0-4
|
|
|
dda9809 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
dda9809 |
|
|
|
0b2ece3 |
* Mon Nov 14 2016 Nathaniel McCallum <npmccallum@redhat.com> - 3.9.0-3
|
|
|
0b2ece3 |
- Add Requires: compiler-rt to clang-libs.
|
|
|
0b2ece3 |
- Without this, compiling with certain CFLAGS breaks.
|
|
|
0b2ece3 |
|
|
|
3137849 |
* Tue Nov 1 2016 Peter Robinson <pbrobinson@fedoraproject.org> 3.9.0-2
|
|
|
3137849 |
- Rebuild for new arches
|
|
|
3137849 |
|
|
|
7816b61 |
* Fri Oct 14 2016 Dave Airlie <airlied@redhat.com> - 3.9.0-1
|
|
|
7816b61 |
- clang 3.9.0 final release
|
|
|
7816b61 |
|
|
|
fd63610 |
* Fri Jul 01 2016 Stephan Bergmann <sbergman@redhat.com> - 3.8.0-2
|
|
|
fd63610 |
- Resolves: rhbz#1282645 add GCC abi_tag support
|
|
|
fd63610 |
|
|
|
0706e2f |
* Thu Mar 10 2016 Dave Airlie <airlied@redhat.com> 3.8.0-1
|
|
|
0706e2f |
- clang 3.8.0 final release
|
|
|
0706e2f |
|
|
|
679f934 |
* Thu Mar 03 2016 Dave Airlie <airlied@redhat.com> 3.8.0-0.4
|
|
|
679f934 |
- clang 3.8.0rc3
|
|
|
679f934 |
|
|
|
086d270 |
* Wed Feb 24 2016 Dave Airlie <airlied@redhat.com> - 3.8.0-0.3
|
|
|
086d270 |
- package all libs into clang-libs.
|
|
|
086d270 |
|
|
|
b486bb1 |
* Wed Feb 24 2016 Dave Airlie <airlied@redhat.com> 3.8.0-0.2
|
|
|
b486bb1 |
- enable dynamic linking of clang against llvm
|
|
|
b486bb1 |
|
|
|
6a62f09 |
* Thu Feb 18 2016 Dave Airlie <airlied@redhat.com> - 3.8.0-0.1
|
|
|
6a62f09 |
- clang 3.8.0rc2
|
|
|
6a62f09 |
|
|
|
61789e8 |
* Fri Feb 12 2016 Dave Airlie <airlied@redhat.com> 3.7.1-4
|
|
|
61789e8 |
- rebuild against latest llvm packages
|
|
|
650e4fe |
- add BuildRequires llvm-static
|
|
|
61789e8 |
|
|
|
f615040 |
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-3
|
|
|
f615040 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
f615040 |
|
|
|
7e4861f |
* Thu Jan 28 2016 Dave Airlie <airlied@redhat.com> 3.7.1-2
|
|
|
7e4861f |
- just accept clang includes moving to /usr/lib64, upstream don't let much else happen
|
|
|
7e4861f |
|
|
|
7e4861f |
* Thu Jan 28 2016 Dave Airlie <airlied@redhat.com> 3.7.1-1
|
|
|
7e4861f |
- initial build in Fedora.
|
|
|
7e4861f |
|
|
|
4a6eb83 |
* Tue Oct 06 2015 Jan Vcelak <jvcelak@fedoraproject.org> 3.7.0-100
|
|
|
4a6eb83 |
- initial version using cmake build system
|