]> TLD Linux GIT Repositories - packages/llvm.git/commitdiff
- merged 17.0.4 from PLD master
authorMarcin Krol <hawk@tld-linux.org>
Fri, 15 Dec 2023 00:45:52 +0000 (01:45 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Fri, 15 Dec 2023 00:45:52 +0000 (01:45 +0100)
cmake-buildtype.patch [deleted file]
cmake-utils-path-override-rt.patch [new file with mode: 0644]
cmake-utils-path-override.patch
llvm-ocaml-link-dylib.patch [new file with mode: 0644]
llvm.spec

diff --git a/cmake-buildtype.patch b/cmake-buildtype.patch
deleted file mode 100644 (file)
index e0d7410..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -urNp -x '*.orig' llvm-11.0.1.src.org/CMakeLists.txt llvm-11.0.1.src/CMakeLists.txt
---- llvm-11.0.1.src.org/CMakeLists.txt 2021-03-25 22:28:14.616795886 +0100
-+++ llvm-11.0.1.src/CMakeLists.txt     2021-03-25 22:28:19.786759915 +0100
-@@ -264,11 +264,6 @@ endif()
- string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
--if (CMAKE_BUILD_TYPE AND
--    NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
--  message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
--endif()
--
- # LLVM_INSTALL_PACKAGE_DIR needs to be declared prior to adding the tools
- # subdirectory in order to have the value available for llvm-config.
- include(GNUInstallPackageDir)
diff --git a/cmake-utils-path-override-rt.patch b/cmake-utils-path-override-rt.patch
new file mode 100644 (file)
index 0000000..9911c8c
--- /dev/null
@@ -0,0 +1,11 @@
+--- llvm-17.0.2.src/projects/compiler-rt/CMakeLists.txt.orig   2023-10-03 08:37:35.000000000 +0200
++++ llvm-17.0.2.src/projects/compiler-rt/CMakeLists.txt        2023-10-07 10:31:48.211026182 +0200
+@@ -5,7 +5,7 @@
+ cmake_minimum_required(VERSION 3.20.0)
+-set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
++set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake" CACHE STRING "Path to CMake modules shared between projects")
+ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
+   NO_POLICY_SCOPE)
index 9886089b9ffd5f51c07b80ef318a9bcc8d0bfdab..5045dcb586316815d8be46813f3b488128f8d94e 100644 (file)
@@ -1,8 +1,8 @@
 --- llvm-15.0.2.src/CMakeLists.txt.orig        2022-10-15 23:14:23.474649716 +0200
 +++ llvm-15.0.2.src/CMakeLists.txt     2022-10-15 23:16:11.530931066 +0200
 --- llvm-15.0.2.src/CMakeLists.txt.orig        2022-10-15 23:14:23.474649716 +0200
 +++ llvm-15.0.2.src/CMakeLists.txt     2022-10-15 23:16:11.530931066 +0200
-@@ -231,7 +231,7 @@
-     "at least 3.20.0 now to avoid issues in the future!")
endif()
+@@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 3.20.0)
  
 -set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
 +set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake CACHE STRING "Path to CMake modules shared between projects")
  
 -set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
 +set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake CACHE STRING "Path to CMake modules shared between projects")
diff --git a/llvm-ocaml-link-dylib.patch b/llvm-ocaml-link-dylib.patch
new file mode 100644 (file)
index 0000000..e382acd
--- /dev/null
@@ -0,0 +1,25 @@
+--- llvm-17.0.4.src/cmake/modules/AddOCaml.cmake.orig  2023-11-06 21:27:39.906604595 +0100
++++ llvm-17.0.4.src/cmake/modules/AddOCaml.cmake       2023-11-06 22:12:34.479135305 +0100
+@@ -69,7 +69,7 @@ function(add_ocaml_library name)
+   endif()
+   if(LLVM_LINK_LLVM_DYLIB)
+-    list(APPEND ocaml_flags "-lLLVM")
++    list(APPEND ocaml_flags "-lLLVM-17")
+   else()
+     explicit_map_components_to_libraries(llvm_libs ${ARG_LLVM})
+     foreach( llvm_lib ${llvm_libs} )
+@@ -186,9 +186,13 @@ function(add_ocaml_library name)
+   endforeach()
+   if( NOT LLVM_OCAML_OUT_OF_TREE )
++    if(LLVM_LINK_LLVM_DYLIB)
++      add_dependencies("ocaml_${name}" LLVM)
++    else()
+     foreach( llvm_lib ${llvm_libs} )
+       add_dependencies("ocaml_${name}" "${llvm_lib}")
+     endforeach()
++    endif()
+   endif()
+   add_dependencies("ocaml_all" "ocaml_${name}")
index 6727ebfa6d868d459406a4a5fccc90607832ea27..d249ccc80ca6aab648a8c96d373c14b8836f4c1e 100644 (file)
--- a/llvm.spec
+++ b/llvm.spec
 Summary:       The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
 Summary(pl.UTF-8):     Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
 Name:          llvm
 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
 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:       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:       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:       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:       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:       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:       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:       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:       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:       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
 Patch1:                %{name}-tld.patch
