[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
186/192: gnu: gcc-mesboot0: Cleanup.
From: |
Jan Nieuwenhuizen |
Subject: |
186/192: gnu: gcc-mesboot0: Cleanup. |
Date: |
Mon, 3 Sep 2018 16:25:24 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit a06fad88933d343e93479adf4b20167942f57a47
Author: Jan Nieuwenhuizen <address@hidden>
Date: Mon Sep 3 15:54:32 2018 +0200
gnu: gcc-mesboot0: Cleanup.
* gnu/packages/commencement.scm (gcc-mesboot0): Cleanup.
---
gnu/packages/commencement.scm | 149 +++++++++++++++++-------------------------
1 file changed, 59 insertions(+), 90 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 306ed33..88d31c4 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -956,107 +956,76 @@ ac_cv_c_float_format='IEEE (little-endian)'
(package
(inherit gcc-core-mesboot)
(name "gcc-mesboot0")
- (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-boot-2.95.3.patch"))
- (sha256
- (base32
- "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
- (supported-systems '("i686-linux"))
- (inputs '())
- (propagated-inputs '())
+ (source (origin (inherit (package-source gcc-core-mesboot))
+ (patches (search-patches "gcc-boot-2.95.3.patch"))))
(native-inputs `(("binutils" ,binutils-mesboot0)
("gcc" ,gcc-core-mesboot)
("libc" ,glibc-mesboot0)
+ ("bash" ,%bootstrap-coreutils&co)
("coreutils" ,%bootstrap-coreutils&co)
("diffutils" ,diffutils-mesboot)
("kernel-headers" ,%bootstrap-linux-libre-headers)
("make" ,make-mesboot0)))
- (outputs '("out"))
(arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #: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"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (glibc (assoc-ref %build-inputs "libc"))
- (headers (assoc-ref %build-inputs "kernel-headers")))
- (when #t ;; no info
- (delete-file-recursively "texinfo")
- (system "touch gcc/cpp.info gcc/gcc.info"))
-
- (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"))
-
- (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 "/include" this is MES
- ;;":/"
- gcc
"/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
- ":" headers "/include"
- ":" glibc "/include"))
- (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"))
-
- (setenv "CC" "gcc")
- (setenv "LD" "gcc")
- (setenv "CPP" "gcc -E")
- (setenv "RANLIB" "true")
-
- (with-output-to-file "config.cache"
- (lambda _
- (display "
+ `(,@(substitute-keyword-arguments (package-arguments gcc-core-mesboot)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (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"))
+ (format (current-error-port) "C_INCLUDE_PATH=~a\n"
(getenv "C_INCLUDE_PATH"))
+ ;; FIXME
+ ;; (setenv "C_INCLUDE_PATH" (string-join
+ ;; (list (string-append glibc
"/include")
+ ;; (getenv
"C_INCLUDE_PATH"))
+ ;; ":"))
+ (setenv "C_INCLUDE_PATH" (string-append
+ gcc
"/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
+ ":" kernel-headers "/include"
+ ":" 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"))
+ ;; FIXME: add glibc dirs to paths manually
+ (setenv "LIBRARY_PATH" (string-join
+ (list (string-append glibc
"/lib")
+ (getenv "LIBRARY_PATH"))
+ ":"))
+ (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv
"LIBRARY_PATH"))
+ (with-output-to-file "config.cache"
+ (lambda _
+ (display "
ac_cv_c_float_format='IEEE (little-endian)'
")))
- (and
- (zero?
- (system* "./configure"
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- "--disable-shared"
- (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/i686-unknown-linux-gnu/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"))))))))))))
+ #t)))
+ (replace 'install2
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (gcc-dir (string-append
+ 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")))
+ (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"))))))))
+ ((#:configure-flags configure-flags)
+ `(let ((out (assoc-ref %outputs "out")))
+ `( ;;"--enable-static"
+ "--disable-shared"
+ "--disable-werror"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ ,(string-append "--prefix=" out))))
+ ((#:make-flags make-flags)
+ `(let ((gcc (assoc-ref %build-inputs "gcc")))
+ `("RANLIB=true"
+ ,(string-append "LIBGCC2_INCLUDES=-I " gcc "/include")
+ "LANGUAGES=c")))))))))
(define-public binutils-mesboot
(package-with-bootstrap-guile
- 189/192: gnu: make-mesboot: Cleanup., (continued)
- 189/192: gnu: make-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 187/192: gnu: make-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 177/192: gnu: mes-boot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 183/192: gnu: gcc-core-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 185/192: gnu: glibc-mesboot0: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 65/192: gnu: binutils-boot: Update to 2.25., Jan Nieuwenhuizen, 2018/09/03
- 191/192: gnu: glibc-headers-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 190/192: gnu: gcc-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 192/192: gnu: glibc-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 173/192: gnu: Add mesboot-headers., Jan Nieuwenhuizen, 2018/09/03
- 186/192: gnu: gcc-mesboot0: Cleanup.,
Jan Nieuwenhuizen <=
- 188/192: gnu: binutils-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 145/192: bootstrap: Integrate mes bootstrap for i686-linux., Jan Nieuwenhuizen, 2018/09/03
- 174/192: gnu: glibc-mesboot: Update to 2.16.0., Jan Nieuwenhuizen, 2018/09/03
- 68/192: Revert "gnu: binutils-boot: Update to 2.25.", Jan Nieuwenhuizen, 2018/09/03
- 162/192: gnu: Add glibc-mesboot 2.3.6. WIP, Jan Nieuwenhuizen, 2018/09/03
- 79/192: gnu: glibc-boot: Update to 2.2.5., Jan Nieuwenhuizen, 2018/09/04
- 78/192: gnu: Add glibc-boot 2.0.1., Jan Nieuwenhuizen, 2018/09/04