From 632ea2db9869459aac88767b2c6aebb70b8c43e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sun, 7 Sep 2025 12:47:34 +0200 Subject: [PATCH] gnu: wllvm: Refer to binutils and file by path. Without these dependencies, wllvm cannot compile any code. * gnu/packages/llvm.scm (wllvm)[inputs]: Add binutils and file. [arguments]: Add 'fix-paths phase. Change-Id: I5727e55b889f8cebb1a8b20c5f1fce545b252e77 Signed-off-by: Andreas Enge --- gnu/packages/llvm.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index fe64db6a3546bf5bf34fca1bae20cade1e5ac575..c721be5226eb2b565f01871b75a449d58f364ce9 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -68,6 +68,7 @@ #:use-module (gnu packages bootstrap) ;glibc-dynamic-linker #:use-module (gnu packages check) ;python-lit #:use-module (gnu packages compression) + #:use-module (gnu packages file) #:use-module (gnu packages libedit) #:use-module (gnu packages libffi) #:use-module (gnu packages linux) @@ -1842,6 +1843,25 @@ LLVM.")))) (sha256 (base32 "0cf31hixzq5bzkxv91rvadlhrpxzy934134scv4frj85bxbpl19y")))) (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((pystr (lambda (s) (string-append "'" s "'")))) + (substitute* "wllvm/compilers.py" + (("'objcopy'") + (pystr (search-input-file inputs "/bin/objcopy")))) + (substitute* "wllvm/extraction.py" + (("'objdump'") + (pystr (search-input-file inputs "/bin/objdump"))) + (("'ar'") + (pystr (search-input-file inputs "/bin/ar")))) + (substitute* "wllvm/filetype.py" + (("'file'") + (pystr (search-input-file inputs "/bin/file")))))))))) + (inputs (list binutils file)) (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/SRI-CSL/whole-program-llvm") (synopsis "Whole Program LLVM")