gnu: make-u-boot-package: Don't unnecessarily cross-compile.
* gnu/packages/bootloaders.scm (make-u-boot-package)[native-inputs]: Only use cross-gcc and cross-binutils if compiling for a different architecture. [arguments]: Only use cross compiling make-flags if cross compiling.
This commit is contained in:
parent
18c6a7b4c8
commit
3bfee8ff02
|
@ -333,18 +333,26 @@ also initializes the boards (RAM etc).")
|
|||
|
||||
(define (make-u-boot-package board triplet)
|
||||
"Returns a u-boot package for BOARD cross-compiled for TRIPLET."
|
||||
(let ((same-arch? (if (string-prefix? (%current-system) triplet)
|
||||
`#t
|
||||
`#f)))
|
||||
(package
|
||||
(inherit u-boot)
|
||||
(name (string-append "u-boot-" (string-downcase board)))
|
||||
(native-inputs
|
||||
`(,@(if (not same-arch?)
|
||||
`(("cross-gcc" ,(cross-gcc triplet))
|
||||
("cross-binutils" ,(cross-binutils triplet))
|
||||
("cross-binutils" ,(cross-binutils triplet)))
|
||||
'())
|
||||
,@(package-native-inputs u-boot)))
|
||||
(arguments
|
||||
`(#:modules ((ice-9 ftw) (guix build utils) (guix build gnu-build-system))
|
||||
#:test-target "test"
|
||||
#:make-flags
|
||||
(list "HOSTCC=gcc" (string-append "CROSS_COMPILE=" ,triplet "-"))
|
||||
(list "HOSTCC=gcc"
|
||||
,@(if (not same-arch?)
|
||||
`((string-append "CROSS_COMPILE=" ,triplet "-"))
|
||||
'()))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'configure
|
||||
|
@ -374,7 +382,7 @@ also initializes the boards (RAM etc).")
|
|||
(let ((target-file (string-append libexec "/" file)))
|
||||
(mkdir-p (dirname target-file))
|
||||
(copy-file file target-file)))
|
||||
uboot-files)))))))))
|
||||
uboot-files))))))))))
|
||||
|
||||
(define-public u-boot-vexpress
|
||||
(make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf"))
|
||||
|
|
Loading…
Reference in New Issue