|
@@ -14,7 +14,7 @@
|
|
|
Summary: A C language family front-end for LLVM
|
|
|
Summary(ja): LLVM の C 言語フロントエンド
|
|
|
Name: clang
|
|
|
-Version: 15.0.6
|
|
|
+Version: 17.0.2
|
|
|
Release: 1%{?_dist_release}
|
|
|
Group: programming
|
|
|
Vendor: Project Vine
|
|
@@ -29,21 +29,25 @@ Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%
|
|
|
Source11: clang-config.h
|
|
|
|
|
|
# Patches for clang
|
|
|
-Patch0: 0001-PATCH-clang-Reorganize-gtest-integration.patch
|
|
|
-Patch1: 0002-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch
|
|
|
+Patch1: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch
|
|
|
Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch
|
|
|
Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch
|
|
|
-Patch4: 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch
|
|
|
-# This patch can be dropped once gcc-12.0.1-0.5.fc36 is in the repo.
|
|
|
-Patch5: 0001-Work-around-gcc-miscompile.patch
|
|
|
-Patch7: 0010-PATCH-clang-Produce-DWARF4-by-default.patch
|
|
|
-
|
|
|
+# Drop the following patch after debugedit adds support to DWARF-5:
|
|
|
+# https://sourceware.org/bugzilla/show_bug.cgi?id=28728
|
|
|
+Patch4: 0001-Produce-DWARF4-by-default.patch
|
|
|
+# Workaround a bug in ORC on ppc64le.
|
|
|
+# More info is available here: https://reviews.llvm.org/D159115#4641826
|
|
|
+Patch5: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch
|
|
|
+
|
|
|
+# RHEL specific patches
|
|
|
+# Avoid unwanted dependency on python-recommonmark
|
|
|
+Patch101: 0009-disable-recommonmark.patch
|
|
|
+
|
|
|
+%if %{without compat_build}
|
|
|
# Patches for clang-tools-extra
|
|
|
# See https://reviews.llvm.org/D120301
|
|
|
-Patch201: llvm-hello.patch
|
|
|
-# See https://github.com/llvm/llvm-project/issues/54116
|
|
|
-Patch202: remove-test.patch
|
|
|
-
|
|
|
+Patch201: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
@@ -146,16 +150,11 @@ A set of extra tools built using Clang's tooling API.
|
|
|
%setup -T -q -b 1 -n clang-tools-extra-%{version}.src
|
|
|
%autopatch -m200 -p2
|
|
|
|
|
|
-# This test is broken upstream. It is a clang-tidy unittest
|
|
|
-# that includes a file from clang, breaking standalone builds.
|
|
|
-# https://github.com/llvm/llvm-project/issues/54116
|
|
|
-rm unittests/clang-tidy/ReadabilityModuleTest.cpp
|
|
|
-
|
|
|
# failing test case
|
|
|
-#rm test/clang-tidy/checkers/altera-struct-pack-align.cpp
|
|
|
+rm test/clang-tidy/checkers/altera/struct-pack-align.cpp
|
|
|
|
|
|
pathfix%{python3_version}.py -i %{__python3} -pn \
|
|
|
- clang-tidy/tool/*.py \
|
|
|
+ clang-tidy/tool/ \
|
|
|
clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
|
|
|
|
|
|
%setup -q -n clang-%{version}.src
|
|
@@ -165,7 +164,7 @@ pathfix%{python3_version}.py -i %{__python3} -pn \
|
|
|
rm test/CodeGen/profile-filter.c
|
|
|
|
|
|
pathfix%{python3_version}.py -i %{__python3} -pn \
|
|
|
- tools/clang-format/*.py \
|
|
|
+ tools/clang-format/ \
|
|
|
tools/clang-format/git-clang-format \
|
|
|
utils/hmaptool/hmaptool \
|
|
|
tools/scan-view/bin/scan-view \
|
|
@@ -177,7 +176,7 @@ pathfix%{python3_version}.py -i %{__python3} -pn \
|
|
|
sed -i -e 's/"i686-linux-gnu",/"i686-linux-gnu","i686-vine-linux","i686-vine-linux-gnu",/' lib/Driver/ToolChains/Gnu.cpp
|
|
|
sed -i -e 's/"x86_64-linux-gnu",/"x86_64-linux-gnu","x86_64-vine-linux","x86_64-vine-linux-gnu",/' lib/Driver/ToolChains/Gnu.cpp
|
|
|
|
|
|
-sed -i -e 's/"ld"/"ld.gold"/' include/clang/Driver/ToolChain.h
|
|
|
+#sed -i -e 's/"ld"/"ld.gold"/' include/clang/Driver/ToolChain.h
|
|
|
|
|
|
|
|
|
%build
|
|
@@ -191,13 +190,22 @@ sed -i -e 's/"ld"/"ld.gold"/' include/clang/Driver/ToolChain.h
|
|
|
|
|
|
%cmake \
|
|
|
-GNinja \
|
|
|
+ -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \
|
|
|
-DLLVM_PARALLEL_LINK_JOBS=1 \
|
|
|
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
|
|
- -DCMAKE_BUILD_TYPE=Release \
|
|
|
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
-DPYTHON_EXECUTABLE=%{__python3} \
|
|
|
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
|
|
- -DCMAKE_INSTALL_RPATH:BOOL=";" \
|
|
|
+%ifarch %ix86
|
|
|
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
|
|
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
|
|
+%endif
|
|
|
+ -DCLANG_INCLUDE_DOCS:BOOL=ON \
|
|
|
+ -DCLANG_INCLUDE_TESTS:BOOL=OFF \
|
|
|
+ -DLLVM_BUILD_UTILS:BOOL=ON \
|
|
|
-DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extra-%{version}.src \
|
|
|
+ -DLLVM_CMAKE_DIR=%{_libdir}/cmake/llvm \
|
|
|
+ -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
|
|
|
%if 0%{?__isa_bits} == 64
|
|
|
-DLLVM_LIBDIR_SUFFIX=64 \
|
|
|
%else
|
|
@@ -205,21 +213,18 @@ sed -i -e 's/"ld"/"ld.gold"/' include/clang/Driver/ToolChain.h
|
|
|
%endif
|
|
|
\
|
|
|
-DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \
|
|
|
+ -DLLVM_COMMON_CMAKE_UTILS=%{_datadir}/llvm/cmake \
|
|
|
+ -DLLVM_CMAKE_DIR=%{_libdir}/cmake/llvm \
|
|
|
-DCLANG_ENABLE_ARCMT:BOOL=ON \
|
|
|
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
|
|
|
- -DCLANG_ENABLE_ARCMT:BOOL=ON \
|
|
|
- -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
|
|
|
- -DCLANG_INCLUDE_DOCS:BOOL=ON \
|
|
|
- -DCLANG_INCLUDE_TESTS:BOOL=ON \
|
|
|
- -DCLANG_PLUGIN_SUPPORT:BOOL=ON \
|
|
|
- \
|
|
|
- -DCLANG_INCLUDE_DOCS:BOOL=ON \
|
|
|
- -DCLANG_PLUGIN_SUPPORT:BOOL=ON \
|
|
|
+ -DCLANG_PLUGIN_SUPPORT:BOOL=OFF \
|
|
|
+ -DLLVM_ENABLE_PLUGINS:BOOL=OFF \
|
|
|
-DENABLE_LINKER_BUILD_ID:BOOL=ON \
|
|
|
-DLLVM_ENABLE_EH=ON \
|
|
|
-DLLVM_ENABLE_RTTI=ON \
|
|
|
-DLLVM_BUILD_DOCS=ON \
|
|
|
-DLLVM_ENABLE_SPHINX=OFF \
|
|
|
+ -DLLVM_INCLUDE_TESTS:BOOL=OFF \
|
|
|
-DCLANG_LINK_CLANG_DYLIB=ON \
|
|
|
\
|
|
|
-DCLANG_LINK_CLANG_DYLIB=ON \
|
|
@@ -239,12 +244,15 @@ rm -rf %{buildroot}
|
|
|
# remove static libraries
|
|
|
rm -fv %{buildroot}%{_libdir}/libclang*.a
|
|
|
|
|
|
+# Add clang++-{version} symlink
|
|
|
+ln -s clang++ %{buildroot}%{_bindir}/clang++-%{ver_suffix}
|
|
|
+
|
|
|
# install clang python bindings
|
|
|
mkdir -p %{buildroot}%{python3_sitelib}/clang/
|
|
|
install -p -m644 bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/
|
|
|
|
|
|
# install scanbuild-py to python sitelib.
|
|
|
-mv %{buildroot}%{_prefix}/lib/{libear,libscanbuild} %{buildroot}%{python3_sitelib}
|
|
|
+mv %{buildroot}%{_libdir}/{libear,libscanbuild} %{buildroot}%{python3_sitelib}
|
|
|
|
|
|
mv -v %{buildroot}%{_includedir}/clang/Config/config{,-%{__isa_bits}}.h
|
|
|
install -m 0644 %{SOURCE11} %{buildroot}%{_includedir}/clang/Config/config.h
|
|
@@ -292,6 +300,7 @@ rm -rf %{buildroot}
|
|
|
%{_bindir}/clang
|
|
|
%{_bindir}/clang++
|
|
|
%{_bindir}/clang-%{ver_suffix}
|
|
|
+%{_bindir}/clang++-%{ver_suffix}
|
|
|
%{_bindir}/clang-cl
|
|
|
%{_bindir}/clang-cpp
|
|
|
|
|
@@ -334,17 +343,20 @@ rm -rf %{buildroot}
|
|
|
%{python3_sitelib}/clang/
|
|
|
|
|
|
%files tools-extra
|
|
|
+%{_bindir}/amdgpu-arch
|
|
|
%{_bindir}/c-index-test
|
|
|
%{_bindir}/clang*
|
|
|
%exclude %{_bindir}/clang
|
|
|
%exclude %{_bindir}/clang++
|
|
|
%exclude %{_bindir}/clang-%{ver_suffix}
|
|
|
+%exclude %{_bindir}/clang++-%{ver_suffix}
|
|
|
%exclude %{_bindir}/clang-cl
|
|
|
%exclude %{_bindir}/clang-cpp
|
|
|
%{_bindir}/diagtool
|
|
|
%{_bindir}/find-all-symbols
|
|
|
%{_bindir}/hmaptool
|
|
|
%{_bindir}/modularize
|
|
|
+%{_bindir}/nvptx-arch
|
|
|
%{_bindir}/pp-trace
|
|
|
%{_bindir}/run-clang-tidy
|
|
|
%{_datadir}/clang/clang-tidy-diff.py*
|
|
@@ -352,6 +364,15 @@ rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Sat Oct 07 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.0.2-1
|
|
|
+- new upstream release.
|
|
|
+
|
|
|
+* Sat Sep 30 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.0.1-1
|
|
|
+- new upstream release.
|
|
|
+
|
|
|
+* Sun May 28 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 16.0.4-1
|
|
|
+- new upstream release.
|
|
|
+
|
|
|
* Fri Dec 16 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.0.6-1
|
|
|
- new upstream release.
|
|
|
|