From 47b7a9f666869030f79f701f9619ff6bc1ba1a6e Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 27 Nov 2025 11:27:46 +0000 Subject: [PATCH 1/2] guix: binutils 2.46.0 --- contrib/guix/manifest.scm | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 0771524bff3..4fd901e57a5 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -23,6 +23,7 @@ (guix build-system python) (guix build-system pyproject) (guix build-system trivial) + (guix download) (guix gexp) (guix git-download) ((guix licenses) #:prefix license:) @@ -38,13 +39,36 @@ FILE-NAME found in ./patches relative to the current file." (define building-on (string-append "--build=" (list-ref (string-split (%current-system) #\-) 0) "-guix-linux-gnu")) +(define (base-binutils target) + (package + (inherit (cross-binutils target)) ;; 2.44 + (version "2.46.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/binutils/binutils-" + version ".tar.bz2")) + (sha256 + (base32 + "04nd9vl7c1pxjbc9wh3ckddzhz5g82xyjqq9y9kf171a59im4c8g")))) + (arguments + (substitute-keyword-arguments (package-arguments (cross-binutils target)) + ((#:configure-flags flags) + #~(append #$flags + (list "--enable-gprofng=no"))))) + (native-inputs + (modify-inputs + (package-native-inputs (cross-binutils target)) + (delete "bison"))) + ) +) + (define (make-cross-toolchain target base-gcc-for-libc base-kernel-headers base-libc base-gcc) "Create a cross-compilation toolchain package for TARGET" - (let* ((xbinutils (cross-binutils target)) + (let* ((xbinutils (base-binutils target)) ;; 1. Build a cross-compiling gcc without targeting any libc, derived ;; from BASE-GCC-FOR-LIBC (xgcc-sans-libc (cross-gcc target @@ -119,7 +143,7 @@ desirable for building Bitcoin Core release binaries." (define (make-mingw-pthreads-cross-toolchain target) "Create a cross-compilation toolchain package for TARGET" - (let* ((xbinutils (binutils-mingw-patches (cross-binutils target))) + (let* ((xbinutils (binutils-mingw-patches (base-binutils target))) (machine (substring target 0 (string-index target #\-))) (pthreads-xlibc (winpthreads-patches (make-mingw-w64 machine #:xgcc (cross-gcc target #:xgcc base-gcc) From 19e99be011ba953a6df0c5866a034debe86925e4 Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 6 Mar 2026 15:46:11 +0000 Subject: [PATCH 2/2] guix: remove riscv exclusion from symbol check --- contrib/guix/symbol-check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/guix/symbol-check.py b/contrib/guix/symbol-check.py index d31d5aa83bc..86b7965277c 100755 --- a/contrib/guix/symbol-check.py +++ b/contrib/guix/symbol-check.py @@ -202,7 +202,7 @@ def check_exported_symbols(binary) -> bool: if not symbol.exported: continue name = symbol.name - if binary.header.machine_type == lief.ELF.ARCH.RISCV or name in IGNORE_EXPORTS: + if name in IGNORE_EXPORTS: continue print(f'{filename}: export of symbol {name} not allowed!') ok = False