diff --git a/packages/l/llvm-bolt/abi_used_symbols b/packages/l/llvm-bolt/abi_used_symbols index d322a4fa0f9..5210e1226e7 100644 --- a/packages/l/llvm-bolt/abi_used_symbols +++ b/packages/l/llvm-bolt/abi_used_symbols @@ -4,15 +4,19 @@ libc.so.6:__ctype_tolower_loc libc.so.6:__ctype_toupper_loc libc.so.6:__cxa_atexit libc.so.6:__errno_location +libc.so.6:__getcwd_chk libc.so.6:__isoc23_strtol libc.so.6:__isoc23_strtoll libc.so.6:__isoc23_strtoull libc.so.6:__libc_single_threaded libc.so.6:__libc_start_main libc.so.6:__memcpy_chk +libc.so.6:__readlink_chk +libc.so.6:__realpath_chk libc.so.6:__sched_cpucount -libc.so.6:__snprintf_chk libc.so.6:__stack_chk_fail +libc.so.6:__vprintf_chk +libc.so.6:__vsnprintf_chk libc.so.6:_exit libc.so.6:abort libc.so.6:access @@ -77,7 +81,6 @@ libc.so.6:posix_spawn_file_actions_addopen libc.so.6:posix_spawn_file_actions_destroy libc.so.6:posix_spawn_file_actions_init libc.so.6:pread -libc.so.6:printf libc.so.6:pthread_attr_destroy libc.so.6:pthread_attr_init libc.so.6:pthread_attr_setstacksize @@ -92,13 +95,11 @@ libc.so.6:pthread_rwlock_wrlock libc.so.6:pthread_self libc.so.6:pthread_setname_np libc.so.6:pthread_sigmask -libc.so.6:putchar libc.so.6:qsort libc.so.6:raise libc.so.6:rand libc.so.6:read libc.so.6:readdir -libc.so.6:readlink libc.so.6:realloc libc.so.6:realpath libc.so.6:remove @@ -109,7 +110,6 @@ libc.so.6:sigaltstack libc.so.6:sigemptyset libc.so.6:sigfillset libc.so.6:sigprocmask -libc.so.6:snprintf libc.so.6:srand libc.so.6:stat libc.so.6:statfs diff --git a/packages/l/llvm-bolt/files/0001-Partial-Revert-of-BOLT-Fix-.relr-section-addend-patc.patch b/packages/l/llvm-bolt/files/0001-Partial-Revert-of-BOLT-Fix-.relr-section-addend-patc.patch new file mode 100644 index 00000000000..f5387838294 --- /dev/null +++ b/packages/l/llvm-bolt/files/0001-Partial-Revert-of-BOLT-Fix-.relr-section-addend-patc.patch @@ -0,0 +1,54 @@ +From d36e304cc0a0b12e61437c2062314595b8246eee Mon Sep 17 00:00:00 2001 +From: Joey Riches +Date: Tue, 15 Oct 2024 23:41:01 +0100 +Subject: [PATCH 1/1] Partial Revert of "[BOLT] Fix .relr section addend + patching" + +0053cb8ef0a13b444bea598159f873fade200367 + +something is bork on x86 +--- + bolt/lib/Rewrite/RewriteInstance.cpp | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp +index 32ec7abe8b66..f7f63b2ea956 100644 +--- a/bolt/lib/Rewrite/RewriteInstance.cpp ++++ b/bolt/lib/Rewrite/RewriteInstance.cpp +@@ -5068,11 +5068,9 @@ void RewriteInstance::patchELFAllocatableRelrSection( + const uint8_t PSize = BC->AsmInfo->getCodePointerSize(); + const uint64_t MaxDelta = ((CHAR_BIT * DynamicRelrEntrySize) - 1) * PSize; + +- auto FixAddend = [&](const BinarySection &Section, const Relocation &Rel, +- uint64_t FileOffset) { ++ auto FixAddend = [&](const BinarySection &Section, const Relocation &Rel) { + // Fix relocation symbol value in place if no static relocation found +- // on the same address. We won't check the BF relocations here since it +- // is rare case and no optimization is required. ++ // on the same address + if (Section.getRelocationAt(Rel.Offset)) + return; + +@@ -5081,6 +5079,10 @@ void RewriteInstance::patchELFAllocatableRelrSection( + if (!Addend) + return; + ++ uint64_t FileOffset = Section.getOutputFileOffset(); ++ if (!FileOffset) ++ FileOffset = Section.getInputFileOffset(); ++ FileOffset += Rel.Offset; + OS.pwrite(reinterpret_cast(&Addend), PSize, FileOffset); + }; + +@@ -5102,7 +5104,7 @@ void RewriteInstance::patchELFAllocatableRelrSection( + RelOffset = RelOffset == 0 ? SectionAddress + Rel.Offset : RelOffset; + assert((RelOffset & 1) == 0 && "Wrong relocation offset"); + RelOffsets.emplace(RelOffset); +- FixAddend(Section, Rel, RelOffset); ++ FixAddend(Section, Rel); + } + } + +-- +2.47.0 + diff --git a/packages/l/llvm-bolt/package.yml b/packages/l/llvm-bolt/package.yml index 9f6e2f2f6f9..c34d5441047 100644 --- a/packages/l/llvm-bolt/package.yml +++ b/packages/l/llvm-bolt/package.yml @@ -1,13 +1,13 @@ name : llvm-bolt version : 18.1.8 -release : 6 +release : 7 source : - https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/llvm-project-18.1.8.src.tar.xz : 0b58557a6d32ceee97c8d533a59b9212d87e0fc4d2833924eb6c611247db2f2a homepage : https://github.com/llvm/llvm-project/blob/main/bolt/README.md license : Apache-2.0 component : programming.tools summary : Binary Optimization and Layout Tool. -description: |- +description: | BOLT is a post-link optimizer developed to speed up large applications. It achieves the improvements by optimizing application's code layout based on execution profile gathered by sampling profiler, such as Linux perf tool. patterns : - /usr/lib/libbolt_rt*.a @@ -15,6 +15,7 @@ clang : yes builddeps : - git setup : | + %patch -p1 -i $pkgfiles/0001-Partial-Revert-of-BOLT-Fix-.relr-section-addend-patc.patch %cmake_ninja -S llvm \ -DLLVM_INSTALL_UTILS=ON \ -DBUILD_SHARED_LIBS:BOOL=OFF \ diff --git a/packages/l/llvm-bolt/pspec_x86_64.xml b/packages/l/llvm-bolt/pspec_x86_64.xml index bc25a917d52..0ab7ffeeb21 100644 --- a/packages/l/llvm-bolt/pspec_x86_64.xml +++ b/packages/l/llvm-bolt/pspec_x86_64.xml @@ -3,19 +3,21 @@ llvm-bolt https://github.com/llvm/llvm-project/blob/main/bolt/README.md - Reilly Brogan - solus@reillybrogan.com + Joey Riches + josephriches@gmail.com Apache-2.0 programming.tools Binary Optimization and Layout Tool. - BOLT is a post-link optimizer developed to speed up large applications. It achieves the improvements by optimizing application's code layout based on execution profile gathered by sampling profiler, such as Linux perf tool. + BOLT is a post-link optimizer developed to speed up large applications. It achieves the improvements by optimizing application's code layout based on execution profile gathered by sampling profiler, such as Linux perf tool. + https://sources.getsol.us/README.Solus llvm-bolt Binary Optimization and Layout Tool. - BOLT is a post-link optimizer developed to speed up large applications. It achieves the improvements by optimizing application's code layout based on execution profile gathered by sampling profiler, such as Linux perf tool. + BOLT is a post-link optimizer developed to speed up large applications. It achieves the improvements by optimizing application's code layout based on execution profile gathered by sampling profiler, such as Linux perf tool. + programming.tools /usr/bin/llvm-bolt @@ -28,12 +30,12 @@ - - 2024-07-03 + + 2024-10-15 18.1.8 Packaging update - Reilly Brogan - solus@reillybrogan.com + Joey Riches + josephriches@gmail.com \ No newline at end of file diff --git a/packages/l/llvm/package.yml b/packages/l/llvm/package.yml index 6a0f3b2e92b..7b1de62e680 100644 --- a/packages/l/llvm/package.yml +++ b/packages/l/llvm/package.yml @@ -1,6 +1,6 @@ name : llvm version : 18.1.8 -release : 120 +release : 121 source : - https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/llvm-project-18.1.8.src.tar.xz : 0b58557a6d32ceee97c8d533a59b9212d87e0fc4d2833924eb6c611247db2f2a homepage : http://llvm.org/ @@ -336,29 +336,29 @@ install : | ### BOLT # Instrument - #bolt_instr $workdir/solusBuildDir/lib64/libclang-cpp.so.18.1 - #bolt_instr $workdir/solusBuildDir/lib64/libLLVM.so.18.1 + %bolt_instr $workdir/solusBuildDir/lib64/libclang-cpp.so.18.1 + %bolt_instr $workdir/solusBuildDir/lib64/libLLVM.so.18.1 # Profile - # cmake -G Ninja -B bolt-profile -S runtimes \ - # ${CMAKE_COMMON_OPTIONS} \ - # ${CMAKE_X84_64_OPTIONS} \ - # -DCMAKE_AR=$workdir/solusBuildDir/bin/llvm-ar \ - # -DCMAKE_NM=$workdir/solusBuildDir/bin/llvm-nm \ - # -DCMAKE_RANLIB=$workdir/solusBuildDir/bin/llvm-ranlib \ - # -DCMAKE_C_COMPILER=$workdir/solusBuildDir/bin/clang \ - # -DCMAKE_CXX_COMPILER=$workdir/solusBuildDir/bin/clang++ \ - # -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi' \ - # -DCMAKE_C_FLAGS_RELEASE="$_LLVM_FLAGS_FINAL" \ - # -DCMAKE_CXX_FLAGS_RELEASE="$_LLVM_FLAGS_FINAL" - # ninja %JOBS% -C bolt-profile -v + cmake -G Ninja -B bolt-profile -S runtimes \ + ${CMAKE_COMMON_OPTIONS} \ + ${CMAKE_X84_64_OPTIONS} \ + -DCMAKE_AR=$workdir/solusBuildDir/bin/llvm-ar \ + -DCMAKE_NM=$workdir/solusBuildDir/bin/llvm-nm \ + -DCMAKE_RANLIB=$workdir/solusBuildDir/bin/llvm-ranlib \ + -DCMAKE_C_COMPILER=$workdir/solusBuildDir/bin/clang \ + -DCMAKE_CXX_COMPILER=$workdir/solusBuildDir/bin/clang++ \ + -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi' \ + -DCMAKE_C_FLAGS_RELEASE="$_LLVM_FLAGS_FINAL" \ + -DCMAKE_CXX_FLAGS_RELEASE="$_LLVM_FLAGS_FINAL" + ninja %JOBS% -C bolt-profile -v # Merge and optimize - #bolt_merge $workdir/solusBuildDir/lib64/libclang-cpp.so.18.1 - #bolt_merge $workdir/solusBuildDir/lib64/libLLVM.so.18.1 - #bolt_opt $workdir/solusBuildDir/lib64/libclang-cpp.so.18.1 - #bolt_opt $workdir/solusBuildDir/lib64/libLLVM.so.18.1 - # Install BOLT'd libs over the LTO build - #install -Dm00777 $workdir/solusBuildDir/lib64/libLLVM.so.18.1 $installdir/usr/lib64/libLLVM.so.18.1 - #install -Dm00755 $workdir/solusBuildDir/lib64/libclang-cpp.so.18.1 $installdir/usr/lib64/libclang-cpp.so.18.1 + %bolt_merge $workdir/solusBuildDir/lib64/libclang-cpp.so.18.1 + %bolt_merge $workdir/solusBuildDir/lib64/libLLVM.so.18.1 + %bolt_opt $workdir/solusBuildDir/lib64/libclang-cpp.so.18.1 + %bolt_opt $workdir/solusBuildDir/lib64/libLLVM.so.18.1 + # Install BOLT'd libs + install -Dm00777 $workdir/solusBuildDir/lib64/libLLVM.so.18.1 $installdir/usr/lib64/libLLVM.so.18.1 + install -Dm00755 $workdir/solusBuildDir/lib64/libclang-cpp.so.18.1 $installdir/usr/lib64/libclang-cpp.so.18.1 # Make sure that the .defs files are arch-dependent pushd $installdir/usr/include/llvm/Config diff --git a/packages/l/llvm/pspec_x86_64.xml b/packages/l/llvm/pspec_x86_64.xml index c1f740c37f0..c236308af9d 100644 --- a/packages/l/llvm/pspec_x86_64.xml +++ b/packages/l/llvm/pspec_x86_64.xml @@ -3,8 +3,8 @@ llvm http://llvm.org/ - Reilly Brogan - solus@reillybrogan.com + Joey Riches + josephriches@gmail.com Apache-2.0 WITH LLVM-exception programming @@ -74,7 +74,7 @@ emul32 - llvm + llvm /usr/lib32/LLVMgold.so @@ -104,8 +104,8 @@ programming.devel - llvm-32bit - llvm-devel + llvm-32bit + llvm-devel /usr/bin/llvm-config32 @@ -289,8 +289,8 @@ programming - llvm - llvm-devel + llvm + llvm-devel /usr/bin/UnicodeNameMappingGenerator @@ -756,7 +756,7 @@ emul32 - llvm-32bit + llvm-32bit /usr/lib32/libclang-cpp.so.18.1 @@ -774,8 +774,8 @@ programming.devel - llvm-clang-32bit - llvm-clang-devel + llvm-clang-32bit + llvm-clang-devel /usr/lib/clang/18/lib/i386-pc-linux-gnu/clang_rt.crtbegin.o @@ -1075,7 +1075,7 @@ programming.devel - llvm-clang + llvm-clang /usr/bin/clang-tblgen @@ -2266,7 +2266,7 @@ programming.devel - llvm + llvm /usr/bin/FileCheck @@ -7683,12 +7683,12 @@ - - 2024-07-03 + + 2024-10-15 18.1.8 Packaging update - Reilly Brogan - solus@reillybrogan.com + Joey Riches + josephriches@gmail.com \ No newline at end of file