Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
Name: llvm
-Version: 16.0.6
-Release: 1
+Version: 17.0.4
+Release: 3
License: Apache 2.0 with LLVM exceptions
Group: Development/Languages
#Source0Download: https://github.com/llvm/llvm-project/releases/
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{name}-%{version}.src.tar.xz
-# Source0-md5: 7d986cda69719a35bd5ecb266fcf1f65
+# Source0-md5: c6839c2bde72d67204294ba139502cc3
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-%{version}.src.tar.xz
-# Source1-md5: 70053a666251fdcabc466ea4a0275972
+# Source1-md5: 67eba128307f3fc6e2cf35a50ea68521
Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/compiler-rt-%{version}.src.tar.xz
-# Source2-md5: 79eb1121d4990a6585787e6b68361afe
+# Source2-md5: 3eddd3fbb22ee320d01b7695b3e42bad
Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lldb-%{version}.src.tar.xz
-# Source3-md5: 89ab2812e99d35fae6a0141bb57b9b1d
+# Source3-md5: 0019e41b3ca31ed83c393512999faf87
Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/polly-%{version}.src.tar.xz
-# Source4-md5: 540613f9eaffb7bd05dfd77b52e6a4e2
+# Source4-md5: 9160fb42a88a76207b644e601ae6878a
Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz
-# Source5-md5: 775a93a7b168101f544dbfed23ac4aaa
+# Source5-md5: e715a4ad675f61bef388e6d194103d56
Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lld-%{version}.src.tar.xz
-# Source6-md5: 9c9530a0853624a869917853a2da2bd1
+# Source6-md5: f0be491a288cd710bfb53f5c624fc0c7
Source7: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/flang-%{version}.src.tar.xz
-# Source7-md5: 988186ce1f8629f924660e350a57e000
+# Source7-md5: 2b379d054681b6f270a57c727973e5b4
Source8: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/mlir-%{version}.src.tar.xz
-# Source8-md5: 9c9dac6bd7fdaf682f60fabca839c578
+# Source8-md5: 88d94ddb6f964130cd2a61e0c79f77c2
Source9: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cmake-%{version}.src.tar.xz
-# Source9-md5: b7830bb90e376c90a43c2c190a0a5ffa
+# Source9-md5: 38ae9cc0950f277c8f88e570c4d18010
Patch1: %{name}-tld.patch
+Patch2: %{name}-ocaml-link-dylib.patch
Patch3: x32-gcc-toolchain.patch
-Patch4: cmake-buildtype.patch
Patch5: %{name}-ocaml-shared.patch
Patch6: %{name}-flang.patch
Patch7: llvm12-build_fixes.patch
Patch9: %{name}-libexecdir.patch
Patch10: compiler-rt-paths.patch
Patch11: cmake-utils-path-override.patch
-Patch12: x32-compiler-rt.patch
+Patch12: cmake-utils-path-override-rt.patch
+Patch13: x32-compiler-rt.patch
URL: https://llvm.org/
BuildRequires: bash
BuildRequires: binutils-devel
BuildRequires: bison
-BuildRequires: cmake >= 3.13.4
+BuildRequires: cmake >= 3.20.0
BuildRequires: flex
BuildRequires: groff
%{?with_libatomic:BuildRequires: libatomic-devel}
ExcludeArch: ppc64
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define abi 16
+%define abi 17
%define _sysconfdir /etc/%{name}
%define specflags_ppc -fno-var-tracking-assignments
%{__mv} cmake-%{version}.src cmake-utils
%patch1 -p1
+%patch2 -p1
%patch3 -p1
-%patch4 -p1
%patch5 -p1
%if %{with flang}
%patch6 -p1
%if %{with rt}
%patch10 -p1
%patch12 -p1
+%patch13 -p1
%endif
%patch11 -p1
CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
%if %{with lowmem}
-export CFLAGS="%{rpmcflags} -NDEBUG -g0"
-export CXXFLAGS="%{rpmcxxflags} -NDEBUG -g0"
+export CFLAGS="%{rpmcflags} -DNDEBUG -g0"
+export CXXFLAGS="%{rpmcxxflags} -DNDEBUG -g0"
if echo 'int main(){}' | %{__cc} -x c %{rpmldflags} -Wl,--reduce-memory-overheads -o /dev/null - > /dev/null 2>&1; then
export LDFLAGS="%{rpmldflags} -Wl,--reduce-memory-overheads"
fi
-DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
-DLLVM_INSTALL_PACKAGE_DIR=%(realpath -m "--relative-to=%{_prefix}" "%{_libdir}/cmake/llvm") \
-DLLVM_TOOLS_INSTALL_DIR=%(realpath -m "--relative-to=%{_prefix}" "%{_bindir}") \
-%ifarch %{arm}
- -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR:BOOL=ON \
-%endif
%if %{with apidocs}
-DLLVM_ENABLE_DOXYGEN:BOOL=ON \
%endif
%if %{with doc}
%{__make} -C docs docs-llvm-html
%{__make} -C docs docs-llvm-man
-%if %{with ocaml}
-%{__make} -C docs ocaml_doc
-%endif
%{__make} -C tools/clang/docs docs-clang-html
%{__make} -C tools/clang/docs docs-clang-man
%{__make} -C tools/lld/docs docs-lld-html
%{__make} -C tools/lldb/docs lldb-cpp-doc
%endif
%endif
+%if %{with ocaml}
+%{__make} -C docs ocaml_doc
+%endif
%install
rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
# non-soname symlink
%attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
-%attr(755,root,root) %{_libdir}/libLTO.so.16
-%attr(755,root,root) %{_libdir}/libRemarks.so.16
-%attr(755,root,root) %{_libdir}/libclang-cpp.so.16
+%attr(755,root,root) %{_libdir}/libLTO.so.17
+%attr(755,root,root) %{_libdir}/libRemarks.so.17
+%attr(755,root,root) %{_libdir}/libclang-cpp.so.17
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/mlir-reduce
%attr(755,root,root) %{_bindir}/mlir-tblgen
%attr(755,root,root) %{_bindir}/mlir-translate
-%attr(755,root,root) %{_libdir}/libMLIR.so.16
-%attr(755,root,root) %{_libdir}/libmlir_async_runtime.so.16
-%attr(755,root,root) %{_libdir}/libmlir_c_runner_utils.so.16
-%attr(755,root,root) %{_libdir}/libmlir_float16_utils.so.16
-%attr(755,root,root) %{_libdir}/libmlir_runner_utils.so.16
+%attr(755,root,root) %{_libdir}/libMLIR.so.17
+%attr(755,root,root) %{_libdir}/libmlir_async_runtime.so.17
+%attr(755,root,root) %{_libdir}/libmlir_c_runner_utils.so.17
+%attr(755,root,root) %{_libdir}/libmlir_float16_utils.so.17
+%attr(755,root,root) %{_libdir}/libmlir_runner_utils.so.17
%if %{with doc}
%{_mandir}/man1/mlir-tblgen.1*
%endif
%defattr(644,root,root,755)
%doc tools/polly/{CREDITS.txt,LICENSE.TXT,README} tools/polly/www/{bugs,changelog,contributors}.html
%attr(755,root,root) %{_libdir}/LLVMPolly.so
-%{?with_target_nvptx:%attr(755,root,root) %{_libdir}/libGPURuntime.so}
%files polly-devel
%defattr(644,root,root,755)
%{_libdir}/libPolly.a
%{_libdir}/libPollyISL.a
-%{?with_target_nvptx:%{_libdir}/libPollyPPCG.a}
%{_includedir}/polly
%{_libdir}/cmake/polly
%endif
%files -n clang-libs
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libclang.so.16
+%attr(755,root,root) %{_libdir}/libclang.so.17
%attr(755,root,root) %{_libdir}/libclang.so.*.*.*
%files -n clang-devel
%attr(755,root,root) %{_bindir}/lldb-server
%attr(755,root,root) %{_bindir}/lldb-vscode
%attr(755,root,root) %{_libdir}/liblldb.so.%{version}
-%attr(755,root,root) %ghost %{_libdir}/liblldb.so.16
-%attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.16
+%attr(755,root,root) %ghost %{_libdir}/liblldb.so.17
+%attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.17
%dir %{py3_sitedir}/lldb
%attr(755,root,root) %{py3_sitedir}/lldb/lldb-argdumper
%{py3_sitedir}/lldb/formatters