guix-commits
[Top][All Lists]
Advanced

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

114/163: gnu: gcc-core-mesboot: Package with bootstrap-guile.


From: Jan Nieuwenhuizen
Subject: 114/163: gnu: gcc-core-mesboot: Package with bootstrap-guile.
Date: Thu, 30 Aug 2018 01:03:33 -0400 (EDT)

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

commit 9249903715c85fd73689de3cf0c93985dd36ad91
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Fri Jun 29 21:17:20 2018 +0200

    gnu: gcc-core-mesboot: Package with bootstrap-guile.
    
    * gnu/packages/mes.scm (gcc-core-mesboot): Package with bootstrap-guile.
---
 gnu/packages/mes.scm | 223 ++++++++++++++++++++++++++-------------------------
 1 file changed, 112 insertions(+), 111 deletions(-)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index afad180..ed5e548 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -714,124 +714,125 @@ standard.")
                            (string-append "--prefix=" out)))))))))))))
 
 (define-public gcc-core-mesboot
-  (package
-    (inherit gcc)
-    (name "gcc-core-mesboot")
-    (version "2.95.3")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-"
-                                  version
-                                  ".tar.gz"))
-              (patches (search-patches "gcc-core-boot-2.95.3.patch"))
-              (sha256
-               (base32
-                "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
-    (supported-systems '("i686-linux"))
-    (native-inputs `(("binutils" ,binutils-mesboot0)
-                     ("tcc" ,tcc-boot)))
-    (outputs '("out"))
-    (arguments
-     `(#:tests? #f
-       #:parallel-build? #f
-       #:strip-binaries? #f
-       #:make-flags (list
-                     "CC=tcc -static -D __GLIBC_MINOR__=6"
-                     "OLDCC=tcc -static -D __GLIBC_MINOR__=6"
-                     "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6"
-                     "AR=ar"
-                     "RANLIB=ranlib"
-                     (string-append "LIBGCC2_INCLUDES=-I "
-                                    (assoc-ref %build-inputs "tcc")
-                                    "/include")
-                     "LANGUAGES=c"
-                     (string-append "BOOT_LDFLAGS="
-                                    " -B" (assoc-ref %build-inputs "tcc")
-                                    "/lib/"))
-       #: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"))
-                   (tcc (assoc-ref %build-inputs "tcc"))
-                   (cppflags (string-append
-                              " -D __STDC__=1"
-                              " -D __GLIBC_MINOR__=6")))
-               (setenv "PATH"
-                       (string-append
-                        (assoc-ref %build-inputs "binutils") "/bin"
-                        ":" (assoc-ref %build-inputs "tcc") "/bin"
+  (package-with-bootstrap-guile
+   (package
+     (inherit gcc)
+     (name "gcc-core-mesboot")
+     (version "2.95.3")
+     (source (origin
+               (method url-fetch)
+               (uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-"
+                                   version
+                                   ".tar.gz"))
+               (patches (search-patches "gcc-core-boot-2.95.3.patch"))
+               (sha256
+                (base32
+                 "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
+     (supported-systems '("i686-linux"))
+     (native-inputs `(("binutils" ,binutils-mesboot0)
+                      ("tcc" ,tcc-boot)))
+     (outputs '("out"))
+     (arguments
+      `(#:tests? #f
+        #:parallel-build? #f
+        #:strip-binaries? #f
+        #:make-flags (list
+                      "CC=tcc -static -D __GLIBC_MINOR__=6"
+                      "OLDCC=tcc -static -D __GLIBC_MINOR__=6"
+                      "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6"
+                      "AR=ar"
+                      "RANLIB=ranlib"
+                      (string-append "LIBGCC2_INCLUDES=-I "
+                                     (assoc-ref %build-inputs "tcc")
+                                     "/include")
+                      "LANGUAGES=c"
+                      (string-append "BOOT_LDFLAGS="
+                                     " -B" (assoc-ref %build-inputs "tcc")
+                                     "/lib/"))
+        #: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"))
+                    (tcc (assoc-ref %build-inputs "tcc"))
+                    (cppflags (string-append
+                               " -D __STDC__=1"
+                               " -D __GLIBC_MINOR__=6")))
+                (setenv "PATH"
+                        (string-append
+                         (assoc-ref %build-inputs "binutils") "/bin"
+                         ":" (assoc-ref %build-inputs "tcc") "/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 "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"))
+                         ;; 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 "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"))
 
-               ;; no info at this stage
-               (delete-file-recursively "texinfo")
-               (system "touch gcc/cpp.info gcc/gcc.info")
+                ;; no info at this stage
+                (delete-file-recursively "texinfo")
+                (system "touch gcc/cpp.info gcc/gcc.info")
 
-               (setenv "CONFIG_SHELL" (string-append
-                                       (assoc-ref %build-inputs "bash")
-                                       "/bin/sh"))
-               (unsetenv "LANG")
-               (unsetenv "C_INCLUDE_PATH") ; flex
-               (unsetenv "LIBRARY_PATH")
-               (setenv "CPPFLAGS" cppflags)
-               (setenv "C_INCLUDE_PATH" (string-append tcc "/include"))
-               (setenv "CC" (string-append "tcc -static" " " cppflags))
-               (setenv "CC_FOR_BUILD" (string-append "tcc -static" " " 
cppflags))
-               (setenv "CPP" (string-append "tcc -E" " " cppflags))
+                (setenv "CONFIG_SHELL" (string-append
+                                        (assoc-ref %build-inputs "bash")
+                                        "/bin/sh"))
+                (unsetenv "LANG")
+                (unsetenv "C_INCLUDE_PATH") ; flex
+                (unsetenv "LIBRARY_PATH")
+                (setenv "CPPFLAGS" cppflags)
+                (setenv "C_INCLUDE_PATH" (string-append tcc "/include"))
+                (setenv "CC" (string-append "tcc -static" " " cppflags))
+                (setenv "CC_FOR_BUILD" (string-append "tcc -static" " " 
cppflags))
+                (setenv "CPP" (string-append "tcc -E" " " cppflags))
 
-               (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"))
+                (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"))
 
-               (with-output-to-file "config.cache"
-                 (lambda _
-                   (display "
+                (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)))))))
-         (add-after 'install 'install2
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((tcc (assoc-ref %build-inputs "tcc"))
-                    (tcc-lib (string-append tcc "/lib/x86-mes-gcc"))
-                    (out (assoc-ref outputs "out"))
-                    (gcc-dir (string-append
-                              out "/lib/gcc-lib/i386-unknown-linux/2.95.3")))
-               (and
-                (mkdir-p "tmp")
-                (zero? (system (string-append "set -x; cd tmp && ar x 
../gcc/libgcc2.a")))
-                (zero? (system (string-append "set -x; cd tmp && ar r " 
gcc-dir "/libgcc.a *.o")))
-                (copy-file "gcc/libgcc2.a" (string-append out 
"/lib/libgcc2.a"))
-                (copy-file (string-append tcc "/lib/libtcc1.a")
-                           (string-append out "/lib/libtcc1.a"))
-                (zero? (system* "ar" "r" (string-append gcc-dir "/libc.a")
-                                (string-append tcc-lib "/libc+gnu.o")
-                                (string-append tcc-lib "/libtcc1.o")))
-                (zero? (system* "ar" "r" (string-append out "/lib/libc.a")
-                                (string-append tcc-lib "/libc+gnu.o")
-                                (string-append tcc-lib "/libtcc1.o")))
-                (system* "ls" "-ltrF" gcc-dir)
-                (copy-recursively (string-append tcc "/include")
-                                  (string-append out "/include")))))))))))
+                (and
+                 (zero?
+                  (system* "./configure"
+                           "--disable-shared"
+                           "--enable-static"
+                           "--host=i386-unknown-linux"
+                           "--target=i386-unknown-linux"
+                           (string-append "--prefix=" out)))))))
+          (add-after 'install 'install2
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((tcc (assoc-ref %build-inputs "tcc"))
+                     (tcc-lib (string-append tcc "/lib/x86-mes-gcc"))
+                     (out (assoc-ref outputs "out"))
+                     (gcc-dir (string-append
+                               out "/lib/gcc-lib/i386-unknown-linux/2.95.3")))
+                (and
+                 (mkdir-p "tmp")
+                 (zero? (system (string-append "set -x; cd tmp && ar x 
../gcc/libgcc2.a")))
+                 (zero? (system (string-append "set -x; cd tmp && ar r " 
gcc-dir "/libgcc.a *.o")))
+                 (copy-file "gcc/libgcc2.a" (string-append out 
"/lib/libgcc2.a"))
+                 (copy-file (string-append tcc "/lib/libtcc1.a")
+                            (string-append out "/lib/libtcc1.a"))
+                 (zero? (system* "ar" "r" (string-append gcc-dir "/libc.a")
+                                 (string-append tcc-lib "/libc+gnu.o")
+                                 (string-append tcc-lib "/libtcc1.o")))
+                 (zero? (system* "ar" "r" (string-append out "/lib/libc.a")
+                                 (string-append tcc-lib "/libc+gnu.o")
+                                 (string-append tcc-lib "/libtcc1.o")))
+                 (system* "ls" "-ltrF" gcc-dir)
+                 (copy-recursively (string-append tcc "/include")
+                                   (string-append out "/include"))))))))))))
 
 (define-public glibc-mesboot
   (package



reply via email to

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