guix-commits
[Top][All Lists]
Advanced

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

45/70: bootstrap: Add gcc-mesboot1: Scheme-only bootstrap.


From: guix-commits
Subject: 45/70: bootstrap: Add gcc-mesboot1: Scheme-only bootstrap.
Date: Wed, 11 Dec 2019 13:03:25 -0500 (EST)

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

commit c2a2e8d738419f33be1d86cc6e3a66db12ac4a88
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Fri Nov 22 21:31:23 2019 +0100

    bootstrap: Add gcc-mesboot1: Scheme-only bootstrap.
    
    * gnu/packages/commencement.scm (gcc-mesboot1): Scheme-only bootstrap.
---
 gnu/packages/commencement.scm | 170 +++++++++---------------------------------
 1 file changed, 34 insertions(+), 136 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 7d026cd..37a54f8 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2110,24 +2110,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
      (inputs `(("gmp-source" ,(package-source gmp-boot))
                ("mpfr-source" ,(package-source mpfr-boot))
                ("mpc-source" ,(package-source mpc-boot))))
-     (native-inputs
-      `(("boot-patch" ,(search-patch "gcc-boot-4.6.4.patch"))
-        ("bash" ,bash-mesboot)
-        ("binutils" ,binutils-mesboot0)
-        ("coreutils" ,coreutils-mesboot0)
-        ("diffutils" ,diffutils-mesboot)
-
-        ("gawk" ,gawk-mesboot)
-        ("gcc" ,gcc-mesboot0)
-        ("gzip" ,gzip-mesboot0)
-        ("grep" ,grep-mesboot)
-        ("libc" ,glibc-mesboot0)
-        ("make" ,make-mesboot)
-        ("patch" ,patch-mesboot0)
-        ("sed" ,sed-mesboot)
-        ("tar" ,tar-mesboot)
-
-        ("kernel-headers" ,%bootstrap-linux-libre-headers)))
+     (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-4.6.4.patch"))
+                      ,@(%boot-mesboot1-inputs)))
      (arguments
       `(#:implicit-inputs? #f
         #:guile ,%bootstrap-guile
@@ -2228,6 +2212,38 @@ ac_cv_c_float_format='IEEE (little-endian)'
                 (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv 
"LIBRARY_PATH"))
                 #t)))))))))
 
+(define gcc-mesboot1
+  (package
+    (inherit gcc-core-mesboot1)
+    (name "gcc-mesboot1")
+    (version "4.6.4")
+    (native-inputs
+     `(("gcc-g++"
+        ,(bootstrap-origin
+          (origin
+            (method url-fetch)
+            (uri (string-append "mirror://gnu/gcc/gcc-"
+                                version "/gcc-g++-" version ".tar.gz"))
+            (sha256
+             (base32
+              "1fqqk5zkmdg4vmqzdmip9i42q6b82i3f6yc0n86n9021cr7ms2k9")))))
+       ,@(package-native-inputs gcc-core-mesboot1)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments gcc-core-mesboot1)
+       ((#:configure-flags configure-flags)
+        `(let ((out (assoc-ref %outputs "out")))
+           `("--enable-languages=c,c++"
+             ,@(filter
+                (negate (lambda (x) (string-prefix? "--enable-languages=" x)))
+                ,configure-flags))))
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-before 'unpack 'unpack-g++
+             (lambda _
+               (let ((source-g++ (assoc-ref %build-inputs "gcc-g++")))
+                 (invoke "tar" "xvf" source-g++))
+               #t))))))))
+
 (define binutils-mesboot
   (package
     (inherit binutils-mesboot0)
@@ -2251,124 +2267,6 @@ ac_cv_c_float_format='IEEE (little-endian)'
                "--host=i686-unknown-linux-gnu"
                "--with-sysroot=/"))))))
 
