guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: Remove gcc-mesboot-4.1.0.


From: Jan Nieuwenhuizen
Subject: 01/01: gnu: Remove gcc-mesboot-4.1.0.
Date: Wed, 11 Jul 2018 12:28:17 -0400 (EDT)

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

commit a3840f9d517b04af459b888d4f7dd225c18b3338
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Wed Jul 11 18:23:58 2018 +0200

    gnu: Remove gcc-mesboot-4.1.0.
    
    * gnu/packages/mes.scm (gcc-mesboot-4.1.0): Remove.
    (gcc-mesboot): Inherit from gcc-mesboot0.
    (binutils-mesboot0, gcc-core-mesboot, glibc-mesboot, gcc-mesboot0,
    binutils-mesboot, gcc-mesboot): Use --build=i686-unknown-linux-gnu,
    --host=i686-unknown-linux-gnu.
    * gnu/packages/patches/gcc-boot-4.7.4.patch: Update.
---
 gnu/packages/mes.scm                      | 177 +++++++++++++-----------------
 gnu/packages/patches/gcc-boot-4.7.4.patch |  13 +++
 2 files changed, 89 insertions(+), 101 deletions(-)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 4a4b3eb..158f942 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -704,8 +704,9 @@ standard.")
                            "--disable-nls"
                            "--disable-shared"
                            "--disable-werror"
