summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-11-15 08:21:03 +0200
committerEfraim Flashner <efraim@flashner.co.il>2023-11-15 17:14:16 +0200
commit9d01a83b2ea63746803e125486fd66d669c220f0 (patch)
tree3ffd1c79a9791ba24c7bb2a89c37747e78331d74
parent66132d6a20b3a8fa4649df338568765540057bd1 (diff)
downloadguix-9d01a83b2ea63746803e125486fd66d669c220f0.tar.gz
gnu: mold: Update to 2.3.2.
* gnu/packages/mold.scm (mold): Update to 2.3.2.
[source]: Add snippet to fix i686-linux detection.
[arguments]: Add a phase to skip a test requiring a newer version of
tbb.  Add a configure-flag to enable tests.

Change-Id: I9bc06b13c41b236844df3074206bb035ecd2bd06
-rw-r--r--gnu/packages/mold.scm24
1 files changed, 21 insertions, 3 deletions
diff --git a/gnu/packages/mold.scm b/gnu/packages/mold.scm
index 1e67f80081..4ce3741be2 100644
--- a/gnu/packages/mold.scm
+++ b/gnu/packages/mold.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2023 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -34,7 +35,7 @@
 (define-public mold
   (package
     (name "mold")
-    (version "1.10.1")
+    (version "2.3.2")
     (source
      (origin
        (method git-fetch)
@@ -43,10 +44,22 @@
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1bqv1a93n3nks38k8fdc5i7v7ca2sav8n4xxaph0ikaqw1mkjcg7"))
+        (base32 "1p6w92caysy9h0vkl26iv3viv0lvwzvbd357yykls0p13hnzlzkr"))
        (modules '((guix build utils)))
        (snippet
         #~(begin
+            ;; Fix detection of i686 systems.
+            ;; This can be removed with the next release of mold.
+            (substitute* "test/elf/common.inc"
+              (("echo i386") "echo i686"))
+            (substitute* '("test/elf/common.inc"
+                           "test/elf/global-offset-table.sh"
+                           "test/elf/i386_tls-module-base.sh"
+                           "test/elf/large-alignment-dso.sh"
+                           "test/elf/large-alignment.sh"
+                           "test/elf/nocopyreloc.sh"
+                           "test/elf/range-extension-thunk.sh")
+              (("MACHINE = i386") "MACHINE = i686"))
             (for-each
              (lambda (x)
                (delete-file-recursively (string-append "third-party/" x)))
@@ -55,7 +68,8 @@
     (arguments
      (list
       #:configure-flags #~(list "-DMOLD_USE_SYSTEM_MIMALLOC=ON"
-                                "-DMOLD_USE_SYSTEM_TBB=ON")
+                                "-DMOLD_USE_SYSTEM_TBB=ON"
+                                "-DBUILD_TESTING=ON")
       #:phases
       #~(modify-phases %standard-phases
           (add-before 'configure 'force-system-xxhash
@@ -69,6 +83,10 @@
                 (("CC=\"\\$\\{TEST_CC:-cc\\}\"") "CC=gcc")
                 (("CXX=\"\\$\\{TEST_CXX:-c\\+\\+\\}\"")
                  "CXX=g++"))))
+          (add-before 'configure 'skip-tbb-lto-test
+            (lambda _
+              ;; This test needs tbb 2021.9.0 or newer
+              (delete-file "test/elf/lto-version-script.sh")))
           (add-before 'configure 'disable-rpath-test
             (lambda _
               ;; This test fails because mold expect the RUNPATH as-is,