guix-commits
[Top][All Lists]
Advanced

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

15/15: bootstrap: Replace GNU toolchain seeds with Mes for i686-linux.


From: Jan Nieuwenhuizen
Subject: 15/15: bootstrap: Replace GNU toolchain seeds with Mes for i686-linux.
Date: Sun, 9 Sep 2018 09:21:51 -0400 (EDT)

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

commit 1e84ca732150549b63050fc27b186debb5fe95f6
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Sep 9 14:53:48 2018 +0200

    bootstrap: Replace GNU toolchain seeds with Mes for i686-linux.
    
    * gnu/packages/bootstrap.scm (%bootstrap-inputs)[i686-linux]: Replace
    %bootstrap-gcc, %bootstrap-binutils, %bootstrap-glibc with 
%mescc-tools-seed,
    %mes-seed, %srfi-43 and %tinycc-seed.
    * gnu/packages/make-bootstrap.scm (%bootstrap-tarballs)[i686-linux]: Replace
    gcc-tarball, binutils-tarball, glibc-tarball with %mescc-tools-seed,
    %mes-seed, %srfi-43 and %tinycc-seed.
    * gnu/packages/commencement.scm (%bootstrap-inputs+toolchain)[i686-linux]: 
Add
    glibc-mesboot, binutils-mesboot, gcc-wrapper, gcc-mesboot.
    (file-boot0)[i686-linux]: Disable strip-binaries?, validate-runpath?.
    (libstdc++-boot0)[i686-linux]: Add libtool install workarourd: copy
    libstdc++.so.0.0.20 from gcc-mesboot.
    (gcc-boot0)[i686-linux]: Add libtool install workaround: touch
    libcc1.so.0.0.0, libcc1plugin.so.0.0.0.
    (perl-boot0): Disable validate-runpath?.
    (bison-boot0)[i686-linux]: Do not use ranlib -D.
