diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-03-08 08:46:56 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-03-18 01:26:26 -0400 |
commit | cd85f8bb95d5e949938d19a43c39519bca386585 (patch) | |
tree | 605f78493529ac965a6b835517a08f16e1d7ed4f | |
parent | 93e971295217289155b94b5de416f8019e1ff379 (diff) |
utils: Add ar-for-target and ld-for-target procedures.
* guix/utils.scm (ar-for-target, ld-for-target): New procedures.
-rw-r--r-- | guix/utils.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index a0ca9b9070..44c46cb4a9 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -99,8 +99,10 @@ target-powerpc? target-riscv64? target-64bit? + ar-for-target cc-for-target cxx-for-target + ld-for-target pkg-config-for-target version-compare @@ -715,6 +717,11 @@ architecture (x86_64)?" (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "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))) (if target (string-append target "-gcc") @@ -725,6 +732,11 @@ architecture (x86_64)?" (string-append target "-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))) (if target (string-append target "-pkg-config") |