Make this spec file support both system-version and multi-version.
This commit is contained in:
parent
0ef80bdd57
commit
a0e7adbc20
42
0001-fedora-PATCH-clang-Reorganize-gtest-integration.patch
Normal file
42
0001-fedora-PATCH-clang-Reorganize-gtest-integration.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From c6b921c8d833546946b70a8c2640032fd7c62461 Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <sguelton@redhat.com>
|
||||
Date: Thu, 25 Feb 2021 14:04:52 +0100
|
||||
Subject: [PATCH 1/6] [PATCH][clang] Reorganize gtest integration
|
||||
|
||||
---
|
||||
clang/CMakeLists.txt | 12 +++++-------
|
||||
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
|
||||
index 9e74014..0185276 100644
|
||||
--- a/clang/CMakeLists.txt
|
||||
+++ b/clang/CMakeLists.txt
|
||||
@@ -153,12 +153,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
|
||||
set(LLVM_UTILS_PROVIDED ON)
|
||||
set(CLANG_TEST_DEPS FileCheck count not)
|
||||
endif()
|
||||
- set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
|
||||
- if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
|
||||
- AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
- AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
|
||||
- add_subdirectory(${UNITTEST_DIR} utils/unittest)
|
||||
- endif()
|
||||
else()
|
||||
# Seek installed Lit.
|
||||
find_program(LLVM_LIT
|
||||
@@ -537,7 +531,11 @@ endif()
|
||||
|
||||
|
||||
if( CLANG_INCLUDE_TESTS )
|
||||
- if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
|
||||
+ set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
|
||||
+ if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
|
||||
+ AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
+ AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
|
||||
+ add_subdirectory(${UNITTEST_DIR} utils/unittest)
|
||||
add_subdirectory(unittests)
|
||||
list(APPEND CLANG_TEST_DEPS ClangUnitTests)
|
||||
list(APPEND CLANG_TEST_PARAMS
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
25
0003-fedora-PATCH-clang-Don-t-install-static-libraries.patch
Normal file
25
0003-fedora-PATCH-clang-Don-t-install-static-libraries.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 2c6cd40d016f492d53e16f1c7424a0d9878ae7ec Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Fri, 31 Jan 2020 11:04:57 -0800
|
||||
Subject: [PATCH 3/6] [PATCH][clang] Don't install static libraries
|
||||
|
||||
---
|
||||
clang/cmake/modules/AddClang.cmake | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake
|
||||
index 704278a..1737b24 100644
|
||||
--- a/clang/cmake/modules/AddClang.cmake
|
||||
+++ b/clang/cmake/modules/AddClang.cmake
|
||||
@@ -111,7 +111,7 @@ macro(add_clang_library name)
|
||||
if(TARGET ${lib})
|
||||
target_link_libraries(${lib} INTERFACE ${LLVM_COMMON_LIBS})
|
||||
|
||||
- if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN)
|
||||
+ if (ARG_SHARED AND (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN))
|
||||
set(export_to_clangtargets)
|
||||
if(${lib} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
|
||||
"clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
22
README.en.md
22
README.en.md
@ -1,22 +1,14 @@
|
||||
# clang
|
||||
|
||||
#### Description
|
||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||
clang: noun
|
||||
1. A loud, resonant, metallic sound.
|
||||
2. The strident call of a crane or goose.
|
||||
3. C-language family front-end toolkit.
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
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.
|
||||
|
||||
#### Contribution
|
||||
|
||||
|
||||
25
README.md
25
README.md
@ -1,25 +1,14 @@
|
||||
# clang
|
||||
|
||||
#### 介绍
|
||||
{**以下是码云平台说明,您可以替换此简介**
|
||||
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
||||
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
||||
clang: noun
|
||||
1. A loud, resonant, metallic sound.
|
||||
2. The strident call of a crane or goose.
|
||||
3. C-language family front-end toolkit.
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
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.
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
|
||||
388
clang.spec
388
clang.spec
@ -1,51 +1,128 @@
|
||||
%bcond_with sys_llvm
|
||||
%bcond_with check
|
||||
|
||||
%global maj_ver 12
|
||||
%global min_ver 0
|
||||
%global patch_ver 1
|
||||
%global clang_srcdir clang-%{version}.src
|
||||
%global clang_tools_srcdir clang-tools-extra-%{version}.src
|
||||
%global clang_version %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||
|
||||
Name: clang
|
||||
Version: 12.0.1
|
||||
Release: 3
|
||||
License: GPL-2.0-only and Apache-2.0 and MIT
|
||||
Summary: An "LLVM native" C/C++/Objective-C compiler
|
||||
%if %{with sys_llvm}
|
||||
%global pkg_name clang
|
||||
%global install_prefix %{_prefix}
|
||||
%else
|
||||
%global pkg_name clang%{maj_ver}
|
||||
%global install_prefix %{_libdir}/llvm%{maj_ver}
|
||||
%endif
|
||||
|
||||
%global install_bindir %{install_prefix}/bin
|
||||
%global install_includedir %{install_prefix}/include
|
||||
%if 0%{?__isa_bits} == 64
|
||||
%global install_libdir %{install_prefix}/lib64
|
||||
%else
|
||||
%global install_libdir %{install_prefix}/lib
|
||||
%endif
|
||||
%global install_libexecdir %{install_prefix}/libexec
|
||||
%global install_sharedir %{install_prefix}/share
|
||||
%global install_docdir %{install_sharedir}/doc
|
||||
|
||||
%global clang_srcdir clang-%{clang_version}.src
|
||||
%global clang_tools_srcdir clang-tools-extra-%{clang_version}.src
|
||||
%global max_link_jobs %{_smp_build_ncpus}
|
||||
|
||||
# Disable LTO as this causes crash if gcc lto enabled.
|
||||
%define _lto_cflags %{nil}
|
||||
|
||||
Name: %{pkg_name}
|
||||
Version: %{clang_version}
|
||||
Release: 4
|
||||
Summary: A C language family front-end for LLVM
|
||||
|
||||
License: NCSA
|
||||
URL: http://llvm.org
|
||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_srcdir}.tar.xz
|
||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_tools_srcdir}.tar.xz
|
||||
Source2: clang-config.h
|
||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}/%{clang_srcdir}.tar.xz
|
||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}/%{clang_tools_srcdir}.tar.xz
|
||||
|
||||
BuildRequires: cmake gcc-c++ python-sphinx git
|
||||
Patch1: 0001-fedora-PATCH-clang-Reorganize-gtest-integration.patch
|
||||
Patch2: 0003-fedora-PATCH-clang-Don-t-install-static-libraries.patch
|
||||
Patch201: support-ignored_and_replaced_opts.patch
|
||||
Patch202: support-print-c-function-prototype.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake
|
||||
BuildRequires: libatomic
|
||||
|
||||
%if %{with sys_llvm}
|
||||
BuildRequires: llvm-devel = %{version}
|
||||
BuildRequires: llvm-static = %{version}
|
||||
BuildRequires: llvm-static = %{version}
|
||||
BuildRequires: llvm-test = %{version}
|
||||
BuildRequires: llvm-googletest = %{version}
|
||||
BuildRequires: libxml2-devel perl-generators ncurses-devel emacs libatomic
|
||||
BuildRequires: python3-lit python3-sphinx python3-devel
|
||||
%else
|
||||
BuildRequires: llvm%{maj_ver}-devel = %{version}
|
||||
BuildRequires: llvm%{maj_ver}-static = %{version}
|
||||
BuildRequires: llvm%{maj_ver}-test = %{version}
|
||||
BuildRequires: llvm%{maj_ver}-googletest = %{version}
|
||||
%endif
|
||||
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: multilib-rpm-config
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: python3-lit >= %{version}
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: python3-recommonmark
|
||||
BuildRequires: python3-devel
|
||||
|
||||
BuildRequires: perl(Digest::MD5)
|
||||
BuildRequires: perl(File::Copy)
|
||||
BuildRequires: perl(File::Find)
|
||||
BuildRequires: perl(File::Path)
|
||||
BuildRequires: perl(File::Temp)
|
||||
BuildRequires: perl(FindBin)
|
||||
BuildRequires: perl(Hash::Util)
|
||||
BuildRequires: perl(lib)
|
||||
BuildRequires: perl(Term::ANSIColor)
|
||||
BuildRequires: perl(Text::ParseWords)
|
||||
BuildRequires: perl(Sys::Hostname)
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
Requires: libstdc++-devel
|
||||
Requires: gcc-c++
|
||||
|
||||
Requires: libstdc++-devel gcc-c++ emacs-filesystem
|
||||
Requires: %{name}-resource-filesystem = %{version}
|
||||
Provides: clang(major) = %{maj_ver}
|
||||
Provides: %{name}-libs = %{version}-%{release}
|
||||
Obsoletes: %{name}-libs < %{version}-%{release}
|
||||
Recommends: libomp = %{version}
|
||||
Recommends: compiler-rt = %{version}
|
||||
|
||||
Conflicts: compiler-rt < %{version}
|
||||
Conflicts: compiler-rt > %{version}
|
||||
|
||||
Patch0: support-ignored_and_replaced_opts.patch
|
||||
Patch1: support-print-c-function-prototype.patch
|
||||
Conflicts: compiler-rt < 11.0.0
|
||||
|
||||
%description
|
||||
The Clang project provides a language front-end and tooling infrastructure for\
|
||||
languages in the C language family (C, C++, Objective C/C++, OpenCL, CUDA, and\
|
||||
RenderScript) for the LLVM project. Both a GCC-compatible compiler driver (clang)\
|
||||
and an MSVC-compatible compiler driver (clang-cl.exe) are provided.\
|
||||
clang: noun
|
||||
1. A loud, resonant, metallic sound.
|
||||
2. The strident call of a crane or goose.
|
||||
3. C-language family front-end toolkit.
|
||||
|
||||
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.
|
||||
|
||||
Install compiler-rt if you want the Blocks C language extension or to
|
||||
enable sanitization and profiling options when building, and
|
||||
libomp-devel to enable -fopenmp.
|
||||
|
||||
%package libs
|
||||
Summary: Runtime library for clang
|
||||
Requires: %{name}-resource-filesystem%{?_isa} = %{version}
|
||||
Recommends: compiler-rt%{?_isa} = %{version}
|
||||
Recommends: libatomic%{?_isa}
|
||||
Recommends: libomp-devel%{_isa} = %{version}
|
||||
Recommends: libomp%{_isa} = %{version}
|
||||
|
||||
%description libs
|
||||
Runtime library for clang.
|
||||
|
||||
%package devel
|
||||
Summary: Development header files for clang.
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name}-tools-extra = %{version}-%{release}
|
||||
Summary: Development header files for clang
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Development header files for clang.
|
||||
@ -57,18 +134,12 @@ Provides: %{name}-resource-filesystem(major) = %{maj_ver}
|
||||
%description resource-filesystem
|
||||
This package owns the clang resouce directory: $libdir/clang/$version/
|
||||
|
||||
%package help
|
||||
Summary: Help manual for %{name}
|
||||
|
||||
%description help
|
||||
The %{name}-help package conatins man manual etc
|
||||
|
||||
%package analyzer
|
||||
Summary: A source code analysis framework
|
||||
License: NCSA and MIT
|
||||
BuildArch: noarch
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: python3
|
||||
|
||||
%description analyzer
|
||||
The Clang Static Analyzer consists of both a source code analysis
|
||||
@ -78,58 +149,61 @@ intended to run in tandem with a build of a project or code base.
|
||||
|
||||
%package tools-extra
|
||||
Summary: Extra tools for clang
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: emacs-filesystem
|
||||
|
||||
%description tools-extra
|
||||
A set of extra tools built using Clang's tooling API.
|
||||
|
||||
%package -n git-clang-format
|
||||
Summary: clang-format integration for git
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Integration of clang-format for git
|
||||
Requires: %{name}-tools-extra = %{version}-%{release}
|
||||
Requires: git
|
||||
Requires: python3
|
||||
|
||||
%description -n git-clang-format
|
||||
clang-format integration for git.
|
||||
|
||||
%prep
|
||||
%setup -T -q -b 1 -n %{clang_tools_srcdir}
|
||||
|
||||
pathfix.py -i %{__python3} -pn \
|
||||
clang-tidy/tool/*.py
|
||||
|
||||
%autosetup -n %{clang_srcdir} -p1
|
||||
%setup -q -n %{clang_srcdir}
|
||||
%autopatch -M200 -p2
|
||||
%autopatch -m200 -p1
|
||||
|
||||
# failing test case
|
||||
rm test/CodeGen/profile-filter.c
|
||||
|
||||
pathfix.py -i %{__python3} -pn \
|
||||
tools/clang-format/*.py \
|
||||
tools/clang-format/git-clang-format \
|
||||
utils/hmaptool/hmaptool \
|
||||
tools/scan-view/bin/scan-view
|
||||
|
||||
mv ../%{clang_tools_srcdir} tools/extra
|
||||
|
||||
%build
|
||||
|
||||
mkdir -p _build
|
||||
cd _build
|
||||
|
||||
|
||||
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
||||
|
||||
|
||||
%cmake .. \
|
||||
%cmake .. -G Ninja \
|
||||
-DCLANG_DEFAULT_PIE_ON_LINUX=ON \
|
||||
-DLLVM_PARALLEL_LINK_JOBS=%{max_link_jobs} \
|
||||
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_RPATH:BOOL=";" \
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
-DLLVM_CONFIG:FILEPATH=/usr/bin/llvm-config-%{__isa_bits} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DPYTHON_EXECUTABLE=%{__python3} \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
||||
-DCLANG_BUILD_TOOLS:BOOL=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
|
||||
-DCLANG_INCLUDE_TESTS:BOOL=ON \
|
||||
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
|
||||
-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
|
||||
%if 0%{?__isa_bits} == 64
|
||||
-DLLVM_LIBDIR_SUFFIX=64 \
|
||||
%else
|
||||
-DLLVM_LIBDIR_SUFFIX= \
|
||||
%endif
|
||||
\
|
||||
-DLLVM_CONFIG:FILEPATH=%{install_bindir}/llvm-config \
|
||||
-DLLVM_TABLEGEN_EXE:FILEPATH=%{install_bindir}/llvm-tblgen \
|
||||
-DLLVM_MAIN_SRC_DIR=%{install_prefix}/src \
|
||||
-DLLVM_LIT_ARGS="-vv" \
|
||||
-DLLVM_BUILD_UTILS:BOOL=ON \
|
||||
-DCLANG_ENABLE_ARCMT:BOOL=ON \
|
||||
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
|
||||
-DCLANG_INCLUDE_DOCS:BOOL=ON \
|
||||
@ -139,136 +213,120 @@ cd _build
|
||||
-DLLVM_ENABLE_RTTI=ON \
|
||||
-DLLVM_BUILD_DOCS=ON \
|
||||
-DLLVM_ENABLE_SPHINX=ON \
|
||||
-DCLANG_LINK_CLANG_DYLIB=ON \
|
||||
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
|
||||
\
|
||||
-DCLANG_BUILD_EXAMPLES:BOOL=OFF \
|
||||
-DCLANG_REPOSITORY_STRING="%{_vendor} %{version}-%{release}" \
|
||||
-DLIB_SUFFIX=
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCLANG_REPOSITORY_STRING="%{?distro} %{version}-%{release}" \
|
||||
%if 0%{?__isa_bits} == 64
|
||||
-DLLVM_LIBDIR_SUFFIX=64 \
|
||||
%else
|
||||
-DLLVM_LIBDIR_SUFFIX= \
|
||||
%endif
|
||||
-DCLANG_DEFAULT_UNWINDLIB=libgcc
|
||||
|
||||
%make_build
|
||||
%ninja_build
|
||||
|
||||
%install
|
||||
%make_install -C _build
|
||||
|
||||
mv -v %{buildroot}%{_includedir}/clang/Config/config{,-%{__isa_bits}}.h
|
||||
install -m 0644 %{SOURCE2} %{buildroot}%{_includedir}/clang/Config/config.h
|
||||
%ninja_install -C _build
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
|
||||
mkdir -p %{buildroot}%{_emacs_sitestartdir}
|
||||
for f in clang-format.el clang-rename.el clang-include-fixer.el; do
|
||||
mv %{buildroot}{%{_datadir}/clang,%{_emacs_sitestartdir}}/$f
|
||||
done
|
||||
rm -vf %{buildroot}%{install_sharedir}/clang/clang-format-bbedit.applescript
|
||||
rm -vf %{buildroot}%{install_sharedir}/clang/clang-format-sublime.py*
|
||||
|
||||
rm -vf %{buildroot}%{_datadir}/clang/clang-format-bbedit.applescript
|
||||
rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py*
|
||||
rm -Rvf %{buildroot}%{install_docdir}/clang/html
|
||||
rm -Rvf %{buildroot}%{install_sharedir}/clang/clang-doc-default-stylesheet.css
|
||||
rm -Rvf %{buildroot}%{install_sharedir}/clang/index.js
|
||||
rm -vf %{buildroot}%{install_sharedir}/clang/bash-autocomplete.sh
|
||||
|
||||
rm -Rvf %{buildroot}%{_pkgdocdir}
|
||||
|
||||
rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh
|
||||
|
||||
# Create sub-directories in the clang resource directory that will be
|
||||
# populated by other packages
|
||||
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/{include,lib,share}/
|
||||
|
||||
# Remove clang-tidy headers.
|
||||
rm -Rvf %{buildroot}%{_includedir}/clang-tidy/
|
||||
|
||||
ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver}
|
||||
mkdir -p %{buildroot}%{install_libdir}/clang/%{version}/{include,lib,share}/
|
||||
|
||||
%check
|
||||
# Checking is disabled because we don't pack libLLVMTestingSupport.a, which makes
|
||||
# standalone build of clang impossible.
|
||||
%if %{with check}
|
||||
|
||||
#cd _build
|
||||
#PATH=%{_libdir}/llvm:$PATH make %{?_smp_mflags} check-clang || \
|
||||
#%ifarch %{arm}
|
||||
#:
|
||||
#%else
|
||||
#false
|
||||
#%endif
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build/
|
||||
%endif
|
||||
|
||||
%files
|
||||
%{_bindir}/clang
|
||||
%{_bindir}/clang++
|
||||
%{_bindir}/clang-%{maj_ver}
|
||||
%{_bindir}/clang++-%{maj_ver}
|
||||
%{_bindir}/clang-check
|
||||
%{_bindir}/clang-cl
|
||||
%{_bindir}/clang-cpp
|
||||
%{_bindir}/clang-format
|
||||
%{_bindir}/clang-doc
|
||||
%{_bindir}/clang-extdef-mapping
|
||||
%{_bindir}/clang-move
|
||||
%{_bindir}/clang-offload-wrapper
|
||||
%{_bindir}/clang-scan-deps
|
||||
%{_bindir}/pp-trace
|
||||
%{_bindir}/clang-offload-bundler
|
||||
%{_bindir}/diagtool
|
||||
%{_bindir}/hmaptool
|
||||
%{_bindir}/c-index-test
|
||||
%{_emacs_sitestartdir}/clang-format.el
|
||||
%{_datadir}/clang/clang-format.py*
|
||||
%{_datadir}/clang/clang-format-diff.py*
|
||||
%{_libdir}/clang/
|
||||
%{_libdir}/*.so.*
|
||||
%license LICENSE.TXT
|
||||
%{install_bindir}/clang
|
||||
%{install_bindir}/clang++
|
||||
%{install_bindir}/clang-%{maj_ver}
|
||||
%{install_bindir}/clang-cl
|
||||
%{install_bindir}/clang-cpp
|
||||
%{install_prefix}/share/man/man1/*
|
||||
|
||||
%files libs
|
||||
%{install_libdir}/*.so.*
|
||||
%{install_libdir}/clang/%{version}/include/*
|
||||
|
||||
%files devel
|
||||
%{_libdir}/*.so
|
||||
%{_includedir}/clang/
|
||||
%{_includedir}/clang-c/
|
||||
%{_libdir}/cmake/*
|
||||
%dir %{_datadir}/clang/
|
||||
%{install_libdir}/*.so
|
||||
%{install_includedir}/clang/
|
||||
%{install_includedir}/clang-c/
|
||||
%{install_includedir}/clang-tidy/
|
||||
%{install_libdir}/cmake/*
|
||||
|
||||
|
||||
%files resource-filesystem
|
||||
%dir %{_libdir}/clang/%{version}/
|
||||
%dir %{_libdir}/clang/%{version}/include/
|
||||
%dir %{_libdir}/clang/%{version}/lib/
|
||||
%dir %{_libdir}/clang/%{version}/share/
|
||||
|
||||
%files help
|
||||
%{_mandir}/man1/clang.1.gz
|
||||
%{_mandir}/man1/diagtool.1.gz
|
||||
%dir %{install_libdir}/clang/%{version}/
|
||||
%dir %{install_libdir}/clang/%{version}/include/
|
||||
%dir %{install_libdir}/clang/%{version}/lib/
|
||||
%dir %{install_libdir}/clang/%{version}/share/
|
||||
|
||||
%files analyzer
|
||||
%{_bindir}/scan-view
|
||||
%{_bindir}/scan-build
|
||||
%{_libexecdir}/ccc-analyzer
|
||||
%{_libexecdir}/c++-analyzer
|
||||
%{_datadir}/scan-view/
|
||||
%{_datadir}/scan-build/
|
||||
%{_mandir}/man1/scan-build.1.*
|
||||
%{install_libexecdir}/ccc-analyzer
|
||||
%{install_libexecdir}/c++-analyzer
|
||||
%{install_bindir}/scan-view
|
||||
%{install_bindir}/scan-build
|
||||
%{install_prefix}/share/man/man1/*
|
||||
%{install_sharedir}/scan-view
|
||||
%{install_sharedir}/scan-build
|
||||
|
||||
|
||||
%files tools-extra
|
||||
%{_bindir}/clangd
|
||||
%{_bindir}/clang-apply-replacements
|
||||
%{_bindir}/clang-change-namespace
|
||||
%{_bindir}/clang-include-fixer
|
||||
%{_bindir}/clang-query
|
||||
%{_bindir}/clang-refactor
|
||||
%{_bindir}/clang-reorder-fields
|
||||
%{_bindir}/clang-rename
|
||||
%{_bindir}/clang-tidy
|
||||
%{_bindir}/find-all-symbols
|
||||
%{_bindir}/modularize
|
||||
%{_emacs_sitestartdir}/clang-rename.el
|
||||
%{_emacs_sitestartdir}/clang-include-fixer.el
|
||||
%{_datadir}/clang/clang-include-fixer.py*
|
||||
%{_datadir}/clang/clang-tidy-diff.py*
|
||||
%{_datadir}/clang/run-clang-tidy.py*
|
||||
%{_datadir}/clang/run-find-all-symbols.py*
|
||||
%{_datadir}/clang/clang-rename.py*
|
||||
%{_datadir}/clang/index.js
|
||||
%{_datadir}/clang/clang-doc-default-stylesheet.css
|
||||
%{install_bindir}/c-index-test
|
||||
%{install_bindir}/clang-apply-replacements
|
||||
%{install_bindir}/clang-change-namespace
|
||||
%{install_bindir}/clang-check
|
||||
%{install_bindir}/clang-doc
|
||||
%{install_bindir}/clang-extdef-mapping
|
||||
%{install_bindir}/clang-format
|
||||
%{install_bindir}/clang-include-fixer
|
||||
%{install_bindir}/clang-move
|
||||
%{install_bindir}/clang-offload-bundler
|
||||
%{install_bindir}/clang-offload-wrapper
|
||||
%{install_bindir}/clang-query
|
||||
%{install_bindir}/clang-refactor
|
||||
%{install_bindir}/clang-rename
|
||||
%{install_bindir}/clang-reorder-fields
|
||||
%{install_bindir}/clang-scan-deps
|
||||
%{install_bindir}/clang-tidy
|
||||
%{install_bindir}/clangd
|
||||
%{install_bindir}/diagtool
|
||||
%{install_bindir}/hmaptool
|
||||
%{install_bindir}/pp-trace
|
||||
%{install_bindir}/find-all-symbols
|
||||
%{install_bindir}/modularize
|
||||
%{install_sharedir}/clang/clang-format.el
|
||||
%{install_sharedir}/clang/clang-rename.el
|
||||
%{install_sharedir}/clang/clang-include-fixer.el
|
||||
%{install_sharedir}/clang/clang-format.py
|
||||
%{install_sharedir}/clang/clang-format-diff.py
|
||||
%{install_sharedir}/clang/clang-include-fixer.py
|
||||
%{install_sharedir}/clang/clang-tidy-diff.py
|
||||
%{install_sharedir}/clang/run-find-all-symbols.py
|
||||
%{install_sharedir}/clang/run-clang-tidy.py
|
||||
%{install_sharedir}/clang/clang-rename.py
|
||||
|
||||
%files -n git-clang-format
|
||||
%{_bindir}/git-clang-format
|
||||
%{install_bindir}/git-clang-format
|
||||
|
||||
%changelog
|
||||
* Thu Jul 6 2023 cf-zhao <zhaochuanfeng@huawei.com> -12.0.1-4
|
||||
- Make this spec file support both system-version and multi-version.
|
||||
|
||||
* Thu Sep 22 2022 linguoxiong <cokelin@hnu.edu.cn> - 12.0.1-3
|
||||
- Implement the "-aux-info" option to print function prototype
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user