[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
18/63: gnu: commencement: gcc-core-mesboot0: Use Gash instead of coretut
From: |
guix-commits |
Subject: |
18/63: gnu: commencement: gcc-core-mesboot0: Use Gash instead of coretutils&co. |
Date: |
Thu, 13 Feb 2020 10:11:18 -0500 (EST) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 33e03bafe3ca17a0e4b201cf621bc38903316a4e
Author: Jan Nieuwenhuizen <address@hidden>
AuthorDate: Sun Oct 6 19:29:01 2019 +0200
gnu: commencement: gcc-core-mesboot0: Use Gash instead of coretutils&co.
* gnu/packages/commencement.scm (gcc-core-mesboot0): Rename from
gcc-core-mesboot; Use Gash instead of coretutils&co.
---
gnu/packages/commencement.scm | 119 ++++++++++++++++++++++--------------------
1 file changed, 63 insertions(+), 56 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index a9cb499..e8828f2 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1247,36 +1247,32 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(("[.]//dev/null") "/dev/null"))
(invoke "sh" "./config.status"))))))))
-(define gcc-core-mesboot
+(define gcc-core-mesboot0
;; Gcc-2.95.3 is the most recent GCC that is supported by what the Mes C
;; Library v0.16 offers. Gcc-3.x (and 4.x) place higher demands on a C
;; library, such as dir.h/struct DIR/readdir, locales, signals... Also,
- ;; with gcc-2.95.3, binutils-boot-2.20.1a and glibc-2.2.5 we found a GNU
- ;; toolchain triplet "that works".
+ ;; with gcc-2.95.3, binutils (2.14.0, 2.20.1a) and glibc-2.2.5 we found a
+ ;; GNU toolchain triplet "that works".
(package
(inherit gcc)
- (name "gcc-core-mesboot")
+ (name "gcc-core-mesboot0")
(version "2.95.3")
- (source (bootstrap-origin
- (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")))))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-"
+ version
+ ".tar.gz"))
+ ;; `patches' needs XZ
+ ;; (patches (search-patches "gcc-boot-2.95.3.patch"))
+ (sha256
+ (base32
+ "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
- (native-inputs `(("binutils" ,binutils-mesboot0)
- ("tcc" ,tcc-boot)
-
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("diffutils" ,diffutils-mesboot)
- ("make" ,make-mesboot0)))
+ (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-2.95.3.patch"))
+ ("binutils" ,binutils-mesboot0)
+ ,@(%boot-tcc-inputs)))
(outputs '("out"))
(arguments
`(#:implicit-inputs? #f
@@ -1292,32 +1288,37 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
"--build=i686-unknown-linux-gnu"
"--host=i686-unknown-linux-gnu"
,(string-append "--prefix=" out)))
- #:make-flags (list
- "CC=tcc -static -D __GLIBC_MINOR__=6"
- "OLDCC=tcc -static -D __GLIBC_MINOR__=6"
- "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6"
- "AR=ar"
- "RANLIB=ranlib"
- (string-append "LIBGCC2_INCLUDES=-I "
- (assoc-ref %build-inputs "tcc")
- "/include")
- "LANGUAGES=c"
- (string-append "BOOT_LDFLAGS="
- " -B" (assoc-ref %build-inputs "tcc")
- "/lib/"))
+ #:make-flags
+ `("CC=tcc -static -D __GLIBC_MINOR__=6"
+ "OLDCC=tcc -static -D __GLIBC_MINOR__=6"
+ "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6"
+ "AR=ar"
+ "RANLIB=ranlib"
+ ,(string-append "LIBGCC2_INCLUDES=-I "
+ (assoc-ref %build-inputs "tcc")
+ "/include")
+ "LANGUAGES=c"
+ ,(string-append "BOOT_LDFLAGS="
+ " -B" (assoc-ref %build-inputs "tcc")
+ "/lib/"))
#:modules ((guix build gnu-build-system)
(guix build utils)
(srfi srfi-1))
#:phases
(modify-phases %standard-phases
- ;; gcc-2.95.3 needs more traditional configure
+ (add-after 'unpack 'apply-boot-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch-file (assoc-ref inputs "boot-patch")))
+ (system* "patch" "--force" "-p1" "-i" patch-file)
+ #t)))
(add-before 'configure 'setenv
(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (tcc (assoc-ref %build-inputs "tcc"))
- (cppflags " -D __GLIBC_MINOR__=6"))
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash"))
+ (tcc (assoc-ref %build-inputs "tcc"))
+ (cppflags " -D __GLIBC_MINOR__=6"))
+ (setenv "CONFIG_SHELL" shell)
(setenv "CPPFLAGS" cppflags)
(setenv "CC" (string-append "tcc" cppflags))
(setenv "CC_FOR_BUILD" (string-append "tcc" cppflags))
@@ -1326,9 +1327,9 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(lambda _
(display "
ac_cv_c_float_format='IEEE (little-endian)'
-")))
- #t)))
- (replace 'configure
+"))))))
+ ;; gcc-2.95.3
+ (replace 'configure ; needs classic invocation of configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port)
"running ./configure ~a\n" (string-join configure-flags))
@@ -1346,18 +1347,18 @@ ac_cv_c_float_format='IEEE (little-endian)'
(gcc-dir (string-append
out
"/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
(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")))
+ (with-directory-excursion "tmp"
+ (invoke "ar" "x" (string-append "../gcc/libgcc2.a"))
+ (invoke "ar" "x" (string-append tcc "/lib/libtcc1.a"))
+ (apply invoke "ar" "r" (string-append gcc-dir "/libgcc.a")
+ (find-files "." "\\.o")))
(copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))
(copy-file (string-append tcc "/lib/libtcc1.a")
(string-append out "/lib/libtcc1.a"))
+ (invoke "ar" "x" (string-append tcc "/lib/libtcc1.a"))
+ (invoke "ar" "x" (string-append tcc "/lib/libc.a"))
(invoke "ar" "r" (string-append gcc-dir "/libc.a")
- (string-append tcc-lib "/libc+gnu.o")
- (string-append tcc-lib "/libtcc1.o"))
- (invoke "ar" "r" (string-append out "/lib/libc.a")
- (string-append tcc-lib "/libc+gnu.o")
- (string-append tcc-lib "/libtcc1.o"))
- (invoke "ls" "-ltrF" gcc-dir)
+ "libc.o" "libtcc1.o")
#t))))))
(native-search-paths
(list (search-path-specification
@@ -1370,6 +1371,12 @@ ac_cv_c_float_format='IEEE (little-endian)'
(variable "LIBRARY_PATH")
(files '("lib")))))))
+(define (%boot-mesboot-core-inputs)
+ `(("binutils" ,binutils-mesboot0)
+ ("gawk" ,gawk-mesboot0)
+ ("gcc" ,gcc-core-mesboot0)
+ ,@(alist-delete "tcc" (%boot-tcc-inputs))))
+
(define mesboot-headers
(package
(inherit mes-boot)
@@ -1420,7 +1427,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(inputs '())
(propagated-inputs '())
(native-inputs `(("binutils" ,binutils-mesboot0)
- ("gcc" ,gcc-core-mesboot)
+ ("gcc" ,gcc-core-mesboot0)
("bash" ,%bootstrap-coreutils&co)
("coreutils" ,%bootstrap-coreutils&co)
@@ -1482,7 +1489,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(define gcc-mesboot0
(package
- (inherit gcc-core-mesboot)
+ (inherit gcc-core-mesboot0)
(name "gcc-mesboot0")
(native-inputs `(("binutils" ,binutils-mesboot0)
@@ -1490,14 +1497,14 @@ ac_cv_c_float_format='IEEE (little-endian)'
;; #include_next purposes.
("libc" ,glibc-mesboot0)
("kernel-headers" ,%bootstrap-linux-libre-headers)
- ("gcc" ,gcc-core-mesboot)
+ ("gcc" ,gcc-core-mesboot0)
("bash" ,%bootstrap-coreutils&co)
("coreutils" ,%bootstrap-coreutils&co)
("diffutils" ,diffutils-mesboot)
("make" ,make-mesboot0)))
(arguments
- (substitute-keyword-arguments (package-arguments gcc-core-mesboot)
+ (substitute-keyword-arguments (package-arguments gcc-core-mesboot0)
((#:phases phases)
`(modify-phases ,phases
(replace 'setenv
@@ -1644,7 +1651,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
("diffutils" ,diffutils-mesboot)
("make" ,make-mesboot)))
(arguments
- (substitute-keyword-arguments (package-arguments gcc-core-mesboot)
+ (substitute-keyword-arguments (package-arguments gcc-core-mesboot0)
((#:make-flags make-flags)
`(let* ((libc (assoc-ref %build-inputs "libc"))
(ldflags (string-append
- 08/63: gnu: commencement: tcc-boot0: Use Gash instead of coretutils&co., (continued)
- 08/63: gnu: commencement: tcc-boot0: Use Gash instead of coretutils&co., guix-commits, 2020/02/13
- 12/63: gnu: commencement: Add bash-mesboot0., guix-commits, 2020/02/13
- 09/63: gnu: commencement: Add gzip-mesboot., guix-commits, 2020/02/13
- 07/63: gnu: commencement: mes-boot: Use Gash instead of coretutils&co., guix-commits, 2020/02/13
- 15/63: gnu: commencement: Add patch-mesboot., guix-commits, 2020/02/13
- 03/63: gnu: commencement: Add %bootstrap-guile+guild., guix-commits, 2020/02/13
- 16/63: gnu: commencement: Add sed-mesboot0., guix-commits, 2020/02/13
- 14/63: gnu: commencement: diffutils-mesboot: Use Gash instead of coretutils&co., guix-commits, 2020/02/13
- 17/63: gnu: commencement: binutils-mesboot0: Use Gash instead of coretutils&co., guix-commits, 2020/02/13
- 13/63: gnu: commencement: tcc-boot: Use Gash instead of coretutils&co., guix-commits, 2020/02/13
- 18/63: gnu: commencement: gcc-core-mesboot0: Use Gash instead of coretutils&co.,
guix-commits <=
- 20/63: gnu: commencement: mesboot-headers: Use Gash instead of coretutils&co., guix-commits, 2020/02/13
- 25/63: gnu: commencement: Add binutils-mesboot1., guix-commits, 2020/02/13
- 26/63: gnu: commencement: Add coreutils-mesboot0., guix-commits, 2020/02/13
- 32/63: gnu: commencement: Add gcc-mesboot1: Use Gash instead of coreutils&co., guix-commits, 2020/02/13
- 36/63: gnu: commencement: glibc-headers-mesboot: Use Gash instead of coreutils&co., guix-commits, 2020/02/13
- 41/63: gnu: commencement: Add coreutils-mesboot., guix-commits, 2020/02/13
- 43/63: gnu: commencement: %bootstrap-inputs+toolchain: Use Gash instead of coreutils&co., guix-commits, 2020/02/13
- 45/63: gnu: commencement: Add sed-boot0., guix-commits, 2020/02/13
- 22/63: gnu: commencement: gcc-mesboot0: Use Gash instead of coretutils&co., guix-commits, 2020/02/13
- 33/63: gnu: commencement: Add xz-mesboot., guix-commits, 2020/02/13