guix-commits
[Top][All Lists]
Advanced

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

80/176: gnu: Add gcc-core-boot 2.95.3.


From: Jan Nieuwenhuizen
Subject: 80/176: gnu: Add gcc-core-boot 2.95.3.
Date: Fri, 31 Aug 2018 11:20:18 -0400 (EDT)

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

commit 428ae7a377ba86d839f54e287205f8660d11d158
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Jun 10 20:10:58 2018 +0200

    gnu: Add gcc-core-boot 2.95.3.
    
    * gnu/packages/mes.scm (gcc-core-boot0): Rename from gcc-boot.
    * gnu/packages/mes.scm (gcc-core-boot): New variable.
---
 gnu/packages/mes.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 68 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 9667579..99d66a8 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -591,10 +591,10 @@ standard.")
                             "--target=i386-unknown-linux"
                             (string-append "--prefix=" out))))))))))))
 
-(define-public gcc-boot
+(define-public gcc-core-boot
   (package
     (inherit gcc)
-    (name "gcc-boot")
+    (name "gcc-core-boot")
     (version "2.95.3")
     (source (origin
               (method url-fetch)
@@ -694,7 +694,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
                 "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
     (supported-systems '("i686-linux"))
     (native-inputs `(("binutils" ,binutils-boot)
-                     ("gcc" ,gcc-boot)))
+                     ("gcc" ,gcc-core-boot)))
     (propagated-inputs `(("kernel-headers" ,(linux-libre-headers-boot0))))
     (outputs '("out"))
     (arguments
@@ -748,6 +748,71 @@ ac_cv_c_float_format='IEEE (little-endian)'
              (zero?
               (apply system* "make" "install-lib-all" "install-headers" 
make-flags)))))))))
 
+(define-public gcc-boot
+  (package
+    (inherit gcc-core-boot)
+    (name "gcc-boot")
+    (supported-systems '("i686-linux"))
+    (native-inputs `(;;("binutils" ,binutils-boot)
+                     ,(let ((triplet "i686-unknown-linux-gnu")) ;; MORTAL SIN 
HERE
+                        `("binutils" ,(cross-binutils triplet)))
+                     ("gcc" ,gcc-core-boot)
+                     ("glibc" ,glibc-boot)))
+    (outputs '("out"))
+    (arguments
+     `(#:tests? #f                      ; runtest: command not found
+       #:parallel-build? #f
+       #:strip-binaries? #f
+       #:make-flags (list "RANLIB=true"
+                          (string-append "LIBGCC2_INCLUDES=-I "
+                                         (assoc-ref %build-inputs "gcc")
+                                         "/include")
+                          "LANGUAGES=c")
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (binutils (assoc-ref %build-inputs "binutils"))
+                   (cppflags (string-append
+                              " -D __STDC__=1"
+                              " -D __GLIBC_MINOR__=6"
+                              )))
+               (when #t ;; no info
+                 (delete-file-recursively "texinfo")
+                 (system "touch gcc/cpp.info gcc/gcc.info"))
+
+               ;; MORTAL SIN: use pre-built binary seed
+               (setenv "PATH" (string-append
+                               binutils "/i686-unknown-linux-gnu/bin"
+                               ":" (getenv "PATH")))
+
+               (setenv "CONFIG_SHELL" (string-append
+                                       (assoc-ref %build-inputs "bash")
+                                       "/bin/sh"))
+               (unsetenv "C_INCLUDE_PATH") ; flex
+               (unsetenv "LIBRARY_PATH")
+               (setenv "CPPFLAGS" cppflags)
+               (setenv "CC" (string-append "gcc" cppflags))
+               (setenv "CPP" (string-append "gcc -E" cppflags))
+               (setenv "RANLIB" "true")
+               (with-output-to-file "config.cache"
+                 (lambda _
+                   (display "
+ac_cv_c_float_format='IEEE (little-endian)'
+")))
+               (and
+                (zero?
+                 (system* "./configure"
+                          ;;"--disable-shared"
+                          ;;"--enable-static"
+                          "--host=i386-unknown-linux"
+                          "--target=i386-unknown-linux"
+                          (string-append "--prefix=" out))))))))))))
+
 ;;;
 
 (define-public nyacc



reply via email to

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