diff --git a/0001-Revert-Clang-Change-the-default-DWARF-version-to-5.patch b/0001-Revert-Clang-Change-the-default-DWARF-version-to-5.patch deleted file mode 100644 index 5b76a4515e8303f2f9be80ab5d10004f7ef288c2..0000000000000000000000000000000000000000 --- a/0001-Revert-Clang-Change-the-default-DWARF-version-to-5.patch +++ /dev/null @@ -1,98 +0,0 @@ -From a6925b9f000008d3c1d34a401f6dcaac6e57fbbb Mon Sep 17 00:00:00 2001 -From: liyunfei -Date: Wed, 5 Jul 2023 10:55:14 +0800 -Subject: Revert "Clang: Change the default DWARF version to 5" - -This reverts commit d3b26dea16108c427b19b5480c9edc76edf8f5b4. ---- - clang/include/clang/Driver/ToolChain.h | 2 +- - clang/test/CodeGen/dwarf-version.c | 4 ++-- - clang/test/Driver/cl-options.c | 2 +- - clang/test/Driver/clang-g-opts.c | 2 +- - clang/test/Driver/ve-toolchain.c | 2 +- - clang/test/Driver/ve-toolchain.cpp | 2 +- - 6 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h -index f20ab164531b..53c86ee82936 100644 ---- a/clang/include/clang/Driver/ToolChain.h -+++ b/clang/include/clang/Driver/ToolChain.h -@@ -535,7 +535,7 @@ public: - - // Return the DWARF version to emit, in the absence of arguments - // to the contrary. -- virtual unsigned GetDefaultDwarfVersion() const { return 5; } -+ virtual unsigned GetDefaultDwarfVersion() const { return 4; } - - // Some toolchains may have different restrictions on the DWARF version and - // may need to adjust it. E.g. NVPTX may need to enforce DWARF2 even when host -diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c -index 0a6fa4768026..96f01749d0d8 100644 ---- a/clang/test/CodeGen/dwarf-version.c -+++ b/clang/test/CodeGen/dwarf-version.c -@@ -2,8 +2,8 @@ - // RUN: %clang -target x86_64-linux-gnu -gdwarf-3 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER3 - // RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 - // RUN: %clang -target x86_64-linux-gnu -gdwarf-5 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 --// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 --// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 -+// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 -+// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 - - // The -isysroot is used as a hack to avoid LIT messing with the SDKROOT - // environment variable which indirecty overrides the version in the target -diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c -index a2e350a0a835..b6159e111052 100644 ---- a/clang/test/Driver/cl-options.c -+++ b/clang/test/Driver/cl-options.c -@@ -570,7 +570,7 @@ - // RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s - // Z7_gdwarf: "-gcodeview" - // Z7_gdwarf: "-debug-info-kind=constructor" --// Z7_gdwarf: "-dwarf-version= -+// Z7_gdwarf: "-dwarf-version=4" - - // RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s - // CXX11: -std=c++11 -diff --git a/clang/test/Driver/clang-g-opts.c b/clang/test/Driver/clang-g-opts.c -index d982b1070cae..bb129e75769c 100644 ---- a/clang/test/Driver/clang-g-opts.c -+++ b/clang/test/Driver/clang-g-opts.c -@@ -32,7 +32,7 @@ - - // CHECK-WITHOUT-G-NOT: -debug-info-kind - // CHECK-WITH-G: "-debug-info-kind=constructor" --// CHECK-WITH-G: "-dwarf-version=5" -+// CHECK-WITH-G: "-dwarf-version=4" - // CHECK-WITH-G-DWARF2: "-dwarf-version=2" - - // CHECK-WITH-G-STANDALONE: "-debug-info-kind=standalone" -diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c -index 32e25769b6da..b8a2852daba8 100644 ---- a/clang/test/Driver/ve-toolchain.c -+++ b/clang/test/Driver/ve-toolchain.c -@@ -6,7 +6,7 @@ - /// Checking dwarf-version - - // RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s --// DWARF_VER: "-dwarf-version=5" -+// DWARF_VER: "-dwarf-version=4" - - ///----------------------------------------------------------------------------- - /// Checking include-path -diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp -index 5a33d5eceb61..cedf895b36dc 100644 ---- a/clang/test/Driver/ve-toolchain.cpp -+++ b/clang/test/Driver/ve-toolchain.cpp -@@ -7,7 +7,7 @@ - - // RUN: %clangxx -### -g --target=ve-unknown-linux-gnu \ - // RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s --// DWARF_VER: "-dwarf-version=5" -+// DWARF_VER: "-dwarf-version=4" - - ///----------------------------------------------------------------------------- - /// Checking include-path --- -2.28.0.windows.1 - diff --git a/0002-Add-triples-for-X86_64-AArch64-openEuler-gcc.patch b/0002-Add-triples-for-X86_64-AArch64-openEuler-gcc.patch deleted file mode 100644 index 14c6e2ba5146bc26ca23be33917c1ab212cbb044..0000000000000000000000000000000000000000 --- a/0002-Add-triples-for-X86_64-AArch64-openEuler-gcc.patch +++ /dev/null @@ -1,34 +0,0 @@ -From a833e7fa829764f8e3bf6b059c9e91080ca55253 Mon Sep 17 00:00:00 2001 -From: liyunfei -Date: Mon, 24 Jul 2023 19:16:45 +0800 -Subject: [PATCH] Add triples for X86_64/AArch64 openEuler gcc - ---- - clang/lib/Driver/ToolChains/Gnu.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 665cdc3132fb..fc56935e7513 100644 ---- a/clang/lib/Driver/ToolChains/Gnu.cpp -+++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2178,7 +2178,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; - static const char *const AArch64Triples[] = { - "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux", -- "aarch64-suse-linux"}; -+ "aarch64-suse-linux", "aarch64-openEuler-linux"}; - static const char *const AArch64beLibDirs[] = {"/lib"}; - static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu", - "aarch64_be-linux-gnu"}; -@@ -2208,7 +2208,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - "x86_64-redhat-linux", "x86_64-suse-linux", - "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", - "x86_64-slackware-linux", "x86_64-unknown-linux", -- "x86_64-amazon-linux"}; -+ "x86_64-amazon-linux", "x86_64-openEuler-linux"}; - static const char *const X32Triples[] = {"x86_64-linux-gnux32", - "x86_64-pc-linux-gnux32"}; - static const char *const X32LibDirs[] = {"/libx32", "/lib"}; --- -2.28.0.windows.1 - diff --git a/0003-riscv-Add-triple-for-riscv64-openEuler-gcc.patch b/0003-riscv-Add-triple-for-riscv64-openEuler-gcc.patch deleted file mode 100644 index 3e420181578f4a51921aa690701f22e36b9a0a0d..0000000000000000000000000000000000000000 --- a/0003-riscv-Add-triple-for-riscv64-openEuler-gcc.patch +++ /dev/null @@ -1,27 +0,0 @@ -From e642f1231b9f7edd67bb0507a471bb8b2815f6fe Mon Sep 17 00:00:00 2001 -From: Mingzheng Xing -Date: Wed, 20 Sep 2023 00:11:16 +0800 -Subject: [PATCH] riscv: Add triple for riscv64 openEuler gcc - -Signed-off-by: Mingzheng Xing ---- - clang/lib/Driver/ToolChains/Gnu.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 665cdc31..037718c3 100644 ---- a/clang/lib/Driver/ToolChains/Gnu.cpp -+++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2280,7 +2280,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - static const char *const RISCV64LibDirs[] = {"/lib64", "/lib"}; - static const char *const RISCV64Triples[] = {"riscv64-unknown-linux-gnu", - "riscv64-linux-gnu", -- "riscv64-unknown-elf"}; -+ "riscv64-unknown-elf", -+ "riscv64-openEuler-linux"}; - - static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"}; - static const char *const SPARCv8Triples[] = {"sparc-linux-gnu", --- -2.23.0 - diff --git a/README.en.md b/README.en.md index 93c563820be353d39c95007fedc037a73ef8e2cd..50e3983443ec9533cdbd25d8008d94b78d4c4498 100644 --- a/README.en.md +++ b/README.en.md @@ -1,36 +1,3 @@ # clang-15 -#### Description -C Language Family Front-end - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +This package has been deprecated \ No newline at end of file diff --git a/README.md b/README.md index 5ce7e84ab3a33f3bc79e513c2af829cc39d3acb5..ac8fc88566dbc858715d3b5affe6cdaa30350e98 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,3 @@ # C Language Family Front-end -#### 介绍 -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. - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +该软件包已废弃 \ No newline at end of file diff --git a/clang-15.0.7.src.tar.xz b/clang-15.0.7.src.tar.xz deleted file mode 100644 index 0062fa6d3e3a5fd0522d9d1d26aecd6708a5d051..0000000000000000000000000000000000000000 Binary files a/clang-15.0.7.src.tar.xz and /dev/null differ diff --git a/clang-tools-extra-15.0.7.src.tar.xz b/clang-tools-extra-15.0.7.src.tar.xz deleted file mode 100644 index 113884182abe53e4a1e8bfa1b0d0a9d42d986d9a..0000000000000000000000000000000000000000 Binary files a/clang-tools-extra-15.0.7.src.tar.xz and /dev/null differ diff --git a/clang.spec b/clang.spec deleted file mode 100644 index 0cec141f033dc36aed91189d1f6735f9f7bea9a5..0000000000000000000000000000000000000000 --- a/clang.spec +++ /dev/null @@ -1,395 +0,0 @@ -%bcond_with sys_llvm -%bcond_without check - -%global maj_ver 15 -%global min_ver 0 -%global patch_ver 7 -%global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} - -%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: 8 -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-%{clang_version}/%{clang_srcdir}.tar.xz -Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}/%{clang_tools_srcdir}.tar.xz - -Patch0: fedora-PATCH-clang-Reorganize-gtest-integration.patch -Patch1: fedora-PATCH-clang-Don-t-install-static-libraries.patch -Patch2: 0001-Revert-Clang-Change-the-default-DWARF-version-to-5.patch -Patch3: 0002-Add-triples-for-X86_64-AArch64-openEuler-gcc.patch -Patch4: 0003-riscv-Add-triple-for-riscv64-openEuler-gcc.patch - -Patch201: fedora-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch - -BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: cmake -BuildRequires: libatomic - -%if %{with sys_llvm} -BuildRequires: llvm-devel = %{version} -BuildRequires: llvm-static = %{version} -BuildRequires: llvm-test = %{version} -BuildRequires: llvm-googletest = %{version} -%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 -# Require gcc libs installed during rumtime -Requires: gcc -Requires: gcc-c++ - -Provides: clang(major) = %{maj_ver} - -Conflicts: compiler-rt < 11.0.0 - -%description -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}-libs = %{version}-%{release} - -%description devel -Development header files for clang. - -%package resource-filesystem -Summary: Filesystem package that owns the clang resource directory -Provides: %{name}-resource-filesystem(major) = %{maj_ver} - -%description resource-filesystem -This package owns the clang resouce directory: $libdir/clang/$version/ - - -%package analyzer -Summary: A source code analysis framework -License: NCSA and MIT -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description 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. - -%package tools-extra -Summary: Extra tools for clang -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: 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} -%autopatch -m200 -p2 - -# failing test case -rm test/clang-tidy/checkers/altera/struct-pack-align.cpp - -pathfix.py -i %{__python3} -pn \ - clang-tidy/tool/ \ - clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py - -%setup -q -n %{clang_srcdir} -%autopatch -M200 -p2 - -# failing test case -rm test/CodeGen/profile-filter.c -rm test/CodeGen/2007-06-18-SextAttrAggregate.c -rm test/Driver/XRay/xray-instrument-os.c -rm test/Driver/XRay/xray-instrument-cpu.c -rm test/CodeGen/attr-noundef.cpp -rm test/CodeGen/indirect-noundef.cpp -rm test/Preprocessor/init.c - -pathfix.py -i %{__python3} -pn \ - tools/clang-format/ \ - tools/clang-format/git-clang-format \ - utils/hmaptool/hmaptool \ - tools/scan-view/bin/scan-view \ - tools/scan-view/share/Reporter.py \ - tools/scan-view/share/startfile.py \ - tools/scan-build-py/bin/* \ - tools/scan-build-py/libexec/* - -mv ../%{clang_tools_srcdir} tools/extra - -%build -mkdir -p _build -cd _build -%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=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_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 \ - -DCLANG_PLUGIN_SUPPORT:BOOL=ON \ - -DENABLE_LINKER_BUILD_ID:BOOL=ON \ - -DLLVM_ENABLE_EH=ON \ - -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 \ - -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 - -%ninja_build - -%install - -%ninja_install -C _build -mkdir -p %{buildroot}/%{_bindir} - -rm -vf %{buildroot}%{_datadir}/clang/clang-format-bbedit.applescript -rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py* - -rm -vf %{buildroot}%{install_sharedir}/clang/clang-format-bbedit.applescript -rm -vf %{buildroot}%{install_sharedir}/clang/clang-format-sublime.py* - -rm -Rvf %{buildroot}%{install_docdir}/Clang/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 - -mkdir -p %{buildroot}%{install_libdir}/clang/%{version}/{include,lib,share}/ - -%check -%if %{with check} - -LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build/ -%endif - -%files -%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 -%{install_libdir}/*.so -%{install_includedir}/clang/ -%{install_includedir}/clang-c/ -%{install_includedir}/clang-tidy/ -%{install_libdir}/cmake/* - - -%files resource-filesystem -%dir %{install_libdir}/clang/%{version}/ -%dir %{install_libdir}/clang/%{version}/include/ -%dir %{install_libdir}/clang/%{version}/lib/ -%dir %{install_libdir}/clang/%{version}/share/ -%{install_libdir}/clang/%{version}/ - -%files analyzer -%{install_libexecdir}/ccc-analyzer -%{install_libexecdir}/c++-analyzer -%{install_libexecdir}/analyze-c++ -%{install_libexecdir}/analyze-cc -%{install_libexecdir}/intercept-c++ -%{install_libexecdir}/intercept-cc -%{install_bindir}/scan-view -%{install_bindir}/scan-build -%{install_bindir}/analyze-build -%{install_bindir}/intercept-build -%{install_bindir}/scan-build-py -%{install_prefix}/share/man/man1/* -%{install_prefix}/lib/libear -%{install_prefix}/lib/libscanbuild -%{install_sharedir}/scan-view -%{install_sharedir}/scan-build - - -%files tools-extra -%{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-packager -%{install_bindir}/clang-offload-wrapper -%{install_bindir}/clang-linker-wrapper -%{install_bindir}/clang-nvlink-wrapper -%{install_bindir}/clang-pseudo -%{install_bindir}/clang-query -%{install_bindir}/clang-refactor -%{install_bindir}/clang-rename -%{install_bindir}/clang-reorder-fields -%{install_bindir}/clang-repl -%{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_bindir}/run-clang-tidy -%{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/clang-rename.py - -%files -n git-clang-format -%{install_bindir}/git-clang-format - -%changelog -* Wed Jan 3 2024 liyunfei - 15.0.7-8 -- Remove sys_llvm for clang-15 toolchain. - -* Tue Sep 19 2023 Mingzheng Xing - 15.0.7-7 -- Add triple for riscv64 openEuler gcc. - -* Mon Jul 24 2023 liyunfei - 15.0.7-6 -- Add triples for X86_64/AArch64 openEuler gcc. - -* Fri Jul 21 2023 liyunfei - 15.0.7-5 -- Add Requires: gcc to fix runtime error. - -* Thu Jul 20 2023 liyunfei - 15.0.7-4 -- Change the default DWARF version from 5 to 4. - -* Sat Jul 08 2023 cf-zhao -15.0.7-3 -- Make this spec file support both system-version and multi-version. - -* Wed Jun 7 2023 Chenxi Mao - 15.0.7-2 -- Disable LTO as this causes crash if gcc lto enabled. -- Disbale unit tests, there are 3 test failed. - -* Mon Feb 20 2023 Chenxi Mao - 15.0.7-1 -- Upgrade to 15.0.7. - -* Thu Feb 9 2023 Chenxi Mao - 15.0.6-2 -- Enable clang unit tests. -- Leverage macro define instead of hardcode version number. -- Remove duplicated character. - -* Mon Jan 2 2023 Chenxi Mao - 15.0.6-1 -- Package init diff --git a/fedora-PATCH-clang-Don-t-install-static-libraries.patch b/fedora-PATCH-clang-Don-t-install-static-libraries.patch deleted file mode 100644 index 8cab18078c70d5ff7f084cb0c5e4993a8a78dc42..0000000000000000000000000000000000000000 --- a/fedora-PATCH-clang-Don-t-install-static-libraries.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 88704fc2eabb9dd19a9c3eb81a9b3dc37d95651c Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Fri, 31 Jan 2020 11:04:57 -0800 -Subject: [PATCH][clang] Don't install static libraries - -Signed-off-by: Chenxi Mao ---- - 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 5752f4277444..0f52822d91f0 100644 ---- a/clang/cmake/modules/AddClang.cmake -+++ b/clang/cmake/modules/AddClang.cmake -@@ -113,7 +113,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)) - get_target_export_arg(${name} Clang export_to_clangtargets UMBRELLA clang-libraries) - install(TARGETS ${lib} - COMPONENT ${lib} --- -2.30.2 - diff --git a/fedora-PATCH-clang-Reorganize-gtest-integration.patch b/fedora-PATCH-clang-Reorganize-gtest-integration.patch deleted file mode 100644 index 79e6e549c654566ba052c73c149d2d631d16a12b..0000000000000000000000000000000000000000 --- a/fedora-PATCH-clang-Reorganize-gtest-integration.patch +++ /dev/null @@ -1,43 +0,0 @@ -From c6b921c8d833546946b70a8c2640032fd7c62461 Mon Sep 17 00:00:00 2001 -From: serge-sans-paille -Date: Thu, 25 Feb 2021 14:04:52 +0100 -Subject: [PATCH 1/6] [PATCH][clang] Reorganize gtest integration - -Signed-off-by: Chenxi Mao ---- - 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 - diff --git a/fedora-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch b/fedora-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch deleted file mode 100644 index 8601e25041a5bd717193994a215813bdefb7315e..0000000000000000000000000000000000000000 --- a/fedora-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 581300e447602b9b7a505b0f07e8461d58d041ca Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Fri, 1 Jul 2022 21:24:17 -0700 -Subject: [PATCH] clang-tools-extra: Make test dependency on LLVMHello optional - -This fixes clang + clang-tools-extra standalone build after -Signed-off-by: Chenxi Mao -36892727e4f19a60778e371d78f8fb09d8122c85. ---- - clang-tools-extra/test/CMakeLists.txt | 10 +++++++++- - clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp | 2 +- - clang-tools-extra/test/lit.cfg.py | 3 +++ - clang-tools-extra/test/lit.site.cfg.py.in | 1 + - 4 files changed, 14 insertions(+), 2 deletions(-) - -diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt -index f4c529ee8af2..1cfb4dd529aa 100644 ---- a/clang-tools-extra/test/CMakeLists.txt -+++ b/clang-tools-extra/test/CMakeLists.txt -@@ -7,10 +7,15 @@ - set(CLANG_TOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..") - set(CLANG_TOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..") - -+if (TARGET LLVMHello) -+ set (LLVM_HAS_LLVM_HELLO 1) -+endif() -+ - llvm_canonicalize_cmake_booleans( - CLANG_TIDY_ENABLE_STATIC_ANALYZER - CLANG_PLUGIN_SUPPORT - LLVM_INSTALL_TOOLCHAIN_ONLY -+ LLVM_HAS_LLVM_HELLO - ) - - configure_lit_site_cfg( -@@ -86,7 +91,10 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - endif() - - if(TARGET CTTestTidyModule) -- list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello) -+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) -+ if (TARGET LLVMHello) -+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) -+ endif() - target_include_directories(CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR}") - if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN)) - set(LLVM_LINK_COMPONENTS -diff --git a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp -index c66a94f458cf..b4e7a5d691e5 100644 ---- a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp -+++ b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp -@@ -1,4 +1,4 @@ --// REQUIRES: plugins -+// REQUIRES: plugins, llvm-hello - // RUN: clang-tidy -checks='-*,mytest*' --list-checks -load %llvmshlibdir/CTTestTidyModule%pluginext -load %llvmshlibdir/LLVMHello%pluginext | FileCheck --check-prefix=CHECK-LIST %s - // CHECK-LIST: Enabled checks: - // CHECK-LIST-NEXT: mytest1 -diff --git a/clang-tools-extra/test/lit.cfg.py b/clang-tools-extra/test/lit.cfg.py -index 9b99bfd93440..3fca9f25fb48 100644 ---- a/clang-tools-extra/test/lit.cfg.py -+++ b/clang-tools-extra/test/lit.cfg.py -@@ -59,3 +59,6 @@ config.substitutions.append( - # Plugins (loadable modules) - if config.has_plugins and config.llvm_plugin_ext: - config.available_features.add('plugins') -+ -+if config.has_llvm_hello: -+ config.available_features.add("llvm-hello") -diff --git a/clang-tools-extra/test/lit.site.cfg.py.in b/clang-tools-extra/test/lit.site.cfg.py.in -index 4eb830a1baf1..6e5559348454 100644 ---- a/clang-tools-extra/test/lit.site.cfg.py.in -+++ b/clang-tools-extra/test/lit.site.cfg.py.in -@@ -11,6 +11,7 @@ config.target_triple = "@LLVM_TARGET_TRIPLE@" - config.host_triple = "@LLVM_HOST_TRIPLE@" - config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@ - config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@ -+config.has_llvm_hello = @LLVM_HAS_LLVM_HELLO@ - # Support substitution of the tools and libs dirs with user parameters. This is - # used when we can't determine the tool dir at configuration time. - config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@") --- -2.27.0 -