unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Jean-Pierre De Jesus Diaz <jean@foundation.xyz>
To: 70985@debbugs.gnu.org
Cc: ludo@gnu.org, mail@cbaines.net
Subject: [bug#70985] [PATCH 3/4] gnu: cross-libc*: Raise conditions rather than returning #f.
Date: Fri, 17 May 2024 09:53:16 +0000	[thread overview]
Message-ID: <CAG1gdUrGa5E7C9hNaJO80cStR+N0uBSmbWTKjsGPzcWar6FXNg@mail.gmail.com> (raw)
In-Reply-To: <878r09ol8z.fsf@cbaines.net>

Hello,

>> Christopher Baines <mail@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.

This is because some targets as Ludovic mentioned don't have a proper
libc, like most *-elf targets.  Also, gnu-build-system also depends on
cross-libc returning #f to check for those targets that don't have a
libc in `cross-standard-packages'.

Thanks,

Jean-Pierre




  parent reply	other threads:[~2024-05-17  9:55 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 14:59 [bug#70985] [PATCH 0/4] Use specific errors for unsupported targets Christopher Baines
2024-05-16 15:06 ` [bug#70985] [PATCH 1/4] guix: packages: Add new &package-unsupported-target-error Christopher Baines
2024-05-16 15:06   ` [bug#70985] [PATCH 2/4] gnu: tls: Raise conditions from target->openssl-target Christopher Baines
2024-05-16 15:06   ` [bug#70985] [PATCH 3/4] gnu: cross-libc*: Raise conditions rather than returning #f Christopher Baines
2024-05-16 15:15     ` Ludovic Courtès
2024-05-16 16:16       ` Christopher Baines
2024-05-16 15:06   ` [bug#70985] [PATCH 4/4] guix: build-system: meson: Don't error on unsupported targets Christopher Baines
2024-05-16 15:13     ` Ludovic Courtès
2024-05-16 16:10       ` Christopher Baines
2024-05-16 15:16 ` [bug#70985] [PATCH 0/4] Use specific errors for " Ludovic Courtès
2024-05-17  9:53 ` Jean-Pierre De Jesus Diaz [this message]
2024-07-05 16:05 ` [bug#70985] [PATCH v2 1/6] guix: packages: Add new &package-unsupported-target-error Christopher Baines
2024-07-05 16:05   ` [bug#70985] [PATCH v2 2/6] gnu: tls: Raise conditions from target->openssl-target Christopher Baines
2024-07-05 16:06   ` [bug#70985] [PATCH v2 3/6] guix: packages: Add &unsupported-cross-compilation-target-error Christopher Baines
2024-07-05 16:06   ` [bug#70985] [PATCH v2 4/6] build-system: meson: Use a more specific exception Christopher Baines
2024-07-05 16:06   ` [bug#70985] [PATCH v2 5/6] gnu: rust: Guard against cross-libc returning #f Christopher Baines
2024-07-07 16:26     ` Efraim Flashner
2024-07-07 16:57     ` Efraim Flashner
2024-07-09  9:25       ` Christopher Baines
2024-07-09 15:21         ` Efraim Flashner
2024-07-12 13:56           ` Christopher Baines
2024-07-05 16:06   ` [bug#70985] [PATCH v2 6/6] build-system: go: Properly handle when a target is unsupported Christopher Baines
2024-07-12 13:41 ` [bug#70985] [PATCH v3 1/6] guix: packages: Add new &package-unsupported-target-error Christopher Baines
2024-07-12 13:41   ` [bug#70985] [PATCH v3 2/6] gnu: tls: Raise conditions from target->openssl-target Christopher Baines
2024-07-12 13:41   ` [bug#70985] [PATCH v3 3/6] guix: packages: Add &unsupported-cross-compilation-target-error Christopher Baines
2024-07-12 13:41   ` [bug#70985] [PATCH v3 4/6] build-system: meson: Use a more specific exception Christopher Baines
2024-07-12 13:41   ` [bug#70985] [PATCH v3 5/6] gnu: rust: Guard against unsupported rust targets Christopher Baines
2024-07-12 14:28     ` Efraim Flashner
2024-07-18 14:16       ` bug#70985: " Christopher Baines
2024-07-12 13:41   ` [bug#70985] [PATCH v3 6/6] build-system: go: Properly handle when a target is unsupported Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAG1gdUrGa5E7C9hNaJO80cStR+N0uBSmbWTKjsGPzcWar6FXNg@mail.gmail.com \
    --to=jean@foundation.xyz \
    --cc=70985@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).