Subject: [bug#49672] [PATCH 0/9] Target check fixes and cleanups

From: Thiago Jung Bauermann <[email-masked]>
Date: Thu, 11 Nov 2021 21:56:14 -0300

Hello Maxime,

Em domingo, 7 de novembro de 2021, às 08:23:37 -03, Maxime Devos escreveu:
> I looked over the patch series, and almost all seems reasonable to me.

Thank you for reviewing the patches! I will work on a second version 
addressing your comments.

> though I would split patch 7/9 into a patch defining
> current-target-gnu-triplet and into a patch using current-target-gnu-
> triplet,

Ok, I will do this.

> and possibly a rebase might be neccesary.

I will do this as well.

> Warning: I only looked at the patches, I didn't apply them for testing.

I don’t recall how thoroughly I tested these patches. I’ll try to do more 
extensive testing on v2.

> I don't think the following change is necessary though:
> 
> -           ,@(if (string-match "^x86_64-linux"
> -                               (or (%current-target-system)
> -                                   (%current-system)))
> +           ,@(if (string-match "^x86_64-linux" (current-target-nix-
> system))
> 
> because the regex ^x86_64-linux would match both the nix system and GNU
> triplet
> IIUC.

Maybe in the way Guix uses GNU triplets the regex would match (I don’t 
actually know) but in theory at least it wouldn’t, because “x86_64-linux” 
isn’t a complete GNU triplet: it’s missing the vendor field. A complete 
triplet would be “x86_64-unknown-linux-gnu”, or “x86_64-pc-linux-gnu”.

There’s a bit more information here: https://wiki.osdev.org/Target_Triplet

This is actually one of the main reasons why I decided to clean up the 
handling of Nix system identifiers and GNU triplet identifiers.

-- 
Thanks,
Thiago