gnu: Refer to 'gcc' instead of 'gcc-4.9'.

* gnu/packages/commencement.scm (gcc-boot0, cross-gcc-wrapper,
  libstdc++, gcc-final): Refer to GCC instead of GCC-4.9.
* gnu/packages/cross-base.scm (%xgcc): New variable.
  (cross-gcc-arguments, cross-gcc): Refer to %XGCC instead of GCC-4.9.
* gnu/packages/llvm.scm (clang-from-llvm): Refer to GCC instead of GCC-4.9.
* gnu/packages/make-bootstrap.scm (package-with-relocatable-glibc,
  %gcc-static, %gcc-stripped): Likewise.
This commit is contained in:
Ludovic Courtès 2015-06-26 17:06:30 +02:00
parent 744985761a
commit c92f1c0a33
4 changed files with 26 additions and 21 deletions

View file

@ -167,7 +167,7 @@ (define (remove-triplet-prefix name)
(define gcc-boot0 (define gcc-boot0
(package-with-bootstrap-guile (package-with-bootstrap-guile
(package (inherit gcc-4.9) (package (inherit gcc)
(name "gcc-cross-boot0") (name "gcc-cross-boot0")
(arguments (arguments
`(#:guile ,%bootstrap-guile `(#:guile ,%bootstrap-guile
@ -177,7 +177,7 @@ (define gcc-boot0
(ice-9 regex) (ice-9 regex)
(srfi srfi-1) (srfi srfi-1)
(srfi srfi-26)) (srfi srfi-26))
,@(substitute-keyword-arguments (package-arguments gcc-4.9) ,@(substitute-keyword-arguments (package-arguments gcc)
((#:configure-flags flags) ((#:configure-flags flags)
`(append (list ,(string-append "--target=" (boot-triplet)) `(append (list ,(string-append "--target=" (boot-triplet))
@ -240,7 +240,7 @@ (define gcc-boot0
(with-directory-excursion (with-directory-excursion
(string-append out "/lib/gcc/" (string-append out "/lib/gcc/"
,(boot-triplet) ,(boot-triplet)
"/" ,(package-version gcc-4.9)) "/" ,(package-version gcc))
(symlink "libgcc.a" "libgcc_eh.a")))) (symlink "libgcc.a" "libgcc_eh.a"))))
,phases)))))) ,phases))))))
@ -256,7 +256,7 @@ (define gcc-boot0
;; No need for Texinfo at this stage. ;; No need for Texinfo at this stage.
(native-inputs (alist-delete "texinfo" (native-inputs (alist-delete "texinfo"
(package-native-inputs gcc-4.9)))))) (package-native-inputs gcc))))))
(define perl-boot0 (define perl-boot0
(package-with-bootstrap-guile (package-with-bootstrap-guile
@ -352,7 +352,7 @@ (define glibc-final-with-bootstrap-bash
(define (cross-gcc-wrapper gcc binutils glibc bash) (define (cross-gcc-wrapper gcc binutils glibc bash)
"Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC "Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC
that makes it available under the native tool names." that makes it available under the native tool names."
(package (inherit gcc-4.9) (package (inherit gcc)
(name (string-append (package-name gcc) "-wrapped")) (name (string-append (package-name gcc) "-wrapped"))
(source #f) (source #f)
(build-system trivial-build-system) (build-system trivial-build-system)
@ -520,7 +520,7 @@ (define libstdc++
;; (remember that GCC-BOOT0 cannot build libstdc++.) ;; (remember that GCC-BOOT0 cannot build libstdc++.)
;; TODO: Write in terms of 'make-libstdc++'. ;; TODO: Write in terms of 'make-libstdc++'.
(package-with-bootstrap-guile (package-with-bootstrap-guile
(package (inherit gcc-4.9) (package (inherit gcc)
(name "libstdc++") (name "libstdc++")
(arguments (arguments
`(#:guile ,%bootstrap-guile `(#:guile ,%bootstrap-guile
@ -539,7 +539,7 @@ (define libstdc++
(assoc-ref %outputs "out") (assoc-ref %outputs "out")
"/include" "/include"
;; "/include/c++/" ;; "/include/c++/"
;; ,(package-version gcc-4.9) ;; ,(package-version gcc)
)))) ))))
(outputs '("out")) (outputs '("out"))
(inputs %boot2-inputs) (inputs %boot2-inputs)
@ -573,7 +573,7 @@ (define gcc-final
;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.) ;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.)
,@(substitute-keyword-arguments (package-arguments gcc-boot0) ,@(substitute-keyword-arguments (package-arguments gcc-boot0)
((#:configure-flags boot-flags) ((#:configure-flags boot-flags)
(let loop ((args (package-arguments gcc-4.9))) (let loop ((args (package-arguments gcc)))
(match args (match args
((#:configure-flags normal-flags _ ...) ((#:configure-flags normal-flags _ ...)
normal-flags) normal-flags)

View file

@ -36,6 +36,11 @@ (define-module (gnu packages cross-base)
cross-libc cross-libc
cross-gcc)) cross-gcc))
(define %xgcc
;; GCC package used as the basis for cross-compilation. It doesn't have to
;; be 'gcc' and can be a specific variant such as 'gcc-4.8'.
gcc)
(define (cross p target) (define (cross p target)
(package (inherit p) (package (inherit p)
(name (string-append (package-name p) "-cross-" target)) (name (string-append (package-name p) "-cross-" target))
@ -90,7 +95,7 @@ (define (cross-gcc-arguments target libc)
;; <http://lists.fedoraproject.org/pipermail/arm/2010-August/000663.html> ;; <http://lists.fedoraproject.org/pipermail/arm/2010-August/000663.html>
;; for instance. ;; for instance.
(let ((args `(#:strip-binaries? #f (let ((args `(#:strip-binaries? #f
,@(package-arguments gcc-4.9)))) ,@(package-arguments %xgcc))))
(substitute-keyword-arguments args (substitute-keyword-arguments args
((#:configure-flags flags) ((#:configure-flags flags)
`(append (list ,(string-append "--target=" target) `(append (list ,(string-append "--target=" target)
@ -199,14 +204,14 @@ (define* (cross-gcc target
"Return a cross-compiler for TARGET, where TARGET is a GNU triplet. Use "Return a cross-compiler for TARGET, where TARGET is a GNU triplet. Use
XBINUTILS as the associated cross-Binutils. If LIBC is false, then build a XBINUTILS as the associated cross-Binutils. If LIBC is false, then build a
GCC that does not target a libc; otherwise, target that libc." GCC that does not target a libc; otherwise, target that libc."
(package (inherit gcc-4.9) (package (inherit %xgcc)
(name (string-append "gcc-cross-" (name (string-append "gcc-cross-"
(if libc "" "sans-libc-") (if libc "" "sans-libc-")
target)) target))
(source (origin (inherit (package-source gcc-4.9)) (source (origin (inherit (package-source %xgcc))
(patches (patches
(append (append
(origin-patches (package-source gcc-4.9)) (origin-patches (package-source %xgcc))
(cons (search-patch "gcc-cross-environment-variables.patch") (cons (search-patch "gcc-cross-environment-variables.patch")
(cross-gcc-patches target)))))) (cross-gcc-patches target))))))
@ -236,7 +241,7 @@ (define* (cross-gcc target
("libc-native" ,@(assoc-ref %final-inputs "libc")) ("libc-native" ,@(assoc-ref %final-inputs "libc"))
;; Remaining inputs. ;; Remaining inputs.
,@(let ((inputs (append (package-inputs gcc-4.9) ,@(let ((inputs (append (package-inputs %xgcc)
(alist-delete "libc" %final-inputs)))) (alist-delete "libc" %final-inputs))))
(if libc (if libc
`(("libc" ,libc) `(("libc" ,libc)

View file

@ -96,7 +96,7 @@ (define (clang-from-llvm llvm hash)
(native-inputs (package-native-inputs llvm)) (native-inputs (package-native-inputs llvm))
(inputs (inputs
`(("libxml2" ,libxml2) `(("libxml2" ,libxml2)
("gcc-lib" ,gcc-4.9 "lib") ("gcc-lib" ,gcc "lib")
,@(package-inputs llvm))) ,@(package-inputs llvm)))
(propagated-inputs (propagated-inputs
`(("llvm" ,llvm))) `(("llvm" ,llvm)))

View file

@ -103,11 +103,11 @@ (define (native-inputs)
("cross-binutils" ,(cross-binutils target)) ("cross-binutils" ,(cross-binutils target))
,@%final-inputs)) ,@%final-inputs))
`(("libc" ,(glibc-for-bootstrap)) `(("libc" ,(glibc-for-bootstrap))
("gcc" ,(package (inherit gcc-4.9) ("gcc" ,(package (inherit gcc)
(outputs '("out")) ; all in one so libgcc_s is easily found (outputs '("out")) ; all in one so libgcc_s is easily found
(inputs (inputs
`(("libc",(glibc-for-bootstrap)) `(("libc",(glibc-for-bootstrap))
,@(package-inputs gcc-4.9))))) ,@(package-inputs gcc)))))
,@(fold alist-delete %final-inputs '("libc" "gcc"))))) ,@(fold alist-delete %final-inputs '("libc" "gcc")))))
(package-with-explicit-inputs p inputs (package-with-explicit-inputs p inputs
@ -389,7 +389,7 @@ (define %glibc-stripped
(define %gcc-static (define %gcc-static
;; A statically-linked GCC, with stripped-down functionality. ;; A statically-linked GCC, with stripped-down functionality.
(package-with-relocatable-glibc (package-with-relocatable-glibc
(package (inherit gcc-4.9) (package (inherit gcc)
(name "gcc-static") (name "gcc-static")
(outputs '("out")) ; all in one (outputs '("out")) ; all in one
(arguments (arguments
@ -398,7 +398,7 @@ (define %gcc-static
(srfi srfi-1) (srfi srfi-1)
(srfi srfi-26) (srfi srfi-26)
(ice-9 regex)) (ice-9 regex))
,@(substitute-keyword-arguments (package-arguments gcc-4.9) ,@(substitute-keyword-arguments (package-arguments gcc)
((#:guile _) #f) ((#:guile _) #f)
((#:implicit-inputs? _) #t) ((#:implicit-inputs? _) #t)
((#:configure-flags flags) ((#:configure-flags flags)
@ -453,12 +453,12 @@ (define %gcc-static
("gmp-native" ,gmp) ("gmp-native" ,gmp)
("mpfr-native" ,mpfr) ("mpfr-native" ,mpfr)
("mpc-native" ,mpc) ("mpc-native" ,mpc)
,@(package-native-inputs gcc-4.9)) ,@(package-native-inputs gcc))
(package-native-inputs gcc-4.9)))))) (package-native-inputs gcc))))))
(define %gcc-stripped (define %gcc-stripped
;; The subset of GCC files needed for bootstrap. ;; The subset of GCC files needed for bootstrap.
(package (inherit gcc-4.9) (package (inherit gcc)
(name "gcc-stripped") (name "gcc-stripped")
(build-system trivial-build-system) (build-system trivial-build-system)
(source #f) (source #f)