diff options
| author | dan <i@dan.games> | 2025-10-11 11:42:43 +0800 |
|---|---|---|
| committer | Hilton Chain <hako@ultrarare.space> | 2025-11-02 23:06:17 +0800 |
| commit | ac2306c5ad0ea4d456adfeb7436db985f481f43e (patch) | |
| tree | b5e84940eb60e553ab130a0ed65fb915f58b7887 /gnu/packages/llvm.scm | |
| parent | 5b3fa1658c4fd1315698b139be41e62f9fdc2aae (diff) | |
gnu: clang-17: Fix build with gcc-14 on ARM.
* gnu/packages/patches/clang-17.0-fix-build-with-gcc-14-on-arm.patch: New file.
* gnu/local.mk: Register it.
* gnu/packages/llvm.scm (clang-from-llvm): Treat patches as additional patches
when no hash provided.
(clang-17): Apply the patch.
Change-Id: I2c6580958c6d646703143872bbc59fd390e9cc95
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Diffstat (limited to 'gnu/packages/llvm.scm')
| -rw-r--r-- | gnu/packages/llvm.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 03c3c47e9ec..15f337cfbb0 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -30,6 +30,7 @@ ;;; Copyright © 2024, 2025 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2025 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2025 Liam Hupfer <liam@hpfr.net> +;;; Copyright © 2025 dan <i@dan.games> ;;; ;;; This file is part of GNU Guix. ;;; @@ -266,7 +267,14 @@ until LLVM/Clang 14." version)) (sha256 (base32 hash)) (patches (map search-patch patches))) - (llvm-monorepo (package-version llvm)))) + (if patches + (let ((llvm-source (llvm-monorepo (package-version llvm)))) + (origin + (inherit llvm-source) + (patches + (append (origin-patches llvm-source) + (map search-patch patches))))) + (llvm-monorepo (package-version llvm))))) ;; Using cmake allows us to treat llvm as an external library. There ;; doesn't seem to be any way to do this with clang's autotools-based ;; build system. @@ -1080,6 +1088,7 @@ Library.") (define-public clang-17 (clang-from-llvm llvm-17 clang-runtime-17 + #:patches '("clang-17.0-fix-build-with-gcc-14-on-arm.patch") #:tools-extra (origin (method url-fetch) |
