[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
186/211: gnu: gcc-mesboot0: Cleanup.
From: |
Jan Nieuwenhuizen |
Subject: |
186/211: gnu: gcc-mesboot0: Cleanup. |
Date: |
Sat, 8 Sep 2018 11:09:54 -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
- 192/211: gnu: glibc-mesboot: Cleanup., (continued)
- 192/211: gnu: glibc-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 194/211: oops: fixup glibc-bootstrap-system-2.16.0.patch name., Jan Nieuwenhuizen, 2018/09/08
- 179/211: gnu: tcc-boot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 171/211: %bootstrap-linux-libre-headers: Update, Jan Nieuwenhuizen, 2018/09/08
- 195/211: glibc-mesboot: do not validate runpath, Jan Nieuwenhuizen, 2018/09/08
- 170/211: gnu: make-mesboot: Update to 3.82., Jan Nieuwenhuizen, 2018/09/08
- 160/211: gnu: Add mpc-boot 1.0.3., Jan Nieuwenhuizen, 2018/09/08
- 163/211: Add new cheat: use %bootstrap-glibc for x86 for now., Jan Nieuwenhuizen, 2018/09/08
- 174/211: gnu: glibc-mesboot: Update to 2.16.0., Jan Nieuwenhuizen, 2018/09/08
- 95/211: gnu: binutils-boot: Update to 2.20.1a., Jan Nieuwenhuizen, 2018/09/08
- 186/211: gnu: gcc-mesboot0: Cleanup.,
Jan Nieuwenhuizen <=
- 175/211: gnu: glibc-mesboot: Remove %bootstrap-glibc., Jan Nieuwenhuizen, 2018/09/08
- 187/211: gnu: make-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 178/211: gnu: tcc-boot0: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 164/211: gnu: Add gcc-mesboot-wrapper 4.7.4., Jan Nieuwenhuizen, 2018/09/08
- 167/211: gnu: gcc-mesboot: Enable c++ too., Jan Nieuwenhuizen, 2018/09/08
- 152/211: gnu: make-mesboot: Update to 3.80., Jan Nieuwenhuizen, 2018/09/08
- 144/211: gnu: bootstrap-tarballs: Update inputs for i686-linux., Jan Nieuwenhuizen, 2018/09/08
- 91/211: gnu: gcc-core-boot: Install libgcc2.a too., Jan Nieuwenhuizen, 2018/09/08
- 151/211: gnu: Add diffutils-mesboot 2.7., Jan Nieuwenhuizen, 2018/09/08
- 168/211: gnu: gcc-mesboot-wrapper: Wrap g++ too., Jan Nieuwenhuizen, 2018/09/08