GNU bug report logs - #74217
Bootstrapping Zig with no Binary Blobs

Previous Next

Package: guix;

Reported by: Ekaitz Zarraga <ekaitz <at> elenq.tech>

Date: Tue, 5 Nov 2024 21:49:02 UTC

Owned by: Ekaitz Zarraga <ekaitz <at> elenq.tech>

Severity: normal

Done: Hilton Chain <hako <at> ultrarare.space>

Bug is archived. No further changes may be made.

Full log


Message #63 received at 74217 <at> debbugs.gnu.org (full text, mbox):

From: Motiejus Jakštys <motiejus <at> jakstys.lt>
To: Hilton Chain <hako <at> ultrarare.space>
Cc: Ekaitz Zarraga <ekaitz <at> elenq.tech>,
 Noé Lopez <noe <at> xn--no-cja.eu>, dan <i <at> dan.games>,
 Efraim Flashner <efraim <at> flashner.co.il>, 74217 <at> debbugs.gnu.org
Subject: Re: Bootstrapping Zig with no Binary Blobs
Date: Thu, 14 Nov 2024 11:47:23 +0200
On Thu, Nov 14, 2024 at 11:22 AM Hilton Chain <hako <at> ultrarare.space> wrote:
>
> On Thu, 14 Nov 2024 14:05:52 +0800,
> Hilton Chain wrote:
> I also have concern for Zig's relying on /usr/bin/env (Zig uses an ELF file to
> find dynamic linker, env is chosen for it's well-known).  We have patched this
> reference, not sure if it will cause issue for cross-building Zig.

This file is only consulted when `-target=native`. I.e. when it needs
to compile for the host. If target is specified, it will not consult
that file.

Just verified with zig 0.13.0:

$ strace -f -e openat zig cc hello.c -o hello |& grep -w env
openat(AT_FDCWD,
"/nix/store/sf6y4arqcm100rnnl3dhpg732i774zp6-coreutils-9.5/bin/env",
O_RDONLY|O_NOCTTY|O_CLOEXEC) = 5
$ strace -f -e openat zig cc -target x86_64-linux-gnu.2.32 hello.c -o
hello |& grep -w env
$

Motiejus




This bug report was last modified 193 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.