utils: Add ar-for-target and ld-for-target procedures.
* guix/utils.scm (ar-for-target, ld-for-target): New procedures.master
parent
93e9712952
commit
cd85f8bb95
|
@ -99,8 +99,10 @@
|
||||||
target-powerpc?
|
target-powerpc?
|
||||||
target-riscv64?
|
target-riscv64?
|
||||||
target-64bit?
|
target-64bit?
|
||||||
|
ar-for-target
|
||||||
cc-for-target
|
cc-for-target
|
||||||
cxx-for-target
|
cxx-for-target
|
||||||
|
ld-for-target
|
||||||
pkg-config-for-target
|
pkg-config-for-target
|
||||||
|
|
||||||
version-compare
|
version-compare
|
||||||
|
@ -715,6 +717,11 @@ architecture (x86_64)?"
|
||||||
(any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64"
|
(any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64"
|
||||||
"powerpc64" "riscv64")))
|
"powerpc64" "riscv64")))
|
||||||
|
|
||||||
|
(define* (ar-for-target #:optional (target (%current-target-system)))
|
||||||
|
(if target
|
||||||
|
(string-append target "-ar")
|
||||||
|
"ar"))
|
||||||
|
|
||||||
(define* (cc-for-target #:optional (target (%current-target-system)))
|
(define* (cc-for-target #:optional (target (%current-target-system)))
|
||||||
(if target
|
(if target
|
||||||
(string-append target "-gcc")
|
(string-append target "-gcc")
|
||||||
|
@ -725,6 +732,11 @@ architecture (x86_64)?"
|
||||||
(string-append target "-g++")
|
(string-append target "-g++")
|
||||||
"g++"))
|
"g++"))
|
||||||
|
|
||||||
|
(define* (ld-for-target #:optional (target (%current-target-system)))
|
||||||
|
(if target
|
||||||
|
(string-append target "-ld")
|
||||||
|
"ld"))
|
||||||
|
|
||||||
(define* (pkg-config-for-target #:optional (target (%current-target-system)))
|
(define* (pkg-config-for-target #:optional (target (%current-target-system)))
|
||||||
(if target
|
(if target
|
||||||
(string-append target "-pkg-config")
|
(string-append target "-pkg-config")
|
||||||
|
|
Reference in New Issue