guix-commits
[Top][All Lists]
Advanced

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

105/160: gnu: binutils-mesboot: Rename from binutils-boot.


From: Jan Nieuwenhuizen
Subject: 105/160: gnu: binutils-mesboot: Rename from binutils-boot.
Date: Tue, 28 Aug 2018 15:56:30 -0400 (EDT)

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

commit 07ed8418e28ca7476bffa5d5d95154158247081b
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sat Jun 23 19:46:39 2018 +0200

    gnu: binutils-mesboot: Rename from binutils-boot.
    
    * gnu/packages/mes.scm (binutils-mesboot): Rename from binutils-boot.
---
 gnu/packages/mes.scm | 90 ++++++++++++++++++++++++++++++++++------------------
 1 file changed, 60 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index deb8085..2e9b668 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -715,36 +715,66 @@ standard.")
                (copy-file (string-append binutils "/bin/ar") "binutils/ar")
                (copy-file (string-append binutils "/bin/ld") 
"ld/ld-new")))))))))
 
-(define-public binutils-boot
-  (package
-    (inherit binutils-boot0)
-    (name "binutils-boot")
-    (native-inputs `(("flex" ,flex)     ; cheat
-                     ("glibc" ,glibc-boot)
-                     ("gcc" ,gcc-boot)))
-    (arguments
-     `(#:tests? #f                      ; runtest: command not found
-       #:parallel-build? #f
-       #:strip-binaries? #f
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (glibc (assoc-ref %build-inputs "glibc")))
-               (setenv "C_INCLUDE_PATH" (string-append glibc "/include"))
-               (unsetenv "LIBRARY_PATH" (string-append glibc "/lib"))
-               (setenv "CONFIG_SHELL" (string-append
-                                       (assoc-ref %build-inputs "bash")
-                                       "/bin/sh"))
-               (and (zero?
-                     (system* "./configure"
-                              "--disable-nls"
-                              "--disable-shared"
-                              "--disable-werror"
-                              "--host=i386-unknown-linux"
-                              "--target=i386-unknown-linux"
-                              (string-append "--prefix=" out))))))))))))
+(define-public binutils-mesboot
+  (package-with-bootstrap-guile
+   (package
+     (inherit binutils-mesboot0)
+     (name "binutils-mesboot")
+     (native-inputs `(("binutils-mesboot" ,binutils-mesboot0)
+                      ("glibc-mesboot" ,glibc-mesboot)
+                      ("gcc-mesboot" ,gcc-mesboot)
+                      ("kernel-headers" ,(linux-libre-headers-boot0))))
+     (arguments
+      `(#:parallel-build? #f
+        #:configure-flags '("--enable-deterministic-archives"
+                            "--disable-nls"
+                            "--disable-shared"
+                            "--disable-werror"
+                            "--host=i386-unknown-linux"
+                            "--target=i386-unknown-linux"
+                            "--enable-static"
+                            "--enable-compressed-debug-sections=no"
+                            "--disable-gold"
+                            "--disable-plugins"
+                            "--disable-x86-relax-relocations"
+                            "--with-system-libz")
+        #:phases
+        (modify-phases %standard-phases
+          (add-before 'configure 'setenv
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let ((out (assoc-ref outputs "out"))
+                    (gcc (assoc-ref %build-inputs "gcc-mesboot"))
+                    (glibc (assoc-ref %build-inputs "glibc-mesboot"))
+                    (kernel-headers  (assoc-ref %build-inputs 
"kernel-headers")))
+                (setenv "C_INCLUDE_PATH"
+                        (string-append glibc "/include"
+                                       ":" kernel-headers "/include"
+                                       ":" gcc "/include"))
+                (setenv "LIBRARY_PATH"
+                        (string-append glibc "/lib"
+                                       ":" gcc "/lib"))
+                (setenv "CPP" (string-append "gcc -E"))
+                (setenv "AR" "ar")
+                (setenv "RANLIB" "true")
+                (setenv "PATH"
+                        (string-append
+                         (assoc-ref %build-inputs "binutils-mesboot") "/bin"
+                         ":" (assoc-ref %build-inputs "gcc-mesboot") "/bin"
+
+                         ;; more bootstrap cheats
+                         ":" (assoc-ref %build-inputs "bash") "/bin"
+                         ":" (assoc-ref %build-inputs "coreutils") "/bin"
+                         ":" (assoc-ref %build-inputs "diffutils") "/bin"
+                         ":" (assoc-ref %build-inputs "file") "/bin"
+                         ":" (assoc-ref %build-inputs "gawk") "/bin"
+                         ":" (assoc-ref %build-inputs "grep") "/bin"
+                         ":" (assoc-ref %build-inputs "gzip") "/bin"
+                         ":" (assoc-ref %build-inputs "make") "/bin"
+                         ":" (assoc-ref %build-inputs "sed") "/bin"
+                         ":" (assoc-ref %build-inputs "tar") "/bin"))
+                (format (current-error-port) "PATH=~a\n" (getenv "PATH"))
+                (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv 
"C_INCLUDE_PATH"))
+                (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv 
"LIBRARY_PATH")))))))))))
 
 (define-public gcc-core-mesboot
   (package



reply via email to

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