|
@@ -1,5 +1,17 @@
|
|
|
%bcond_with test
|
|
|
|
|
|
+%global reduce_debuginfo 1
|
|
|
+
|
|
|
+%ifarch %ix86
|
|
|
+%bcond_with lto_build
|
|
|
+%else
|
|
|
+%bcond_without lto_build
|
|
|
+%endif
|
|
|
+
|
|
|
+%if %{without lto_build}
|
|
|
+%global _lto_cflags %{nil}
|
|
|
+%endif
|
|
|
+
|
|
|
%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
|
|
|
|
|
|
%define ver_suffix %(echo "%{version}" | cut -d . -f 1)
|
|
@@ -14,7 +26,7 @@
|
|
|
Summary: A C language family front-end for LLVM
|
|
|
Summary(ja): LLVM の C 言語フロントエンド
|
|
|
Name: clang
|
|
|
-Version: 18.1.5
|
|
|
+Version: 19.1.3
|
|
|
Release: 1%{?_dist_release}
|
|
|
Group: programming
|
|
|
Vendor: Project Vine
|
|
@@ -26,26 +38,11 @@ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%
|
|
|
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz
|
|
|
|
|
|
# multilib fixes
|
|
|
-Source11: clang-config.h
|
|
|
+Source11: clang-config.h
|
|
|
|
|
|
# Patches for clang
|
|
|
-Patch1: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch
|
|
|
-Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.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-myst-parser
|
|
|
-Patch101: 0009-disable-myst-parser.patch
|
|
|
-
|
|
|
-%if %{without compat_build}
|
|
|
-# Patches for clang-tools-extra
|
|
|
-# See https://reviews.llvm.org/D120301
|
|
|
-Patch201: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch
|
|
|
-%endif
|
|
|
-
|
|
|
+Patch1: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch
|
|
|
+Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
|
|
@@ -104,6 +101,20 @@ This package contains header files for the Clang compiler.
|
|
|
Clang コンパイラのヘッダファイル集です.
|
|
|
|
|
|
|
|
|
+%package static
|
|
|
+Summary: static libraries for clang
|
|
|
+Summary(ja): Clang の静的ライブラリ
|
|
|
+Group: programming
|
|
|
+Requires: clang-devel = %{version}-%{release}
|
|
|
+Requires: clang = %{version}-%{release}
|
|
|
+
|
|
|
+%description static
|
|
|
+This package contains static libraries for the Clang compiler.
|
|
|
+
|
|
|
+%description devel -l ja
|
|
|
+Clang コンパイラの静的ライブラリです.
|
|
|
+
|
|
|
+
|
|
|
%package analyzer
|
|
|
Summary: A source code analysis framework
|
|
|
Summary(ja): ソースコード分析フレームワーク
|
|
@@ -155,7 +166,6 @@ pathfix%{python3_version}.py -i %{__python3} -pn \
|
|
|
clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
|
|
|
|
|
|
%setup -q -n clang-%{version}.src
|
|
|
-%autopatch -M200 -p2
|
|
|
|
|
|
# failing test case
|
|
|
rm test/CodeGen/profile-filter.c
|
|
@@ -177,11 +187,7 @@ sed -i -e 's/"x86_64-linux-gnu",/"x86_64-linux-gnu","x86_64-vine-linux","x86_64-
|
|
|
|
|
|
|
|
|
%build
|
|
|
-# lto builds with gcc 11 fail while running the lit tests.
|
|
|
-%define _lto_cflags %{nil}
|
|
|
-
|
|
|
-%ifarch s390 s390x %{arm} %ix86
|
|
|
-# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
|
|
+%if %reduce_debuginfo == 1
|
|
|
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
|
|
%endif
|
|
|
|
|
@@ -193,7 +199,7 @@ sed -i -e 's/"x86_64-linux-gnu",/"x86_64-linux-gnu","x86_64-vine-linux","x86_64-
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
-DPYTHON_EXECUTABLE=%{__python3} \
|
|
|
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
|
|
-%ifarch %ix86
|
|
|
+%if %reduce_debuginfo == 1
|
|
|
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
|
|
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
|
|
%endif
|
|
@@ -203,31 +209,32 @@ sed -i -e 's/"x86_64-linux-gnu",/"x86_64-linux-gnu","x86_64-vine-linux","x86_64-
|
|
|
%else
|
|
|
-DLLVM_LIBDIR_SUFFIX= \
|
|
|
%endif
|
|
|
- -DCLANG_INCLUDE_TESTS:BOOL=OFF \
|
|
|
-DLLVM_BUILD_UTILS:BOOL=ON \
|
|
|
-DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extra-%{version}.src \
|
|
|
-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
|
|
|
\
|
|
|
-DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \
|
|
|
-DLLVM_COMMON_CMAKE_UTILS=%{_datadir}/llvm/cmake \
|
|
|
- -DCLANG_ENABLE_ARCMT:BOOL=ON \
|
|
|
- -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
|
|
|
- -DCLANG_INCLUDE_DOCS:BOOL=ON \
|
|
|
- -DCLANG_PLUGIN_SUPPORT:BOOL=OFF \
|
|
|
- -DLLVM_ENABLE_PLUGINS:BOOL=OFF \
|
|
|
- -DENABLE_LINKER_BUILD_ID:BOOL=ON \
|
|
|
+ \
|
|
|
+ -DBUILD_SHARED_LIBS=OFF \
|
|
|
-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 \
|
|
|
+ -DLLVM_INCLUDE_TESTS=OFF \
|
|
|
+ -DENABLE_LINKER_BUILD_ID:BOOL=ON \
|
|
|
-DCLANG_BUILD_EXAMPLES:BOOL=OFF \
|
|
|
- -DBUILD_SHARED_LIBS=OFF \
|
|
|
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR=%{_sysconfdir}/clang/ \
|
|
|
+ -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \
|
|
|
+ -DCLANG_DEFAULT_UNWINDLIB=libgcc \
|
|
|
+ -DCLANG_ENABLE_ARCMT:BOOL=ON \
|
|
|
+ -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
|
|
|
+ -DCLANG_INCLUDE_DOCS:BOOL=ON \
|
|
|
+ -DCLANG_INCLUDE_TESTS:BOOL=OFF \
|
|
|
+ -DCLANG_LINK_CLANG_DYLIB=ON \
|
|
|
+ -DCLANG_PLUGIN_SUPPORT:BOOL=ON \
|
|
|
-DCLANG_REPOSITORY_STRING="Vine Linux %{version}-%{release}" \
|
|
|
- -DCLANG_DEFAULT_UNWINDLIB=libgcc
|
|
|
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extra-%{version}.src \
|
|
|
+ %{nil}
|
|
|
|
|
|
%cmake_build
|
|
|
|
|
@@ -237,9 +244,6 @@ rm -rf %{buildroot}
|
|
|
|
|
|
%cmake_install
|
|
|
|
|
|
-# remove static libraries
|
|
|
-rm -fv %{buildroot}%{_libdir}/libclang*.a
|
|
|
-
|
|
|
# Add clang++-{version} symlink
|
|
|
ln -s clang++ %{buildroot}%{_bindir}/clang++-%{ver_suffix}
|
|
|
|
|
@@ -248,15 +252,14 @@ mkdir -p %{buildroot}%{python3_sitelib}/clang/
|
|
|
install -p -m644 bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/
|
|
|
|
|
|
# install scanbuild-py to python sitelib.
|
|
|
-mv %{buildroot}%{_libdir}/{libear,libscanbuild} %{buildroot}%{python3_sitelib}
|
|
|
+mv %{buildroot}%{_prefix}/lib/{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
|
|
|
|
|
|
# TODO: Package html docs
|
|
|
rm -Rvf %{buildroot}%{_docdir}/clang/html
|
|
|
-rm -Rvf %{buildroot}%{_datadir}/clang/clang-doc-default-stylesheet.css
|
|
|
-rm -Rvf %{buildroot}%{_datadir}/clang/index.js
|
|
|
+rm -Rvf %{buildroot}%{_datadir}/clang-doc
|
|
|
|
|
|
# remove git integration
|
|
|
rm -vf %{buildroot}%{_bindir}/git-clang-format
|
|
@@ -286,12 +289,7 @@ rm -Rvf %{buildroot}%{_includedir}/clang-tidy/
|
|
|
%endif
|
|
|
|
|
|
|
|
|
-%clean
|
|
|
-rm -rf %{buildroot}
|
|
|
-
|
|
|
-
|
|
|
%files
|
|
|
-%defattr(-,root,root,-)
|
|
|
#doc %{llvmdocdir clang}/
|
|
|
%{_bindir}/clang
|
|
|
%{_bindir}/clang++
|
|
@@ -301,13 +299,11 @@ rm -rf %{buildroot}
|
|
|
%{_bindir}/clang-cpp
|
|
|
|
|
|
%files libs
|
|
|
-%defattr(-,root,root,-)
|
|
|
%{_libdir}/clang
|
|
|
%{_libdir}/libclang.so.*
|
|
|
%{_libdir}/libclang-cpp.so.*
|
|
|
|
|
|
%files devel
|
|
|
-%defattr(-,root,root,-)
|
|
|
#doc %{llvmdocdir clang-devel}/
|
|
|
%{_libdir}/libclang.so
|
|
|
%{_libdir}/libclang-cpp.so
|
|
@@ -316,8 +312,11 @@ rm -rf %{buildroot}
|
|
|
%dir %{_datadir}/clang/
|
|
|
%{_libdir}/cmake/*
|
|
|
|
|
|
+%files static
|
|
|
+%{_libdir}/libclang*.a
|
|
|
+%{_libdir}/libfindAllSymbols.a
|
|
|
+
|
|
|
%files analyzer
|
|
|
-%defattr(-,root,root,-)
|
|
|
%{_bindir}/analyze-build
|
|
|
%{_bindir}/intercept-build
|
|
|
%{_bindir}/scan-build
|
|
@@ -360,6 +359,9 @@ rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Thu Nov 14 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.1.3-1
|
|
|
+- new upstream release.
|
|
|
+
|
|
|
* Sat May 04 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 18.1.5-1
|
|
|
- new upstream release.
|
|
|
|