-(define gcc-mesboot1
-  (package
-    (inherit gcc-mesboot0)
-    (name "gcc-mesboot1")
-    (version "4.7.4")
-    (source (bootstrap-origin
-             (origin (inherit (package-source gcc-4.7))
-                     (patches (search-patches "gcc-boot-4.7.4.patch")))))
-    (inputs `(("gmp-source" ,(package-source gmp-boot))
-              ("mpfr-source" ,(package-source mpfr-boot))
-              ("mpc-source" ,(package-source mpc-boot))))
-    (native-inputs `(("binutils" ,binutils-mesboot)
-                     ("gcc" ,gcc-mesboot0)
-                     ("libc" ,glibc-mesboot0)
-
-                     ("bash" ,%bootstrap-coreutils&co)
-                     ("coreutils" ,%bootstrap-coreutils&co)
-                     ("diffutils" ,diffutils-mesboot)
-                     ("kernel-headers" ,%bootstrap-linux-libre-headers)
-                     ("make" ,make-mesboot)))
-    (arguments
-     (substitute-keyword-arguments (package-arguments gcc-core-mesboot0)
-       ((#:make-flags make-flags)
-        `(let* ((libc (assoc-ref %build-inputs "libc"))
-                (ldflags (string-append
-                          "-B" libc "/lib "
-                          "-Wl,-dynamic-linker "
-                          "-Wl," libc
-                          ,(glibc-dynamic-linker "i686-linux"))))
-           (list (string-append "LDFLAGS=" ldflags)
-                 (string-append "LDFLAGS_FOR_TARGET=" ldflags))))
-       ((#:phases phases)
-        `(modify-phases ,phases
-           ;; c&p from commencement.scm:gcc-boot0
-           (add-after 'unpack 'unpack-gmp&co
-             (lambda* (#:key inputs #:allow-other-keys)
-               (let ((gmp  (assoc-ref %build-inputs "gmp-source"))
-                     (mpfr (assoc-ref %build-inputs "mpfr-source"))
-                     (mpc  (assoc-ref %build-inputs "mpc-source")))
-
-                 ;; To reduce the set of pre-built bootstrap inputs, build
-                 ;; GMP & co. from GCC.
-                 (for-each (lambda (source)
-                             (or (invoke "tar" "xvf" source)
-                                 (error "failed to unpack tarball"
-                                        source)))
-                           (list gmp mpfr mpc))
-
-                 ;; Create symlinks like `gmp' -> `gmp-x.y.z'.
-                 ,@(map (lambda (lib)
-                          ;; Drop trailing letters, as gmp-6.0.0a unpacks
-                          ;; into gmp-6.0.0.
-                          `(symlink ,(string-trim-right
-                                      (package-full-name lib "-")
-                                      char-set:letter)
-                                    ,(package-name lib)))
-                        (list gmp-boot mpfr-boot mpc-boot))
-                 #t)))
-           (delete 'remove-info)
-           (replace 'setenv
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let* ((out (assoc-ref outputs "out"))
-                      (binutils (assoc-ref %build-inputs "binutils"))
-                      (bash (assoc-ref %build-inputs "bash"))
-                      (gcc (assoc-ref %build-inputs "gcc"))
-                      (glibc (assoc-ref %build-inputs "libc"))
-                      (kernel-headers (assoc-ref %build-inputs 
"kernel-headers")))
-                 (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
-                 (setenv "C_INCLUDE_PATH" (string-append
-                                           gcc 
"/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
-                                           ":" kernel-headers "/include"
-                                           ":" glibc "/include"
-                                           ":" (getcwd) "/mpfr/src"))
-                 (setenv "LIBRARY_PATH" (string-append glibc "/lib"
-                                                       ":" gcc "/lib"))
-                 (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv 
"C_INCLUDE_PATH"))
-                 (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv 
"LIBRARY_PATH"))
-                 #t)))
-           (delete 'install2)))
-       ((#:configure-flags configure-flags)
-        `(let ((out (assoc-ref %outputs "out"))
-               (glibc (assoc-ref %build-inputs "libc")))
-           (list (string-append "--prefix=" out)
-                 "--build=i686-unknown-linux-gnu"
-                 "--host=i686-unknown-linux-gnu"
-
-                 (string-append "--with-native-system-header-dir=" glibc 
"/include")
-                 (string-append "--with-build-sysroot=" glibc "/include")
-
-                 "--disable-bootstrap"
-                 "--disable-decimal-float"
-                 "--disable-libatomic"
-                 "--disable-libcilkrts"
-                 "--disable-libgomp"
-                 "--disable-libitm"
-                 "--disable-libmudflap"
-                 "--disable-libquadmath"
-                 "--disable-libsanitizer"
-                 "--disable-libssp"
-                 "--disable-libvtv"
-                 "--disable-lto"
-                 "--disable-lto-plugin"
-                 "--disable-multilib"
-                 "--disable-plugin"
-                 "--disable-threads"
-                 "--enable-languages=c,c++"
-
-                 "--enable-static"
-                 ;; libstdc++.so: error: depends on 'libgcc_s.so.1', which 
cannot be found in RUNPATH ()
-                 "--disable-shared"
-                 "--enable-threads=single"
-
-                 ;; No pre-compiled libstdc++ headers, to save space.
-                 "--disable-libstdcxx-pch"
-
-                 ;; for libcpp ...
-                 "--disable-build-with-cxx")))))))
-
 (define gcc-mesboot1-wrapper
   ;; We need this so gcc-mesboot1 can be used to create shared binaries that
   ;; have the correct interpreter, otherwise configuring gcc-mesboot using



reply via email to

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