From 65972229ec31c845aa5218fa22d124e14f3e4d58 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 13 Dec 2022 14:02:17 +0200 Subject: squash gcc-mesboot0 (%current-system) evaluated too early parameterize architecture in path --- gnu/packages/commencement.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index ce25a7ee53..4c183260d2 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -1308,6 +1308,11 @@ (define gcc-mesboot0 ("kernel-headers" ,%bootstrap-linux-libre-headers) ,@(%boot-mesboot-core-inputs))) (arguments + (let ((triplet (match (%current-system) + ((or "armhf-linux" "aarch64-linux") + "arm-unknown-linux-gnu") + ((or "i686-linux" "x86_64-linux") + "i686-unknown-linux-gnu")))) (substitute-keyword-arguments (package-arguments gcc-core-mesboot0) ((#:phases phases) #~(modify-phases #$phases @@ -1323,7 +1328,7 @@ (define gcc-mesboot0 (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (gcc-dir (string-append - out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3"))) + out "/lib/gcc-lib/" #$triplet "/2.95.3"))) (and (mkdir-p "tmp") (zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a"))) @@ -1333,14 +1338,14 @@ (define gcc-mesboot0 #~(let ((out (assoc-ref %outputs "out"))) `("--disable-shared" "--disable-werror" - "--build=i686-unknown-linux-gnu" - "--host=i686-unknown-linux-gnu" + ,(string-append "--build=" #$triplet) + ,(string-append "--host=" #$triplet) ,(string-append "--prefix=" out)))) ((#:make-flags make-flags) #~(let ((gcc (assoc-ref %build-inputs "gcc"))) `("RANLIB=true" ,(string-append "LIBGCC2_INCLUDES=-I " gcc "/include") - "LANGUAGES=c"))))))) + "LANGUAGES=c")))))))) (define (%boot-mesboot0-inputs) `(("gcc" ,gcc-mesboot0) -- cgit v1.2.3