GNU bug report logs - #70985
[PATCH 0/4] Use specific errors for unsupported targets

Previous Next

Package: guix-patches;

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


View this message in rfc822 format

From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 70985 <at> debbugs.gnu.org
Subject: [bug#70985] [PATCH 3/4] gnu: cross-libc*: Raise conditions rather than returning #f.
Date: Thu, 16 May 2024 17:16:42 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Christopher Baines <mail <at> cbaines.net> writes:
>
>> 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
>
> [...]
>
>> -   (else #f)))
>> +   (else
>> +    (raise (condition
>> +            (&package-unsupported-target-error
>> +             (package libc)
>> +             (target target)))))))
>
> What I'm unsure is whether this works with libc-less triplets such as
> ‘avr’ or ‘or1k-elf’.

Hmm, it seems like this is erroring in some cases where it didn't
before, I'm not sure why though.

I ended up here through rust-sysroot-for-... since it calls
cross-libc. Handling cross-libc returning #f in the packages which use
it seems error prone, hence adding the exception inside of cross-libc*.

It looks liek cross-gcc-toolchain/implementation is expecting cross-libc
to return #f in some cases though, so maybe I need to add a guard there
somehow to handle the exception and ignore it, as happens when it
returns #f.
[signature.asc (application/pgp-signature, inline)]

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.