From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id oC1CCTUhRmbeJQAAqHPOHw:P1 (envelope-from ) for ; Thu, 16 May 2024 17:07:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id oC1CCTUhRmbeJQAAqHPOHw (envelope-from ) for ; Thu, 16 May 2024 17:07:33 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715872053; a=rsa-sha256; cv=none; b=EIJRRke5AF6K/9oZ4+QU1V8g0kX0Llq1ppvUc4xU8O1eJ0FsBKgTbJXDIuNRhFtJnAQI63 1OVyHqMzigmtu5HIEDPkXglYJjMLfj2Ck5R146ZgsyFHzTvGqU4FdZYAvSUg4xqInw4UxE rjJQ6uOS4gmA60NXDCpmetstXQe22ZgUIaPikFkfDe6VsXmwkTVcKFg+buE7LFm7PhwCcR 66a6A610zd3KSPXXEcE4no8imYtQ+6st9NM0WR+D3k18Gv3ebO1FfSwF+NzhBVu4sEhhQq YFJ+HdSmyVIvfZtFFJUYWEfEcZcVGp+selspDyuv5SxDvAACqEzLRBeUjDWcMg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715872053; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=hq7N7t5DnTi0FxFa8G3c8VW/s/TtfOfYyKsXE4hYBB8=; b=hOU8xSJ5AWdhv7+lZFOqYLhPDwm+xPdY3WPSQLpACnmsX2uZcdZxcErjNGX7SpaKdmIl/c V4ncB5br0bkyd8GLQG/nHm07GXzFj20QX/XhxrrtzYY4Xspy9d9FwyqBZjX9JtaIMLwFh+ ngG0jjVHcerQqiqCmT/jP0VXIzj2uYFBEiVWilgrFTRUw3HZXfpmmEvq3/K1N12Fkdw1+i veklvT0GnXrK49OqShYJBV1bhTDOUCTpRQn7oPdKQ4xzdcUS9N5DyWstOY+caRniC09/rC yZg2cALG3MCl+yWntjCxccDMH7DW8JgNQcTzINgfQ5+75Q8X2D0BHvHDj1ahjA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0994D14775 for ; Thu, 16 May 2024 17:07:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7chK-0002Bp-4C; Thu, 16 May 2024 11:07:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7chC-0002Ag-52 for guix-patches@gnu.org; Thu, 16 May 2024 11:07:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7chA-0000Dq-DT; Thu, 16 May 2024 11:07:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7chC-0007m0-DJ; Thu, 16 May 2024 11:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70985] [PATCH 3/4] gnu: cross-libc*: Raise conditions rather than returning #f. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, guix-patches@gnu.org Resent-Date: Thu, 16 May 2024 15:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70985 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70985@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 70985-submit@debbugs.gnu.org id=B70985.171587198029807 (code B ref 70985); Thu, 16 May 2024 15:07:02 +0000 Received: (at 70985) by debbugs.gnu.org; 16 May 2024 15:06:20 +0000 Received: from localhost ([127.0.0.1]:49214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7cgW-0007kh-FA for submit@debbugs.gnu.org; Thu, 16 May 2024 11:06:20 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7cgT-0007kb-3O for 70985@debbugs.gnu.org; Thu, 16 May 2024 11:06:18 -0400 Received: from localhost (unknown [45.67.83.153]) by mira.cbaines.net (Postfix) with ESMTPSA id 5954A27BBEA for <70985@debbugs.gnu.org>; Thu, 16 May 2024 16:06:11 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 9605db93 for <70985@debbugs.gnu.org>; Thu, 16 May 2024 15:06:08 +0000 (UTC) From: Christopher Baines Date: Thu, 16 May 2024 16:06:05 +0100 Message-ID: <05efcc4bcf0dc4b270930747d215a97b2bd86761.1715871966.git.mail@cbaines.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: <3828bc238a8cc400f9686fe6856c665c31e927dd.1715871966.git.mail@cbaines.net> References: <3828bc238a8cc400f9686fe6856c665c31e927dd.1715871966.git.mail@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 0994D14775 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -4.87 X-Spam-Score: -4.87 X-TUID: v5EICQGC4wEA As this means that the error will be clearer for targets which are unsupported. * gnu/packages/cross-base.scm (cross-libc*): Raise conditions rather than returning #f. Change-Id: I820780ad738d85a98950de5608f3019e961ff7c8 --- gnu/packages/cross-base.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 2cc5f52e47..0488e397ef 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -46,6 +46,8 @@ (define-module (gnu packages cross-base) #:use-module (guix gexp) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:export (cross-binutils @@ -671,8 +673,8 @@ (define* (cross-libc* target (xbinutils (cross-binutils target)) (xheaders (cross-kernel-headers target))) "Return LIBC cross-built for TARGET, a GNU triplet. Use XGCC and XBINUTILS -and the cross tool chain. If TARGET doesn't have a standard C library #f is -returned." +and the cross tool chain. If TARGET doesn't have a standard C library an +exception is raised." (match target ((? target-mingw?) (let ((machine (substring target 0 (string-index target #\-)))) @@ -745,7 +747,11 @@ (define* (cross-libc* target ((? target-avr?) (make-avr-libc #:xbinutils xbinutils #:xgcc xgcc)) - (else #f))) + (else + (raise (condition + (&package-unsupported-target-error + (package libc) + (target target))))))) (define* (cross-gcc-toolchain/implementation target #:key -- 2.41.0