guix-commits
[Top][All Lists]
Advanced

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

178/207: gnu: tcc-boot0: Cleanup.


From: Jan Nieuwenhuizen
Subject: 178/207: gnu: tcc-boot0: Cleanup.
Date: Sat, 8 Sep 2018 13:26:27 -0400 (EDT)

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

commit 1f2b5c1c6dc9e4f5d50faf051639a93cbacede45
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Mon Sep 3 10:59:19 2018 +0200

    gnu: tcc-boot0: Cleanup.
    
    * gnu/packages/commencement.scm (tcc-boot0): Cleanup.
---
 gnu/packages/commencement.scm | 56 +++++++++++++++++++++++++------------------
 1 file changed, 33 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index e0e43f0..40c44da 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -365,17 +365,18 @@
                   (with-directory-excursion ".."
                     (and
                      (mkdir-p "nyacc-source")
-                     (zero? (system* "tar" "--strip=1" "-C" "nyacc-source"
-                                     "-xvf" nyacc-source))
+                     (invoke "tar" "--strip=1" "-C" "nyacc-source"
+                             "-xvf" nyacc-source)
                      (mkdir-p "mes-seed")
-                     (zero? (system* "tar" "--strip=1" "-C" "mes-seed"
-                                     "-xvf" mes-seed))
+                     (invoke "tar" "--strip=1" "-C" "mes-seed"
+                             "-xvf" mes-seed)
                      (mkdir-p "tinycc-seed")
-                     (zero? (system* "tar" "--strip=1" "-C" "tinycc-seed"
-                                     "-xvf" tinycc-seed))
+                     (invoke "tar" "--strip=1" "-C" "tinycc-seed"
+                             "-xvf" tinycc-seed)
                      (or (not srfi-43)
                          (and (mkdir-p "srfi")
-                              (zero? (system* "cp" srfi-43 
"srfi/srfi-43.scm")))))))))
+                              (copy-file srfi-43 "srfi/srfi-43.scm")
+                              #t)))))))
             (replace 'configure
               (lambda* (#:key outputs #:allow-other-keys)
                 (let* ((out (assoc-ref %outputs "out"))
@@ -426,26 +427,37 @@
                         (setenv "MES" "mes")
                         (setenv "GUILE_LOAD_PATH" "nyacc")
                         (symlink (string-append "../nyacc-source/module") 
"nyacc")))
-                  (and
-                   (zero? (system* "sh" "configure"
-                                   "--prefix=$PREFIX"
-                                   (string-append "--elfinterp=" interpreter)
-                                   "--crtprefix=."
-                                   "--tccdir=."))))))
+                  (invoke "sh" "configure"
+                          "--prefix=$PREFIX"
+                          (string-append "--elfinterp=" interpreter)
+                          "--crtprefix=."
+                          "--tccdir=."))))
             (replace 'build
-              (lambda* (#:key outputs #:allow-other-keys)
-                (zero? (system* "sh" "build.sh"))))
+              (lambda _
+                (invoke "sh" "build.sh")))
             (replace 'check
-              (lambda* (#:key outputs #:allow-other-keys)
+              (lambda _
                 (setenv "DIFF" "diff.scm")
                 ;; fail fast tests
-                ;;(zero? (system* "sh" "test.sh" 
"mes/scaffold/tests/30-strlen"))
-                ;;(zero? (system* "sh" "-x" "test.sh" 
"mes/scaffold/tinycc/00_assignment"))
+                ;; (invoke "sh" "test.sh" "mes/scaffold/tests/30-strlen")
+                ;; (invoke "sh" "-x" "test.sh" 
"mes/scaffold/tinycc/00_assignment")
                 (setenv "TCC" "./tcc")
-                (zero? (system* "sh" "check.sh"))))
+                (invoke "sh" "check.sh")))
             (replace 'install
-              (lambda* (#:key outputs #:allow-other-keys)
-                (zero? (system* "sh" "install.sh")))))))))))
+              (lambda _
+                (invoke "sh" "install.sh"))))))
+       (native-search-paths
+        ;; Use the language-specific variables rather than 'CPATH' because they
+        ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
+        ;; The intent is to allow headers that are in the search path to be
+        ;; treated as "system headers" (headers exempt from warnings) just like
+        ;; the typical /usr/include headers on an FHS system.
+        (list (search-path-specification
+               (variable "C_INCLUDE_PATH")
+               (files '("include")))
+              (search-path-specification
+               (variable "LIBRARY_PATH")
+               (files '("lib")))))))))
 
 (define-public tcc-boot
   (package-with-bootstrap-guile
@@ -524,8 +536,6 @@
                                 "-D" (string-append "CONFIG_TCC_LIBPATHS=\"" 
tcc "/lib:{B}/lib:.\"")
                                 "-D" (string-append 
"CONFIG_TCC_SYSINCLUDEPATHS=\"" tcc "/include" ":/include:{B}/include\"")
                                 "-D" (string-append "TCC_LIBGCC=\"" tcc 
"/lib/libc.a\"")
-                                "-I" (string-append tcc "/out")
-                                "-L" (string-append tcc "/lib")
                                 "-o" "tcc"
                                 "tcc.c")))))
           (replace 'check



reply via email to

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