[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
42/63: bootstrap: Add gcc-mesboot1: Scheme-only bootstrap.
From: |
guix-commits |
Subject: |
42/63: bootstrap: Add gcc-mesboot1: Scheme-only bootstrap. |
Date: |
Sun, 24 Nov 2019 06:06:27 -0500 (EST) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit cd1c8053eb18d80b391d6aaef28f7f761f758a0a
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 | 150 +++++++++---------------------------------
1 file changed, 32 insertions(+), 118 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 99e402a..317f9db 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2038,6 +2038,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)
@@ -2061,124 +2093,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
- 31/63: bootstrap: glibc-mesboot0: Scheme-only bootstrap., (continued)
- 31/63: bootstrap: glibc-mesboot0: Scheme-only bootstrap., guix-commits, 2019/11/24
- 33/63: bootstrap: Add tar-mesboot., guix-commits, 2019/11/24
- 34/63: bootstrap: Add grep-mesboot., guix-commits, 2019/11/24
- 35/63: bootstrap: Add binutils-mesboot1., guix-commits, 2019/11/24
- 36/63: bootstrap: Add coreutils-mesboot0., guix-commits, 2019/11/24
- 37/63: bootstrap: Add make-mesboot., guix-commits, 2019/11/24
- 38/63: bootstrap: Add gawk-mesboot., guix-commits, 2019/11/24
- 39/63: bootstrap: Add sed-mesboot., guix-commits, 2019/11/24
- 40/63: bootstrap: Add gcc-core-mesboot1., guix-commits, 2019/11/24
- 41/63: bootstrap: Add bash-mesboot., guix-commits, 2019/11/24
- 42/63: bootstrap: Add gcc-mesboot1: Scheme-only bootstrap.,
guix-commits <=
- 43/63: bootstrap: Add xz-mesboot., guix-commits, 2019/11/24
- 44/63: bootstrap: Add hello-mesboot., guix-commits, 2019/11/24
- 45/63: bootstrap: binutils-mesboot: Scheme-only bootstrap., guix-commits, 2019/11/24
- 46/63: bootstrap: glibc-headers-mesboot: Scheme-only bootstrap., guix-commits, 2019/11/24
- 47/63: bootstrap: glibc-mesboot: Scheme-only bootstrap., guix-commits, 2019/11/24
- 48/63: bootstrap: gcc-mesboot1-wrapper: Scheme-only bootstrap., guix-commits, 2019/11/24
- 49/63: bootstrap: gcc-mesboot: Scheme-only bootstrap., guix-commits, 2019/11/24
- 50/63: bootstrap: gcc-mesboot-wrapper: Scheme-only bootstrap., guix-commits, 2019/11/24
- 52/63: bootstrap: Remove m4-bootstrap., guix-commits, 2019/11/24
- 51/63: bootstrap: Add coreutils-mesboot., guix-commits, 2019/11/24