diff --git a/mold-2.34.1.tar.gz b/mold-2.35.0.tar.gz similarity index 56% rename from mold-2.34.1.tar.gz rename to mold-2.35.0.tar.gz index 3b382c7bdadf4328abeadb5b23f064fc301dbecc..e3229cbcf7c93e406fb837bf8d54558807c38fa1 100644 Binary files a/mold-2.34.1.tar.gz and b/mold-2.35.0.tar.gz differ diff --git a/mold.spec b/mold.spec index c26c4696867c50b0bae4f8ecafa07ef8d1180ad8..2cb46b661749080a3fd2c0b4443fcc3f3a94c577 100644 --- a/mold.spec +++ b/mold.spec @@ -1,8 +1,8 @@ %bcond_with ctest Name: mold -Version: 2.34.1 -Release: 2 +Version: 2.35.0 +Release: 1 Summary: A Modern Linker (mold) License: MIT URL: https://github.com/rui314/mold @@ -20,6 +20,9 @@ BuildRequires: libstdc++-static libdwarf-tools BuildRequires: tbb-devel >= 2021.11 +Requires(post): %{_sbindir}/alternatives +Requires(preun): %{_sbindir}/alternatives + # Allow building against the system-provided `xxhash.h` Patch0: 0001-Use-system-compatible-include-path-for-xxhash.h.patch @@ -52,9 +55,19 @@ rm -r third-party/{xxhash,zlib,zstd} %cmake_install chmod +x %{buildroot}%{_libdir}/mold/mold-wrapper.so +%post +if [ "$1" = 1 ]; then + %{_sbindir}/alternatives --install %{_bindir}/ld ld %{_bindir}/ld.mold 1 +fi + +%preun +if [ "$1" = 0 ]; then + %{_sbindir}/alternatives --remove ld %{_bindir}/ld.mold +fi + %files %license %{_docdir}/mold/LICENSE -%license %{_docdir}/mold/LICENSE.third-party +%ghost %{_bindir}/ld %{_bindir}/mold %{_bindir}/ld.mold %dir %{_libdir}/mold @@ -65,6 +78,10 @@ chmod +x %{buildroot}%{_libdir}/mold/mold-wrapper.so %{_mandir}/man1/mold.1* %changelog +* Sun Dec 08 2024 Funda Wang - 2.35.0-1 +- update to 2.35.0 +- use alternatives for ld + * Wed Nov 27 2024 jchzhou - 2.34.1-2 - Remove hardcoded building dir as cmake improvements landed on master[1] - 1. https://gitee.com/src-openeuler/cmake/pulls/80