---
 gnu/packages/bootstrap.scm      | 13 +++++++--
 gnu/packages/commencement.scm   | 62 ++++++++++++++++++++++++++++++++++++++---
 gnu/packages/make-bootstrap.scm | 11 ++++++--
 3 files changed, 76 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 3974e98..29e97db 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -655,9 +655,16 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
 (define (%bootstrap-inputs)
   ;; The initial, pre-built inputs.  From now on, we can start building our
   ;; own packages.
-  `(("libc" ,%bootstrap-glibc)
-    ("gcc" ,%bootstrap-gcc)
-    ("binutils" ,%bootstrap-binutils)
+  `(,@(match (%current-system)
+        ("i686-linux" `(("linux-libre-headers" ,%bootstrap-linux-libre-headers)
+                        ("mescc-tools-seed" ,%mescc-tools-seed)
+                        ("mes-seed" ,%mes-seed)
+                        ("srfi-43" ,%srfi-43 )
+                        ("tinycc-seed" ,%tinycc-seed)))
+
+        (_  `(("libc" ,%bootstrap-glibc)
+              ("gcc" ,%bootstrap-gcc)
+              ("binutils" ,%bootstrap-binutils))))
     ("coreutils&co" ,%bootstrap-coreutils&co)
 
     ;; In gnu-build-system.scm, we rely on the availability of Bash.
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 2c63b6a..5a1f3ce 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1598,7 +1598,13 @@ exec " gcc "/bin/" program
                           (string-append "--prefix=" out))))))))))))
 
 (define (%bootstrap-inputs+toolchain)
-  (%bootstrap-inputs))
+  (append (match (%current-system)
+            ("i686-linux" `(("libc" ,glibc-mesboot)
+                            ("binutils" ,binutils-mesboot)
+                            ("gcc-wrapper" ,gcc-mesboot-wrapper)
+                            ("gcc" ,gcc-mesboot)))
+            (_ '()))
+          (%bootstrap-inputs)))
 
 (define gnu-make-boot0
   (package-with-bootstrap-guile
@@ -1663,6 +1669,24 @@ exec " gcc "/bin/" program
      (arguments `(#:guile ,%bootstrap-guile
                   #:implicit-inputs? #f
                   #:strip-binaries?
+                  ,(match (%current-system)
+                                        ;strip: supported targets: elf32-i386 
a.out-i386-linux pei-i386
+                                        ;elf32-little elf32-big srec 
symbolsrec verilog tekhex binary ihex
+                                        ;trad-core
+                     ("i686-linux" #f)
+                     (_ #t))            ; attempt to change nothing
+                  #:validate-runpath?
+                  ,(match (%current-system)
+                                        ; validating RUNPATH of 1
+                                        ; binaries in
+                                        ; 
"/gnu/store/j6qq0pzwx9abpjpd0xly5fp0gkqlx0k4-file-boot0-5.32/bin"...
+                                        ; 
/gnu/store/j6qq0pzwx9abpjpd0xly5fp0gkqlx0k4-file-boot0-5.32/bin/file:
+                                        ; error: depends on
+                                        ; 'libmagic.so.1', which
+                                        ; cannot be found in RUNPATH
+                                        ; ()
+                     ("i686-linux" #f)
+                     (_ #t))
                   ,@(package-arguments file))))))
 
 (define (%boot0-inputs)
@@ -1733,7 +1757,23 @@ exec " gcc "/bin/" program
          ;; XXX: libstdc++.so NEEDs ld.so for some reason.
          #:validate-runpath? #f
 
-         ,@(package-arguments lib)))
+         ,@(match (%current-system)
+             ("i686-linux"
+              (substitute-keyword-arguments (package-arguments lib)
+                ((#:phases phases)
+                 `(modify-phases ,phases
+                    ;; FIXME: why doesn't this package build 
libstdc++.so.6.0.20,
+                    ;; when gcc-mesboot builds it fine?
+                    ;; libtool: install: 
/gnu/store/7swwdnq02lqk4xkd8740fxdj1h4va38l-bootstrap-binaries-0/bin/install -c 
.libs/libstdc++.so.6.0.20 
/gnu/store/np5pmdlwfin3vmqk88chh0fgs0ncki79-libstdc++-boot0-4.8.5/lib/libstdc++.so.6.0.20
+                    ;; 
/gnu/store/7swwdnq02lqk4xkd8740fxdj1h4va38l-bootstrap-binaries-0/bin/install: 
cannot stat '.libs/libstdc++.so.6.0.20': No such file or directory
+                    (add-after 'build 'copy-libstdc++-
+                      (lambda* (#:key outputs #:allow-other-keys)
+                        (let ((gcc (assoc-ref %build-inputs "gcc"))
+                              (out (assoc-ref outputs "out")))
+                          (copy-file (string-append gcc 
"/lib/libstdc++.so.6.0.20")
+                                     (string-append 
"src/.libs/libstdc++.so.6.0.20"))
+                          #t)))))))
+             (_ (package-arguments lib)))))
       (inputs (%boot0-inputs))
       (native-inputs '()))))
 
@@ -1803,6 +1843,16 @@ exec " gcc "/bin/" program
                                          ,(package-name lib)))
                              (list gmp-6.0 mpfr mpc))
                       #t)))
+                ,(match (%current-system)
+                   ("i686-linux"
+                    '(add-after 'build 'libtool-workaround
+                      (lambda _
+                        ;; libtool: install: 
/gnu/store/7swwdnq02lqk4xkd8740fxdj1h4va38l-bootstrap-binaries-0/bin/install -c 
.libs/libcc1.so.0.0.0 
/gnu/store/8qf47i99nxz9jvrmq5va0g3q1yvs3x74-gcc-cross-boot0-5.5.0-lib/lib/./libcc1.so.0.0.0
+                        ;; 
/gnu/store/7swwdnq02lqk4xkd8740fxdj1h4va38l-bootstrap-binaries-0/bin/install: 
cannot stat '.libs/libcc1.so.0.0.0': No such file or directory
+                        (system* "touch"
+                                 "libcc1/.libs/libcc1.so.0.0.0"
+                                 "libcc1/.libs/libcc1plugin.so.0.0.0"))))
+                   (_ 'identity))
                 (add-after 'install 'symlink-libgcc_eh
                   (lambda* (#:key outputs #:allow-other-keys)
                     (let ((out (assoc-ref outputs "lib")))
@@ -1839,6 +1889,7 @@ exec " gcc "/bin/" program
      (arguments
       `(#:guile ,%bootstrap-guile
         #:implicit-inputs? #f
+        #:validate-runpath? #f
         ;; At the very least, this must not depend on GCC & co.
         #:disallowed-references
         ,(list %bootstrap-binutils)
@@ -1889,8 +1940,11 @@ exec " gcc "/bin/" program
         ;; Zero timestamps in liby.a; this must be done
         ;; explicitly here because the bootstrap Binutils don't
         ;; do that (default is "cru".)
-        #:make-flags '("ARFLAGS=crD"
-                       "RANLIB=ranlib -D"
+        #:make-flags `("ARFLAGS=crD"
+                       ,,(match (%current-system)
+                           ;; ranlib: '-D': No such file
+                           ("i686-linux" "RANLIB=ranlib")
+                           (_ "RANLIB=ranlib -D"))
                        "V=1"))))))
 
 (define flex-boot0
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index a4a61de..080ce24 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -720,9 +720,14 @@ for `sh' in $PATH, and without nscd, and with static NSS 
modules."
                    %build-inputs)
          #t)))
     (inputs `(("guile-tarball" ,%guile-bootstrap-tarball)
-              ("gcc-tarball" ,%gcc-bootstrap-tarball)
-              ("binutils-tarball" ,%binutils-bootstrap-tarball)
-              ("glibc-tarball" ,(%glibc-bootstrap-tarball))
+              ,@(match (%current-system)
+                  ("i686-linux" `(("mescc-tools-seed" ,(@ (gnu packages 
bootstrap) %mescc-tools-seed))
+                                  ("mes-seed" ,(@ (gnu packages bootstrap) 
%mes-seed))
+                                  ("srfi-43" ,(@ (gnu packages bootstrap) 
%srfi-43))
+                                  ("tinycc-seed" ,(@ (gnu packages bootstrap) 
%tinycc-seed))))
+                  (_ `(("gcc-tarball" ,%gcc-bootstrap-tarball)
+                       ("binutils-tarball" ,%binutils-bootstrap-tarball)
+                       ("glibc-tarball" ,(%glibc-bootstrap-tarball)))))
               ("coreutils&co-tarball" ,%bootstrap-binaries-tarball)))
     (synopsis "Tarballs containing all the bootstrap binaries")
     (description synopsis)



reply via email to

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