summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2025-07-09 09:44:10 +0300
committerEfraim Flashner <efraim@flashner.co.il>2025-07-17 20:29:48 +0300
commit945c6ff9f222efed460ce8ab31fb6911f89436c9 (patch)
treeb9e25f834e80adccb43ad7d1cd8b9346e5d9a9ed
parent758e79730cb13de49b95d0ec3eb1c83766166c94 (diff)
guix: lint: Find more hardcoded compiler targets.
* guix/lint.scm (check-compiler-for-target): Adjust the logic when checking the make-flags to actually determine if it is a gexp or not. * tests/lint.scm (compiler-for-target: looks through G-expressions): Fix test. Change-Id: I0040cf29c8197d394e63ac90b2fba7ca5bcb5861
-rw-r--r--guix/lint.scm4
-rw-r--r--tests/lint.scm6
2 files changed, 5 insertions, 5 deletions
diff --git a/guix/lint.scm b/guix/lint.scm
index deea25c5ce..aae10fe492 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -355,9 +355,9 @@ superfluous when building natively and incorrect when cross-compiling."
(_ '())))
(parameterize ((%current-target-system "aarch64-linux-gnu"))
(apply (lambda* (#:key (target 'not-set)
- make-flags #:allow-other-keys)
+ make-flags #:allow-other-keys)
(define make-flags/sexp
- (if (gexp? make-flags/sexp)
+ (if (gexp? make-flags)
(gexp->approximate-sexp make-flags)
make-flags))
;; Some packages like 'tzdata' are never cross-compiled;
diff --git a/tests/lint.scm b/tests/lint.scm
index 71476f5ae2..3e37438b39 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2017 Alex Kost <alezost@gmail.com>
-;;; Copyright © 2017, 2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2022, 2025 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -390,12 +390,12 @@
(check-compiler-for-target
(dummy-package "x" (arguments '(#:make-flags '("CC=gcc")))))))
-
(test-equal "compiler-for-target: looks through G-expressions"
"'CC' should be set to '(cc-for-target)' instead of 'gcc'"
(single-lint-warning-message
(check-compiler-for-target
- (dummy-package "x" (arguments '(#:make-flags #~'("CC=gcc")))))))
+ (dummy-package "x" (arguments
+ (list #:make-flags #~(list "CC=gcc")))))))
(test-equal "compiler-for-target: (cc-for-target) is acceptable"
'()