[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
190/211: gnu: gcc-mesboot: Cleanup.
From: |
Jan Nieuwenhuizen |
Subject: |
190/211: gnu: gcc-mesboot: Cleanup. |
Date: |
Sat, 8 Sep 2018 11:09:54 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit c2ed99ee431e7386e914605224d58edea641d997
Author: Jan Nieuwenhuizen <address@hidden>
Date: Mon Sep 3 16:26:11 2018 +0200
gnu: gcc-mesboot: Cleanup.
* gnu/packages/commencement.scm (gcc-mesboot): Cleanup.
---
gnu/packages/commencement.scm | 212 ++++++++++++++++++------------------------
1 file changed, 92 insertions(+), 120 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index eac65a3..5cfdcf1 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1137,137 +1137,109 @@ 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))))
- (propagated-inputs '())
(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
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:tests? #f
- #:parallel-build? #f
- #:strip-binaries? #f
- #:configure-flags
- (let ((out (assoc-ref %outputs "out"))
- (glibc (assoc-ref %build-inputs "libc")))
- (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,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
-
- ;; 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 (zero? (system* "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)))
-
- (add-before 'configure 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (binutils (assoc-ref %build-inputs "binutils"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (glibc (assoc-ref %build-inputs "libc"))
- (headers (assoc-ref %build-inputs "kernel-headers")))
-
- (setenv "CPP" (string-append "gcc -E"))
- (setenv "AR" "ar")
- (setenv "RANLIB" "true")
- (setenv "PATH"
- (string-append
- (assoc-ref %build-inputs "binutils") "/bin"
- ":" (assoc-ref %build-inputs "gcc") "/bin"
-
- ;; more bootstrap cheats
- ":" (assoc-ref %build-inputs "coreutils") "/bin"
- ":" (assoc-ref %build-inputs "diffutils") "/bin"
- ":" (assoc-ref %build-inputs "make") "/bin"))
+ `(,@(substitute-keyword-arguments (package-arguments gcc-core-mesboot)
+ ((#: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")))
- (format (current-error-port) "PATH=~a\n" (getenv "PATH"))
- (setenv "CONFIG_SHELL" (string-append
- (assoc-ref %build-inputs "coreutils")
- "/bin/sh"))
- (setenv "C_INCLUDE_PATH" (string-append
- gcc
"/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
- ":" 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")))))
+ ;; To reduce the set of pre-built bootstrap inputs, build
+ ;; GMP & co. from GCC.
+ (for-each (lambda (source)
+ (or (zero? (system* "tar" "xvf" source))
+ (error "failed to unpack tarball"
+ source)))
+ (list gmp mpfr mpc))
- (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))))))))))
+ ;; 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-shared"
+ "--disable-threads"
+ "--enable-languages=c,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")))
+ ((#:make-flags make-flags)
+ ''())))))))
(define-public gcc-mesboot-wrapper
(package-with-bootstrap-guile
- 206/211: gnu: m4-boot0: New variable., (continued)
- 206/211: gnu: m4-boot0: New variable., Jan Nieuwenhuizen, 2018/09/08
- 201/211: gnu: file-boot0: Remove bootstrap leaks., Jan Nieuwenhuizen, 2018/09/08
- 204/211: gnu: gcc-boot0: Workaround libtool install bug., Jan Nieuwenhuizen, 2018/09/08
- 203/211: gnu: glibc-mesboot: Drop obsolete sun rpc support., Jan Nieuwenhuizen, 2018/09/08
- 208/211: gnu: nyacc: Update to 0.86.0., Jan Nieuwenhuizen, 2018/09/08
- 199/211: gnu: diffutils-boot0: Remove bootstrap leaks., Jan Nieuwenhuizen, 2018/09/08
- 183/211: gnu: gcc-core-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 205/211: gnu: perl-boot0: Remove bootstrap leaks., Jan Nieuwenhuizen, 2018/09/08
- 197/211: Oops, libstdc++ build fixes WIP, Jan Nieuwenhuizen, 2018/09/08
- 177/211: gnu: mes-boot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 190/211: gnu: gcc-mesboot: Cleanup.,
Jan Nieuwenhuizen <=
- 180/211: gnu: make-mesboot0: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 181/211: gnu: diffutils-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 162/211: gnu: Add glibc-mesboot 2.3.6. WIP, Jan Nieuwenhuizen, 2018/09/08
- 185/211: gnu: glibc-mesboot0: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 207/211: gnu: bison-boot0: Remove bootstrap leaks., Jan Nieuwenhuizen, 2018/09/08
- 193/211: gnu: glibc-mesboot: Oops, install everything., Jan Nieuwenhuizen, 2018/09/08
- 189/211: gnu: make-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 172/211: copy-linux-headers: Update for glibc-2.16.0., Jan Nieuwenhuizen, 2018/09/08
- 198/211: gnu: Add gcc-mesboot-4.9.4., Jan Nieuwenhuizen, 2018/09/08
- 202/211: gnu: libstdc++-boot0: Copy libstdc++.so.6.0.20 to pass install., Jan Nieuwenhuizen, 2018/09/08