[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: |
Sat, 9 Jan 2021 13:30:54 -0500 (EST) |
janneke pushed a commit to branch wip-arm-bootstrap
in repository guix.
commit ac6ca06f83d5c077178d5013bf88e870367b5fc0
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 f083d07..900da87 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1579,50 +1579,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)
- 04/26: DRAFT gnu: mes: Update to 0.22-123-g9cd754498., (continued)
- 04/26: DRAFT gnu: mes: Update to 0.22-123-g9cd754498., guix-commits, 2021/01/09
- 06/26: bootstrap: mes-minimal: Support ARM, update for mes-0.23., guix-commits, 2021/01/09
- 09/26: commencement: gash-boot: Build fix for ARM., guix-commits, 2021/01/09
- 07/26: DRAFT bootstrap: %bootstrap-mescc-tools: Support ARM., guix-commits, 2021/01/09
- 13/26: commencement: gzip-mesboot: Support ARM., guix-commits, 2021/01/09
- 15/26: commencement: bzip2-mesboot: Support ARM., guix-commits, 2021/01/09
- 18/26: commencement: diffutils-mesboot: Support ARM., guix-commits, 2021/01/09
- 24/26: commencement: gawk-mesboot: Support ARM., guix-commits, 2021/01/09
- 10/26: commencement: bootstrap-mes-rewired: Support ARM., guix-commits, 2021/01/09
- 21/26: commencement: binutils-mesboot0: Support ARM., guix-commits, 2021/01/09
- 26/26: commencement: gcc-mesboot0: Support ARM.,
guix-commits <=
- 25/26: commencement: glibc-mesboot0: Support ARM., guix-commits, 2021/01/09
- 22/26: commencement: gcc-core-mesboot0: Support ARM., guix-commits, 2021/01/09
- 08/26: DRAFT bootstrap: %bootstrap-mes: Support ARM., guix-commits, 2021/01/09
- 11/26: commencement: mes-boot: Support ARM., guix-commits, 2021/01/09
- 23/26: commencement: mesboot-headers: Support ARM., guix-commits, 2021/01/09