From fb77c61422ae2d03c0bf655d96b0e88f5f8001da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 4 Nov 2016 15:16:11 +0100 Subject: gnu: Remove '%final-inputs' references at the top level. Due to circular dependencies, referring to bindings exported by other modules from the top level is frowned upon. This patch addresses one of the remaining cases. * gnu/packages/base.scm (%final-inputs): New procedure. * gnu/packages/cross-base.scm: Remove (gnu packages commencement) import. (cross-gcc): Use the new '%final-inputs'. * gnu/packages/make-bootstrap.scm: Remove (gnu packages commencement) import. (package-with-relocatable-glibc): Use the new '%final-inputs'. --- gnu/packages/cross-base.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gnu/packages/cross-base.scm') diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 3bd30fd78c..0000a3adcb 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -23,7 +23,6 @@ #:use-module (gnu packages) #:use-module (gnu packages gcc) #:use-module (gnu packages base) - #:use-module (gnu packages commencement) #:use-module (gnu packages linux) #:use-module (guix packages) #:use-module (guix download) @@ -257,11 +256,11 @@ GCC that does not target a libc; otherwise, target that libc." ;; Call it differently so that the builder can check whether the "libc" ;; input is #f. - ("libc-native" ,@(assoc-ref %final-inputs "libc")) + ("libc-native" ,@(assoc-ref (%final-inputs) "libc")) ;; Remaining inputs. ,@(let ((inputs (append (package-inputs %xgcc) - (alist-delete "libc" %final-inputs)))) + (alist-delete "libc" (%final-inputs))))) (if libc `(("libc" ,libc) ("xkernel-headers" ;the target headers -- cgit v1.2.3 From bd2e1a8cb07088bdc54b9bb05d9b2e99f78e5b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 4 Nov 2016 15:29:01 +0100 Subject: gnu: cross-base: Remove exports of cross compilers. They were never really needed and caused troubles in the presence of circular module dependencies as reported by Danny Milosavljevic at . * gnu/packages/cross-base.scm (xgcc-mips64el, xgcc-xtensa, xgcc-armhf): Remove. * gnu/packages/firmware.scm (ath9k-htc-firmware)[native-inputs]: Use 'cross-gcc' instead of XGCC-XTENSA. --- gnu/packages/cross-base.scm | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) (limited to 'gnu/packages/cross-base.scm') diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 0000a3adcb..4b720ba4e9 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -368,36 +368,14 @@ XBINUTILS and the cross tool chain." ,@(package-native-inputs glibc))))) -;;; -;;; Concrete cross toolchains. -;;; - -(define-public xgcc-mips64el - (let* ((triplet "mips64el-linux-gnuabi64") ;N64 ABI - (xgcc (cross-gcc triplet - (cross-binutils triplet) - (cross-libc triplet)))) - ;; Don't attempt to build this cross-compiler on i686; - ;; see . - (package (inherit xgcc) - (supported-systems (fold delete - (package-supported-systems xgcc) - '("mips64el-linux" "i686-linux")))))) - -(define-public xgcc-xtensa - ;; Bare-bones Xtensa cross-compiler, used to build the Atheros firmware. - (cross-gcc "xtensa-elf")) - -(define-public xgcc-armhf - (let* ((triplet "arm-linux-gnueabihf") - (xgcc (cross-gcc triplet - (cross-binutils triplet) - (cross-libc triplet)))) - (package (inherit xgcc) - (supported-systems (delete "armhf-linux" %supported-systems))))) - -;; (define-public xgcc-armel -;; (let ((triplet "armel-linux-gnueabi")) +;;; Concrete cross tool chains are instantiated like this: +;; +;; (define-public xgcc-armhf +;; (let ((triplet "arm-linux-gnueabihf")) ;; (cross-gcc triplet ;; (cross-binutils triplet) ;; (cross-libc triplet)))) +;; +;;; We don't do that here because we'd be referring to bindings from (gnu +;;; packages gcc) from the top level, which doesn't play well with circular +;;; dependencies among modules. -- cgit v1.2.3