mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
gnu: gcc-mesboot: Adjust for changes in gcc-mesboot1.
* gnu/packages/commencement.scm (gcc-mesboot)[inputs]: Replace gmp, mpfr and mpc sources with the ones used later in the bootstrap. Add the no-longer inherited 'unpack-gmp&co phase. Replace the 'set-cplus-include-path phase instead of the 'setenv phase and make the changes less dramatic. Change-Id: I89ec54cae4f48ea5f1b2c894c50a6065a56e5d33
This commit is contained in:
parent
de4798ff44
commit
0177f4ac2d
1 changed files with 29 additions and 13 deletions
|
@ -2120,6 +2120,9 @@ (define gcc-mesboot
|
|||
(native-inputs `(("gcc-wrapper" ,gcc-mesboot1-wrapper)
|
||||
("headers" ,glibc-headers-mesboot)
|
||||
,@(%boot-mesboot4-inputs)))
|
||||
(inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
|
||||
("mpfr-source" ,(bootstrap-origin (package-source mpfr)))
|
||||
("mpc-source" ,(bootstrap-origin (package-source mpc)))))
|
||||
(arguments
|
||||
`(#:validate-runpath? #f
|
||||
,@(substitute-keyword-arguments (package-arguments gcc-mesboot1)
|
||||
|
@ -2167,31 +2170,44 @@ (define gcc-mesboot
|
|||
(delete 'apply-boot-patch)
|
||||
(delete 'unpack-g++) ; sadly, gcc-4.9.4 does not provide
|
||||
; modular core/language downloads
|
||||
(replace 'setenv
|
||||
(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)
|
||||
(invoke "tar" "xvf" 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-6.0 mpfr mpc)))))
|
||||
(replace 'set-cplus-include-path
|
||||
(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")))
|
||||
(let* ((bash (assoc-ref %build-inputs "bash"))
|
||||
(gcc (assoc-ref %build-inputs "gcc")))
|
||||
(setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
|
||||
(setenv "C_INCLUDE_PATH" (string-append
|
||||
(getenv "C_INCLUDE_PATH") ":"
|
||||
gcc "/lib/gcc-lib/"
|
||||
#$(commencement-build-target)
|
||||
"/4.6.4/include"
|
||||
":" kernel-headers "/include"
|
||||
":" glibc "/include"
|
||||
":" (getcwd) "/mpfr/src"))
|
||||
(setenv "CPLUS_INCLUDE_PATH" (string-append
|
||||
(getenv "CPLUS_INCLUDE_PATH") ":"
|
||||
gcc "/lib/gcc-lib/"
|
||||
#$(commencement-build-target)
|
||||
"/4.6.4/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) "CPLUS_INCLUDE_PATH=~a\n" (getenv "CPLUS_INCLUDE_PATH"))
|
||||
(format (current-error-port) "LIBRARY_PATH=~a\n"
|
||||
|
|
Loading…
Reference in a new issue