GNU bug report logs -
#70985
[PATCH 0/4] Use specific errors for unsupported targets
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Thu, 16 May 2024 15:01:02 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
Message #50 received at 70985 <at> debbugs.gnu.org (full text, mbox):
This is handled by (guix ui).
* guix/build-system/meson.scm (make-machine-alist): Use a more specific
exception.
Change-Id: I842ba63739fdefe04460e938c7bc8aa54ea57b96
---
guix/build-system/meson.scm | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index bf9ca15ecc..04d2241c79 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -30,6 +30,8 @@ (define-module (guix build-system meson)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix packages)
+ #:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-35)
#:export (%meson-build-system-modules
meson-build-system
make-cross-file))
@@ -50,7 +52,12 @@ (define (make-machine-alist triplet)
((target-linux? triplet) "linux")
((target-mingw? triplet) "windows")
((target-avr? triplet) "none")
- (#t (error "meson: unknown operating system"))))
+ (else
+ (raise
+ (condition
+ (&unsupported-cross-compilation-target-error
+ (build-system meson-build-system)
+ (target triplet)))))))
(cpu_family . ,(cond ((target-x86-32? triplet) "x86")
((target-x86-64? triplet) "x86_64")
((target-arm32? triplet) "arm")
@@ -62,7 +69,12 @@ (define (make-machine-alist triplet)
"ppc64"
"ppc"))
((target-riscv64? triplet) "riscv64")
- (#t (error "meson: unknown architecture"))))
+ (else
+ (raise
+ (condition
+ (&unsupported-cross-compilation-target-error
+ (build-system meson-build-system)
+ (target triplet)))))))
(cpu . ,(cond ((target-x86-32? triplet) ; i386, ..., i686
(substring triplet 0 4))
((target-x86-64? triplet) "x86_64")
--
2.45.2
This bug report was last modified 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.