+Patch2:                %{name}-ocaml-link-dylib.patch
 Patch3:                x32-gcc-toolchain.patch
 Patch3:                x32-gcc-toolchain.patch
-Patch4:                cmake-buildtype.patch
 Patch5:                %{name}-ocaml-shared.patch
 Patch6:                %{name}-flang.patch
 Patch7:                llvm12-build_fixes.patch
 Patch5:                %{name}-ocaml-shared.patch
 Patch6:                %{name}-flang.patch
 Patch7:                llvm12-build_fixes.patch
@@ -118,12 +118,13 @@ Patch8:           %{name}-selective_bindings.patch
 Patch9:                %{name}-libexecdir.patch
 Patch10:       compiler-rt-paths.patch
 Patch11:       cmake-utils-path-override.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
 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}
 BuildRequires: flex
 BuildRequires: groff
 %{?with_libatomic:BuildRequires:       libatomic-devel}
@@ -205,7 +206,7 @@ Requires:   %{name}-libs = %{version}-%{release}
 ExcludeArch:   ppc64
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 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
 %define                _sysconfdir     /etc/%{name}
 
 %define                specflags_ppc   -fno-var-tracking-assignments
@@ -706,8 +707,8 @@ Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem.
 %{__mv} cmake-%{version}.src cmake-utils
 
 %patch1 -p1
 %{__mv} cmake-%{version}.src cmake-utils
 
 %patch1 -p1
+%patch2 -p1
 %patch3 -p1
 %patch3 -p1
-%patch4 -p1
 %patch5 -p1
 %if %{with flang}
 %patch6 -p1
 %patch5 -p1
 %if %{with flang}
 %patch6 -p1
@@ -718,6 +719,7 @@ Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem.
 %if %{with rt}
 %patch10 -p1
 %patch12 -p1
 %if %{with rt}
 %patch10 -p1
 %patch12 -p1
+%patch13 -p1
 %endif
 %patch11 -p1
 
 %endif
 %patch11 -p1
 
@@ -743,8 +745,8 @@ cd build
 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
 
 %if %{with lowmem}
 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
 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
@@ -760,9 +762,6 @@ 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}") \
        -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 apidocs}
        -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
 %endif
@@ -811,9 +810,6 @@ fi
 %if %{with doc}
 %{__make} -C docs docs-llvm-html
 %{__make} -C docs docs-llvm-man
 %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/clang/docs docs-clang-html
 %{__make} -C tools/clang/docs docs-clang-man
 %{__make} -C tools/lld/docs docs-lld-html
@@ -826,6 +822,9 @@ cp -pnL %{_lib}/liblldb.so tools/lldb/docs/lldb/_lldb.so
 %{__make} -C tools/lldb/docs lldb-cpp-doc
 %endif
 %endif
 %{__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
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -1051,9 +1050,9 @@ 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}/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)
 
 %files devel
 %defattr(644,root,root,755)
@@ -1091,11 +1090,11 @@ rm -rf $RPM_BUILD_ROOT
 %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) %{_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
 %if %{with doc}
 %{_mandir}/man1/mlir-tblgen.1*
 %endif
@@ -1118,13 +1117,11 @@ rm -rf $RPM_BUILD_ROOT
 %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
 %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
 
 %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
 %{_includedir}/polly
 %{_libdir}/cmake/polly
 %endif
@@ -1248,7 +1245,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n clang-libs
 %defattr(644,root,root,755)
 
 %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) %{_libdir}/libclang.so.*.*.*
 
 %files -n clang-devel
@@ -1384,8 +1381,8 @@ rm -rf $RPM_BUILD_ROOT
 %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) %{_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
 %dir %{py3_sitedir}/lldb
 %attr(755,root,root) %{py3_sitedir}/lldb/lldb-argdumper
 %{py3_sitedir}/lldb/formatters