[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/08: squash! DRAFT commencement: tcc-boot: Support ARM.
From: |
guix-commits |
Subject: |
01/08: squash! DRAFT commencement: tcc-boot: Support ARM. |
Date: |
Wed, 23 Dec 2020 04:16:30 -0500 (EST) |
janneke pushed a commit to branch wip-arm-bootstrap
in repository guix.
commit c3ed1a418fe17abdd24db306060fc197f4ef20ea
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed Dec 23 09:47:46 2020 +0100
squash! DRAFT commencement: tcc-boot: Support ARM.
---
gnu/packages/commencement.scm | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index f6eea8c..7d9d8a9 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -811,6 +811,8 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
;; `patches' needs XZ
;; (patches (search-patches "tcc-boot-0.9.27.patch"))
))
+ (supported-systems '("armhf-linux" "aarch64-linux"
+ "i686-linux" "x86_64-linux"))
(build-system gnu-build-system)
(inputs '())
(propagated-inputs '())
@@ -851,7 +853,22 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
tcc_add_support(s1, TCC_LIBTCC1_MES);
#endif
")))
-
+ ,@(match (%current-system)
+ ((or "armhf-linux" "aarch64-linux")
+ '((substitute* "libtcc.c"
+ (("if \\(setjmp" all)
+ (string-append "#define setjmp(x) 0\n" all)))))
+ ((or "i686-linux" "x86_64-linux")
+ '()))
+ (substitute* "tccgen.c"
+ (("\\*\\(double \\*\\)ptr = vtop->c.d;")
+ "*(long long *)ptr = vtop->c.d;"))
+ (substitute* "tccelf.c"
+ ;; This fixes
+ ;; "cannot execute binary file: Exec format error"
+ ;; when building on aarch64-linux for ARM
+ (("#ifdef TCC_ARM_EABI")
+ "#if defined (TCC_ARM_EABI) || BOOTSTRAP"))
#t))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
@@ -900,12 +917,12 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
tcc "/include"
":/include:{B}/include\"")
"-D" (string-append "TCC_LIBGCC=\"" tcc "/lib/libc.a\"")
"-D" (string-append
"TCC_LIBTCC1_MES=\"libtcc1-mes.a\"")))
- (files ',(match "armhf-linux" ;;(%current-system)
+ (files ',(match (%current-system)
((or "i686-linux" "x86_64-linux")
'("tcc.c"))
((or "armhf-linux" "aarch64-linux")
'("tcc.c" "lib/armflush.c"))))
- (arguments (cons* "-vvv" "-o" "tcc"
+ (arguments (cons* "-vvv" "-g" "-o" "tcc"
(append cppflags files))))
(format (current-error-port)
"running tcc ~a\n" (string-join arguments))
- branch wip-arm-bootstrap updated (dcc8d29 -> ec4b66a), guix-commits, 2020/12/23
- 03/08: DRAFT commencement: bash-mesboot0: Support ARM., guix-commits, 2020/12/23
- 06/08: commencement: sed-mesboot0: Support ARM., guix-commits, 2020/12/23
- 07/08: DRAFT commencement: binutils-mesboot0: Support ARM., guix-commits, 2020/12/23
- 01/08: squash! DRAFT commencement: tcc-boot: Support ARM.,
guix-commits <=
- 05/08: commencement: patch-mesboot: Support ARM., guix-commits, 2020/12/23
- 04/08: commencement: diffutils-mesboot: Support ARM., guix-commits, 2020/12/23
- 02/08: squash! commencement: make-mesboot0: Support ARM., guix-commits, 2020/12/23
- 08/08: DRAFT commencement: gcc-core-mesboot0: Support ARM., guix-commits, 2020/12/23