guix-commits
[Top][All Lists]
Advanced

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

22/85: gnu: tcc-boot: Support more architectures.


From: guix-commits
Subject: 22/85: gnu: tcc-boot: Support more architectures.
Date: Tue, 17 Dec 2024 04:08:03 -0500 (EST)

efraim pushed a commit to branch wip-riscv-bootstrap
in repository guix.

commit bd059285f8626e0dab333e9796d11513b0289093
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Tue Oct 1 22:59:52 2024 +0300

    gnu: tcc-boot: Support more architectures.
    
    * gnu/packages/commencement.scm (tcc-boot0)[arguments]: Adjust the
    'configure phase to specify the build target.  Adjust the 'build and
    'install phases to not pass architecture specific flags.
    
    Change-Id: I3aa0ce006922a98a0070c81b65dc747736020e21
---
 gnu/packages/commencement.scm | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 808ef15bf6..6bde966cde 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -746,7 +746,9 @@ MesCC-Tools), and finally M2-Planet.")
                     (interpreter "/mes/loader"))
                (invoke "sh" "configure"
                        (string-append "--cc=tcc")
-                       (string-append "--cpu=i386")
+                        (string-append
+                          "--cpu=" (car (string-split
+                                          ,(commencement-build-target) #\-)))
                        (string-append "--prefix=" out)
                        (string-append "--elfinterp=" interpreter)
                        (string-append "--crtprefix=" tcc "/lib")
@@ -763,7 +765,6 @@ MesCC-Tools), and finally M2-Planet.")
                 "-vvv"
                 "-D" "BOOTSTRAP=1"
                 "-D" "ONE_SOURCE=1"
-                "-D" "TCC_TARGET_I386=1"
                 "-D" "CONFIG_TCC_STATIC=1"
                 "-D" "CONFIG_USE_LIBGCC=1"
                 "-D" (string-append "CONFIG_TCCDIR=\"" out "/lib/tcc\"")
@@ -791,7 +792,6 @@ MesCC-Tools), and finally M2-Planet.")
                      (list
                       "-D" "BOOTSTRAP=1"
                       "-D" "ONE_SOURCE=1"
-                      "-D" "TCC_TARGET_I386=1"
                       "-D" "CONFIG_TCCBOOT=1"
                       "-D" "CONFIG_TCC_STATIC=1"
                       "-D" "CONFIG_USE_LIBGCC=1"
@@ -811,7 +811,7 @@ MesCC-Tools), and finally M2-Planet.")
                                   (string-append out "/include"))
                 (copy-recursively (string-append tcc "/lib")
                                   (string-append out "/lib"))
-                (invoke "./tcc" "-D" "TCC_TARGET_I386=1" "-c" "-o" "libtcc1.o" 
"lib/libtcc1.c")
+                (invoke "./tcc" "-c" "-o" "libtcc1.o" "lib/libtcc1.c")
                 (invoke "./tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o")
                 (copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a"))
                 (delete-file (string-append out "/lib/tcc/libtcc1.a"))
@@ -821,7 +821,13 @@ MesCC-Tools), and finally M2-Planet.")
                 (delete-file (string-append out "/lib/libc.a"))
                 (apply invoke "./tcc" "-c" "-o" "libc.o"
                        "-I" (string-append tcc "/include")
-                       "-I" (string-append tcc "/include/linux/x86")
+                       "-I" (string-append
+                              tcc "/include/linux/"
+                              ,(match
+                                (car (string-split
+                                       (commencement-build-target) #\-))
+                                ("i686" "x86")
+                                (x x)))
                        (string-append mes "/lib/libc+gnu.c")
                        cppflags)
                 (invoke "./tcc" "-ar" "rc" "libc.a" "libc.o")



reply via email to

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