[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
26/26: commencement: gcc-mesboot0: Support ARM.
From: |
guix-commits |
Subject: |
26/26: commencement: gcc-mesboot0: Support ARM. |
Date: |
Tue, 12 Jan 2021 13:49:19 -0500 (EST) |
janneke pushed a commit to branch wip-arm-bootstrap
in repository guix.
commit d909128a7c90191b9d798931e444525d2820022a
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Mon Dec 28 15:55:18 2020 +0100
commencement: gcc-mesboot0: Support ARM.
* gnu/packages/commencement.scm (gcc-mesboot0)[native-inputs]: Add
gcc-boot-2.95.3-arm.patch.
[supported-systems]: Add armhf-linux, aarch64-linux.
[arguments]: Cater for armhf-linux, aarch64-linux.
---
gnu/packages/commencement.scm | 91 +++++++++++++++++++++++--------------------
1 file changed, 49 insertions(+), 42 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index c7938dd..d93f0fd 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1589,50 +1589,57 @@ ac_cv_c_float_format='IEEE (little-endian)'
#t)))))))))
(define gcc-mesboot0
- (package
- (inherit gcc-core-mesboot0)
- (name "gcc-mesboot0")
- (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-2.95.3.patch"))
- ;; Packages are given in an order that's relevant for
- ;; #include_next purposes.
- ("libc" ,glibc-mesboot0)
- ("kernel-headers" ,%bootstrap-linux-libre-headers)
- ,@(%boot-mesboot-core-inputs)))
- (arguments
- (substitute-keyword-arguments (package-arguments gcc-core-mesboot0)
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'setenv
- (lambda _
- (setenv "CONFIG_SHELL" (which "sh"))
- (with-output-to-file "config.cache"
- (lambda _
- (display "
+ (let ((triplet (match (%current-system)
+ ((or "armhf-linux" "aarch64-linux")
+ "arm-unknown-linux-gnu")
+ ((or "i686-linux" "x86_64-linux")
+ "i686-unknown-linux-gnu"))))
+ (package
+ (inherit gcc-core-mesboot0)
+ (name "gcc-mesboot0")
+ (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-2.95.3.patch"))
+ ("arm-patch" ,(search-patch
"gcc-boot-2.95.3-arm.patch"))
+ ;; Packages are given in an order that's relevant for
+ ;; #include_next purposes.
+ ("libc" ,glibc-mesboot0)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)
+ ,@(%boot-mesboot-core-inputs)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments gcc-core-mesboot0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'setenv
+ (lambda _
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (with-output-to-file "config.cache"
+ (lambda _
+ (display "
ac_cv_c_float_format='IEEE (little-endian)'
")))
- #t))
- (replace 'install2
- (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")))
- (and
- (mkdir-p "tmp")
- (zero? (system (string-append "set -x; cd tmp && ar x
../gcc/libgcc2.a")))
- (zero? (system (string-append "set -x; cd tmp && ar r "
gcc-dir "/libgcc.a *.o")))
- (copy-file "gcc/libgcc2.a" (string-append out
"/lib/libgcc2.a"))))))))
- ((#:configure-flags configure-flags)
- `(let ((out (assoc-ref %outputs "out")))
- `("--disable-shared"
- "--disable-werror"
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- ,(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")))))))
+ #t))
+ (replace 'install2
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (gcc-dir (string-append
+ 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")))
+ (zero? (system (string-append "set -x; cd tmp && ar r "
gcc-dir "/libgcc.a *.o")))
+ (copy-file "gcc/libgcc2.a" (string-append out
"/lib/libgcc2.a"))))))))
+ ((#:configure-flags configure-flags)
+ `(let ((out (assoc-ref %outputs "out")))
+ (list
+ "--disable-shared"
+ "--disable-werror"
+ (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"))))))))
(define (%boot-mesboot0-inputs)
`(("gcc" ,gcc-mesboot0)
- 09/26: commencement: gash-boot: Build fix for ARM., (continued)
- 09/26: commencement: gash-boot: Build fix for ARM., guix-commits, 2021/01/12
- 18/26: commencement: diffutils-mesboot: Support ARM., guix-commits, 2021/01/12
- 01/26: gnu: mescc-tools: Update to 0.7.0., guix-commits, 2021/01/12
- 10/26: commencement: bootstrap-mes-rewired: Support ARM., guix-commits, 2021/01/12
- 12/26: commencement: tcc-boot0: Support ARM, update to 0.9.26-1136-g0fbeb2dd., guix-commits, 2021/01/12
- 16/26: commencement: bash-mesboot0: Support ARM., guix-commits, 2021/01/12
- 21/26: commencement: binutils-mesboot0: Support ARM., guix-commits, 2021/01/12
- 20/26: commencement: sed-mesboot0: Support ARM., guix-commits, 2021/01/12
- 23/26: commencement: mesboot-headers: Support ARM., guix-commits, 2021/01/12
- 24/26: commencement: gawk-mesboot: Support ARM., guix-commits, 2021/01/12
- 26/26: commencement: gcc-mesboot0: Support ARM.,
guix-commits <=
- 22/26: commencement: gcc-core-mesboot0: Support ARM., guix-commits, 2021/01/12