-                           "--host=i386-unknown-linux"
-                           "--target=i386-unknown-linux"
+                           "--build=i686-unknown-linux-gnu"
+                           "--host=i686-unknown-linux-gnu"
+                           "--with-sysroot=/"
                            (string-append "--prefix=" out)))))))))))))
 
 (define-public gcc-core-mesboot
@@ -802,8 +803,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
                   (system* "./configure"
                            "--disable-shared"
                            "--enable-static"
-                           "--host=i386-unknown-linux"
-                           "--target=i386-unknown-linux"
+                           "--build=i686-unknown-linux-gnu"
+                           "--host=i686-unknown-linux-gnu"
                            (string-append "--prefix=" out)))))))
           (add-after 'install 'install2
             (lambda* (#:key outputs #:allow-other-keys)
@@ -811,7 +812,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
                      (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")))
+                               out 
"/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
                 (and
                  (mkdir-p "tmp")
                  (zero? (system (string-append "set -x; cd tmp && ar x 
../gcc/libgcc2.a")))
@@ -861,8 +862,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
            "--disable-shared"
            "--enable-static"
            "--disable-sanity-checks"
-           "--host=i386-unknown-linux"
-           "--target=i386-unknown-linux"
+           "--build=i686-unknown-linux-gnu"
+           "--host=i686-unknown-linux-gnu"
            (string-append "--with-headers=" headers "/include")
            "--enable-static-nss"
            "--without-__thread"
@@ -981,7 +982,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
                 (setenv "C_INCLUDE_PATH" (string-append
                                           ;;gcc "/include" this is MES
                                           ;;":/"
-                                          gcc 
"/lib/gcc-lib/i386-unknown-linux/2.95.3/include"
+                                          gcc 
"/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
                                           ":" headers "/include"
                                           ":" glibc "/include"))
                 (setenv "LIBRARY_PATH" (string-append glibc "/lib"
@@ -1003,14 +1004,14 @@ ac_cv_c_float_format='IEEE (little-endian)'
                  (zero?
                   (system* "./configure"
                            "--disable-shared"
-                           "--host=i386-unknown-linux"
-                           "--target=i386-unknown-linux"
+                           "--build=i686-unknown-linux-gnu"
+                           "--host=i686-unknown-linux-gnu"
                            (string-append "--prefix=" out)))))))
           (add-after 'install 'install2
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (gcc-dir (string-append
-                               out "/lib/gcc-lib/i386-unknown-linux/2.95.3")))
+                               out 
"/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
                 (and
                  (mkdir-p "tmp")
                  (zero? (system (string-append "set -x; cd tmp && ar x 
../gcc/libgcc2.a")))
@@ -1033,14 +1034,16 @@ ac_cv_c_float_format='IEEE (little-endian)'
                             "--disable-nls"
                             "--disable-shared"
                             "--disable-werror"
-                            "--host=i386-unknown-linux"
-                            "--target=i386-unknown-linux"
+                            "--build=i686-unknown-linux-gnu"
+                            "--host=i686-unknown-linux-gnu"
                             "--enable-static"
                             "--enable-compressed-debug-sections=no"
                             "--disable-gold"
                             "--disable-plugins"
                             "--disable-x86-relax-relocations"
-                            "--with-system-libz")
+                            "--with-system-libz"
+                            "--with-sysroot=/"
+                            )
         #:phases
         (modify-phases %standard-phases
           (add-before 'configure 'setenv
@@ -1101,22 +1104,21 @@ ac_cv_c_float_format='IEEE (little-endian)'
               (sha256 (base32
                        
"0dxn4904dra50xa22hi047lj8kkpr41d6vb9sd4grca880c7wv94"))))))
 
-(define-public gcc-mesboot-4.1.0
+(define-public gcc-mesboot
   (package-with-bootstrap-guile
    (package
      (inherit gcc-mesboot0)
      (name "gcc-mesboot")
-     (version "4.1.0")
+     (version "4.7.4")
      (source (origin
                (method url-fetch)
-               (uri (string-append "mirror://gnu/gcc/gcc-4.1.0/gcc-core-"
+               (uri (string-append "mirror://gnu/gcc/gcc-4.7.4/gcc-"
                                    version
-                                   ".tar.bz2"))
-               (patches (search-patches "gcc-boot-4.1.0.patch"))
+                                   ".tar.gz"))
+               (patches (search-patches "gcc-boot-4.7.4.patch"))
                (sha256
                 (base32
-                 "089zy7akf1xlk87s4jmmfpz3bla1f3ji3fgr4wk7yznc6ih0blql"))))
-     (supported-systems '("i686-linux"))
+                 "06bqygv17f71f7g7pi7ddvhljcr8dimrypgiif9g1r6lqn1sbfnx"))))
      (native-inputs `(("binutils-boot" ,binutils-mesboot)
                       ("gcc-boot" ,gcc-mesboot0)
                       ("glibc-boot" ,glibc-mesboot)
@@ -1124,42 +1126,53 @@ 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))))
-     (outputs '("out"))
      (arguments
-      `(#:tests? #f                     ; runtest: command not found
+      `(#:tests? #f
         #:parallel-build? #f
         #:strip-binaries? #f
         #:configure-flags
         (let ((out (assoc-ref %outputs "out"))
               (glibc (assoc-ref %build-inputs "glibc-boot")))
-          (list "--disable-shared"
-                 "--enable-static"
-                 "--host=i386-unknown-linux"
-                 "--target=i386-unknown-linux"
-                 (string-append "--with-native-system-header-dir=" glibc 
"/include")
-                 (string-append "--with-build-sysroot=" glibc "/include")
-                 "--disable-plugin"
-                 "--enable-languages=c"
-                 "--disable-multilib"
-
-                 ;; No pre-compiled libstdc++ headers, to save space.
-                 "--disable-libstdcxx-pch"
-
-                 "--disable-threads"
-                 "--disable-libmudflap"
-                 "--disable-libatomic"
-                 "--disable-libsanitizer"
-                 "--disable-libitm"
-                 "--disable-libgomp"
-                 "--disable-libcilkrts"
-                 "--disable-libvtv"
-                 "--disable-libssp"
-                 "--disable-libquadmath"
-                 "--disable-decimal-float"
-                 (string-append "--prefix=" out)))
-        #:modules ((guix build gnu-build-system)
-                   (guix build utils)
-                   (srfi srfi-1))
+          (list "--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")
+                (string-append "--prefix=" out)
+
+                "--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-shared"
+                "--disable-threads"
+                "--enable-languages=c"
+
+                "--enable-static"
+                "--enable-threads=single"
+
+                ;; libstdc++ cannot be built at this stage
+                ;; ("Link tests are not allowed after
+                ;; GCC_NO_EXECUTABLES.").
+                '"--disable-libstdc__-v3"
+
+                ;; No pre-compiled libstdc++ headers, to save space.
+                "--disable-libstdcxx-pch"
+
+                ;; for libcpp ...
+                "--disable-build-with-cxx"))
+
         #:phases
         (modify-phases %standard-phases
 
@@ -1208,20 +1221,21 @@ ac_cv_c_float_format='IEEE (little-endian)'
                          ":" (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 "findutils") "/bin"
+                         ":" (assoc-ref %build-inputs "file") "/bin"
+                         ":" (assoc-ref %build-inputs "findutils") "/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"))
                 (setenv "CONFIG_SHELL" (string-append
                                         (assoc-ref %build-inputs "bash")
                                         "/bin/sh"))
                 (setenv "C_INCLUDE_PATH" (string-append
-                                          gcc 
"/lib/gcc-lib/i386-unknown-linux/2.95.3/include"
+                                          gcc 
"/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
                                           ":" headers "/include"
                                           ":" glibc "/include"
                                           ":" (getcwd) "/mpfr/src"
@@ -1229,56 +1243,17 @@ ac_cv_c_float_format='IEEE (little-endian)'
                 (setenv "LIBRARY_PATH" (string-append glibc "/lib"
                                                       ":" gcc "/lib"))
 
-                (setenv "NATIVE_SYSTEM_HEADER_DIR" (string-append glibc 
"/include"))
-
                 (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv 
"C_INCLUDE_PATH"))
                 (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv 
"LIBRARY_PATH")))))
-         (replace 'configure
-           (lambda* (#:key configure-flags #:allow-other-keys)
-             (let ((flags (filter (lambda (flag)
-                                    (not (string-prefix? "--build=" flag)))
-                                  configure-flags)))
-               (zero?
-                (apply system* "./configure" configure-flags)))))))))))
 
-(define-public gcc-mesboot
-  (package-with-bootstrap-guile
-   (package
-     (inherit gcc-mesboot-4.1.0)
-     (name "gcc-mesboot")
-     (version "4.7.4")
-     (source (origin
-               (method url-fetch)
-               (uri (string-append "mirror://gnu/gcc/gcc-4.7.4/gcc-"
-                                   version
-                                   ".tar.gz"))
-               (patches (search-patches "gcc-boot-4.7.4.patch"))
-               (sha256
-                (base32
-                 "06bqygv17f71f7g7pi7ddvhljcr8dimrypgiif9g1r6lqn1sbfnx"))))
-     (native-inputs `(("binutils-boot" ,binutils-mesboot)
-                      ("gcc-boot" ,gcc-mesboot-4.1.0)
-                      ("glibc-boot" ,glibc-mesboot)
-                      ("kernel-headers" ,(linux-libre-headers-boot0))))
-     ;; (inputs `(("gmp-source" ,(package-source gmp))
-     ;;           ("mpfr-source" ,(package-source mpfr-boot))
-     ;;           ("mpc-source" ,(package-source mpc))))
-     (arguments
-      `(
-        ;;#:make-flags (list "LIBGCC2_CFLAGS=-D IN_LIBGCC2" )
-        ,@(substitute-keyword-arguments (package-arguments gcc-mesboot-4.1.0)
-            ((#:configure-flags configure-flags)
-             `(let ((flags (filter (lambda (flag)
-                                     (not (string-prefix? 
"--enable-languages=" flag)))
-                                   ,configure-flags)))
-                (cons*
-                                        ; with gmp-2.4.3 Configuring in
-                 ; host-i386-unknown-linux/gmp configure: error: invalid
-                 ; feature name: libstdc++-v3
-                 ;; "--disable-libstdc++-v3"
-                 ;;"--enable-languages=c,c++"
-                 "--enable-languages=c"
-                 flags)))))))))
+          (replace 'configure
+            (lambda* (#:key configure-flags #:allow-other-keys)
+              (mkdir-p "build")
+              (chdir "build")
+              (format (current-error-port) "running: ../build/configure ~a\n" 
(string-join configure-flags))
+              (zero?
+               (apply system* "../configure" configure-flags))))))))))
+
 ;;;
 
 (define-public nyacc
diff --git a/gnu/packages/patches/gcc-boot-4.7.4.patch 
b/gnu/packages/patches/gcc-boot-4.7.4.patch
index 76c8c4d..1f376b4 100644
--- a/gnu/packages/patches/gcc-boot-4.7.4.patch
+++ b/gnu/packages/patches/gcc-boot-4.7.4.patch
@@ -41,3 +41,16 @@ index c301ff03cae..f86318c3bd5 100644
                 $(INHIBIT_LIBC_CFLAGS)
  
  # Additional options to use when compiling libgcc2.a.
+diff --git a/libgcc/generic-morestack-thread.c 
b/libgcc/generic-morestack-thread.c
+index bbe6dd12b5a..1d1d48223d7 100644
+--- a/libgcc/generic-morestack-thread.c
++++ b/libgcc/generic-morestack-thread.c
+@@ -35,7 +35,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If 
not, see
+    will want to define inhibit_libc while building a compiler which
+    can build glibc.  */
+ 
+-#ifndef inhibit_libc
++#if 0 // ndef inhibit_libc
+ 
+ #include <errno.h>
+ #include <pthread.h>



reply via email to

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