guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: DRAFT commencement: tcc-boot: Disable abort on divide by zero.


From: guix-commits
Subject: 03/03: DRAFT commencement: tcc-boot: Disable abort on divide by zero.
Date: Sun, 10 Jan 2021 10:28:02 -0500 (EST)

janneke pushed a commit to branch wip-arm-bootstrap
in repository guix.

commit 91287e91b449849651ad017696e8fb3b4246d6f8
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Sun Jan 10 15:10:03 2021 +0100

    DRAFT commencement: tcc-boot: Disable abort on divide by zero.
    
    This allows glibc-mesboot0 to be built.  Correctly (?).
    
    * gnu/packages/commencement.scm (tcc-boot)[arguments]: When rebuilding
    libtcc1-mes.a, disable abort on divide by zero.
---
 gnu/packages/commencement.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 7355dee..00e97eb 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1003,8 +1003,16 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
                       (copy-file "libtcc1.a" (string-append out 
"/lib/tcc/libtcc1.a"))
 
                       (delete-file (string-append out 
"/lib/tcc/libtcc1-mes.a"))
+                      (copy-file (string-append mes "/lib/libtcc1.c")
+                                 "libtcc1-mes.c")
+                      ;; XXX attempt to avoid gcc-core-mesboot0's cpp0
+                      ;; to abort, dividing by 0, when building
+                      ;; glibc-mesboot0
+                      (substitute* "libtcc1-mes.c"
+                                   (("  if \\(__raise \\(SIGFPE" all)
+                                    (string-append "  return;\n" all)))
                       (apply invoke "./tcc" "-c" "-o" "libtcc1-mes.o"
-                             (string-append mes "/lib/libtcc1.c") cppflags)
+                             "libtcc1-mes.c" cppflags)
                       (invoke "./tcc" "-ar" "rc" "libtcc1-mes.a"
                               "libtcc1-mes.o" "armeabi.o")
                       (copy-file "libtcc1-mes.a"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]