GNU bug report logs - #66701
[PATCH 00/14] Add LLVM 16 and 17.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Mon, 23 Oct 2023 12:31:01 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Hilton Chain <hako <at> ultrarare.space>
To: 66701 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Hilton Chain <hako <at> ultrarare.space>
Subject: [bug#66701] [PATCH 01/14] gnu: clang-runtime-from-llvm: Adjust inputs for version 15 or later.
Date: Mon, 23 Oct 2023 20:36:09 +0800
* gnu/packages/llvm.scm (clang-runtime-from-llvm)[native-inputs]: Add gcc-12
when version >= 15.
[inputs]: Add libffi when version >= 15.
(clang-runtime-15)[native-inputs,inputs]: Remove fields.

Change-Id: I4b385b937edbb7a2840b998b6dd3e31a17cb556f
---
 gnu/packages/llvm.scm | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index cd551f4e02..38c4047f48 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -26,6 +26,7 @@
 ;;; Copyright © 2022 John Kehayias <john.kehayias <at> protonmail.com>
 ;;; Copyright © 2022 Clément Lassieur <clement <at> lassieur.org>
 ;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com>
+;;; Copyright © 2023 Hilton Chain <hako <at> ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -139,9 +140,19 @@ (define* (clang-runtime-from-llvm llvm
            (patches (map search-patch patches)))
          (llvm-monorepo (package-version llvm))))
     (build-system cmake-build-system)
-    (native-inputs (package-native-inputs llvm))
+    (native-inputs
+     (if (version>=? version "15")
+         ;; TODO: Remove this when GCC 12 is the default.
+         ;; libfuzzer fails to build with GCC 11
+         (modify-inputs (package-native-inputs llvm)
+           (prepend gcc-12))
+         (package-native-inputs llvm)))
     (inputs
-     (list llvm))
+     (append
+      (list llvm)
+      (if (version>=? version "15")
+          (list libffi)
+          '())))
     (arguments
      `(;; Don't use '-g' during the build to save space.
        #:build-type "Release"
@@ -712,13 +723,7 @@ (define-public clang-runtime-15
           #~(modify-phases #$phases
               (add-after 'unpack 'change-directory
                 (lambda _
-                  (chdir "compiler-rt")))))))
-      (native-inputs
-       (modify-inputs (package-native-inputs template)
-         (prepend gcc-12)))             ;libfuzzer fails to build with GCC 11
-      (inputs
-       (modify-inputs (package-inputs template)
-         (append libffi))))))
+                  (chdir "compiler-rt"))))))))))
 
 (define-public clang-runtime-14
   (let ((template (clang-runtime-from-llvm llvm-14)))
-- 
2.41.0





This bug report was last modified 1 year and 184 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.