From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id iLqHEjXGNWfF7AAA62LTzQ:P1 (envelope-from ) for ; Thu, 14 Nov 2024 09:43:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id iLqHEjXGNWfF7AAA62LTzQ (envelope-from ) for ; Thu, 14 Nov 2024 10:43:17 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=u5aUsgyO; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=fIiMVau0; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731577397; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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: dkim-signature; bh=20WqDyBFBuTchfVeArW6JdVvYOO4l7fwiG8lGzj3DRk=; b=Vrba3KmkA0nZ5NLdzPcrchjfTYdq7RBXvgBMfrqlmwklX42q+ZpJcyiA4zY+VDsyjOsQ+x RB0KuXTYvRyelloVQDiMKYudyTWrwxrTPoV9PXphOxYqjaPyaxJVex73fwiEYTBL+gPAqE YwD1bVD4gLNVL5WfD1EKwWalq4hV9+zfcpjQ/GWXN+/1hfrIn38sgnrdO47QekZ8lZjlmg FAjUfZs3Db/44sU5zkAjp/q30Z9+W5NV87MdR91eNcirH/N1is2K8PohrvewgwlzCeyL+h Q4OK3NFAumFrXakdFIAWXVnOX4GL5UuEvIVIyTKqeARoi0C/QRPEmnilLYt0Zw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731577397; a=rsa-sha256; cv=none; b=XfilnO6L+6OpX26xl6M/kjmicJoStk/DajyMXcm3H+YAjluiR7wv/Wc7WfFWtcu7BrxruV kUZUKDuvph5CuruOFESf05/uQw1LaLvvrpbkWXnKYPjWZwTOibeng0y93ZQdMGALD/lna6 djHnsyHFb/m5iT2SAX2UKAGUK4Exbe/GpFI04fwYCVPYoTmrkATs3Vqq//YXX+y+NhdPWc 9Jbl6xBufWb34MP+mtWzx8WRMB7y29adFULPJC/uT5FT1L+jPmDj8vxP1pkZ+qg0hOukUg f2KyETLRKGSdFw0fn511bsZ6M3Y6erzk+1aFntB+8d+lU33t+YqE/Up5AOCTNQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=u5aUsgyO; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=fIiMVau0; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none 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 87379564C for ; Thu, 14 Nov 2024 10:43:16 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBWNV-0001Ih-Va; Thu, 14 Nov 2024 04:43:05 -0500 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 1tBWNU-0001IH-1j for bug-guix@gnu.org; Thu, 14 Nov 2024 04:43:04 -0500 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 1tBWNT-0007OH-Ot for bug-guix@gnu.org; Thu, 14 Nov 2024 04:43:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:MIME-Version:References:From:Date:To:Subject; bh=20WqDyBFBuTchfVeArW6JdVvYOO4l7fwiG8lGzj3DRk=; b=u5aUsgyOEthIrxYA1AtdnjurVRxOW2bE57lw/fqYVIt2IIzjQq97Uhb0isE1+ITqaBOZjV07vgMc1N7ixd02xazmcWB4Q4qIgLZDaTEmOYFCnvA+12ufgAQ91AJkCkHmX1XGc4EDX3uVzzdcTCi3+yqxNVokKVBFg0bgSCuwijLmjdFKteD39AqRuhtz61b7jZ5WVPQv8DqPImAqcxke+VmB4CVEMnKbahdnrg6967PMCCwapRDTh4rVd9wq5OFM6gipt7iWssmpxul+xHwfQBYfBjq5hktUvIPggcoVaZD3Kj08xb+Zm6nmy8StNRa1395+wrzimkL9fWqFs41OFA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBWNS-0004aA-HV; Thu, 14 Nov 2024 04:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#74217: Bootstrapping Zig with no Binary Blobs Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org, Ekaitz Zarraga Resent-Date: Thu, 14 Nov 2024 09:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74217 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Hilton Chain Cc: Motiejus =?UTF-8?Q?Jak=C5=A1tys?= , =?UTF-8?Q?No=C3=A9?= Lopez , dan , Ekaitz Zarraga , 74217@debbugs.gnu.org Received: via spool by 74217-submit@debbugs.gnu.org id=B74217.173157733517538 (code B ref 74217); Thu, 14 Nov 2024 09:43:02 +0000 Received: (at 74217) by debbugs.gnu.org; 14 Nov 2024 09:42:15 +0000 Received: from localhost ([127.0.0.1]:45087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBWMh-0004Yn-AO for submit@debbugs.gnu.org; Thu, 14 Nov 2024 04:42:15 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:52392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBWMf-0004YW-IE for 74217@debbugs.gnu.org; Thu, 14 Nov 2024 04:42:14 -0500 Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-37d495d217bso339409f8f.0 for <74217@debbugs.gnu.org>; Thu, 14 Nov 2024 01:42:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731577268; x=1732182068; darn=debbugs.gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=20WqDyBFBuTchfVeArW6JdVvYOO4l7fwiG8lGzj3DRk=; b=fIiMVau04GHGs8Xqqk/5C+hKVSEvYHofD1xl00E5rY+5xbwlCKF31BRaiMv7q8clex 5sbUKvBTJTLkve89k3eH4XnbyLufnJgrHvEZClK2cYpBZpRM/7qTgRMPDU2obNk9dFIq YMQZBOFbwniwcKj/FFJFfqlNrZHQDhEJ8SC4qjVai3rqgHL5QXeyLEtJ68Py4rGeyycp jFqv6P+pPkYiqXDjiz5UE3oIt1kYl7iK56kkUKPgbzxgAWZrTJJXcx93X84Y7BItZmDJ TIKXi4v4DQJPvoLuDo1TasOz4LhdchmmYjyKY1WK4RStRdPN1lZVstJ3HnnI9GFMUsNS m8XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731577268; x=1732182068; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=20WqDyBFBuTchfVeArW6JdVvYOO4l7fwiG8lGzj3DRk=; b=AejKwTENhShTZQVU+fDefY1YDhqscUl2ZYTnOYbG7h82KqgIG+onIL/JOifcipsuBu 9IJKGqaFhPtShN+8o6OsmWLIFNWav2oKWA8ekCfBbcJx0qakwrCuq7yofxBaHsdnAb/5 Hqz8ifGJRnZMO0uTWgPM8ifPVedohWGfgPWINXStxgSi+83BOw4ewKVe18rpIahLQ2GV 7y4zCSsCi57NbPWD844xOiMp8+gPDS1Q/w6BwvpghnT9SjATSn4DLYe5dga99PUpNFL4 w7VsGzeV16aDzHr0gWCiM6yu3c7T6eqe9VB2nXTsYL/CDyZokuhnFnlAR4pqwiLf0cDc bTZA== X-Gm-Message-State: AOJu0YxcoZztZuY5FD0rA7xMFrwt7Er1xO6TCR3v7NC2u7ZPaQWS6mos 3/NUjFbvk94uZSuuh+5NaXfXnuFOCzKBRwuCiLbgTfFBB2b6GgYz X-Google-Smtp-Source: AGHT+IHklvejg2z7L+jRm56wLucCU3WDDTgoDuka8NeK+DnbvNyRbpBYtdfziVf+Uq0ydFLEfk27Mg== X-Received: by 2002:a5d:5846:0:b0:37d:95a7:9e57 with SMTP id ffacd0b85a97d-382184fee3amr1456133f8f.2.1731577267295; Thu, 14 Nov 2024 01:41:07 -0800 (PST) Received: from localhost ([141.226.162.35]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3821ada3bdasm1022348f8f.3.2024.11.14.01.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 01:41:06 -0800 (PST) Date: Thu, 14 Nov 2024 11:41:04 +0200 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Hilton Chain , 74217@debbugs.gnu.org, Motiejus =?UTF-8?Q?Jak=C5=A1tys?= , =?UTF-8?Q?No=C3=A9?= Lopez , dan , Ekaitz Zarraga References: <87ldxngjy4.wl-hako@ultrarare.space> <878qtmvh2i.wl-hako@ultrarare.space> <877c96vd3u.wl-hako@ultrarare.space> <874j4auz7j.wl-hako@ultrarare.space> <87v7wqtbjq.wl-hako@ultrarare.space> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PHkvmXZGOaAzhGJw" Content-Disposition: inline In-Reply-To: <87v7wqtbjq.wl-hako@ultrarare.space> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.20 X-Spam-Score: -6.20 X-Migadu-Queue-Id: 87379564C X-Migadu-Scanner: mx13.migadu.com X-TUID: IPtIRZ7M3HmG --PHkvmXZGOaAzhGJw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 14, 2024 at 05:22:17PM +0800, Hilton Chain wrote: > On Thu, 14 Nov 2024 14:05:52 +0800, > Hilton Chain wrote: > > > > Currently I'm 1. modifying each-lib-rpath option of 'zig build'. 2. pa= ssing > > libc to linker. I'll write details on this when succeed. >=20 > 1. Modification about each-lib-rpath. > --8<---------------cut here---------------start------------->8--- > -feach-lib-rpath Ensure adding rpath for each used dynamic = library > --8<---------------cut here---------------end--------------->8--- >=20 > This option is on implicitly for native builds. This implicity is what o= ur Zig > currently solely relies on. >=20 > I'm modifying it so that it's also on when CROSS_LIBRARY_PATH or LIBRARY_= PATH is > set. This approach is better than my previous one since it only adds nee= ded > libraries. >=20 >=20 > 2. Pass libc to Zig's linker > This was the behavior in 0.9, but changed due to issue on macOS[1]. (btw= , our > CPLUS_INCLUDE_PATH also has issue with macOS target[2]). RUNPATH for gli= bc was > missing because of this, since it's the linker handling each-lib-rpath. >=20 > Since we do not support macOS anyway, can we restore this behavior? At worst I could see adding a comment that it would likely break future macOS cross-compiles. I don't see an issue with either putting it back unconditionally or trying to make it conditional based on (%current-system) or the contents of (%current-target-system). >=20 > I also have concern for Zig's relying on /usr/bin/env (Zig uses an ELF fi= le 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. We use search-input-file in the replacement, so it should choose the cross-binutils for the replacement /bin/env, so it shouldn't be a problem. >=20 > Thanks > --- > [1]: https://github.com/ziglang/zig/issues/10765 > [2]: https://github.com/ziglang/zig/issues/18063 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --PHkvmXZGOaAzhGJw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmc1xawACgkQQarn3Mo9 g1Hi9w/+MoKStnX0lS8NjHsUjTnNwMLx887hHQQXP/qYgWae/gb3bL4wCnxcfIek BJ0T+dHaLG1T+YMxe91ElDh00aYo72IBaRPjL7fxjV15Frpg0WHW28wAXWYEmBE2 e//KDc04IyODHM36v6bU6V/oDeLL6h+Hc7Cr3j5l4LzEVFB2NHTKNSkfQ2g8sPx+ 2rYp5hXfHcM8jWmpUgjE1bIx0G/GF7EVEN2mTYCTBXpdNO+jWG4Koob94+BSHwqJ WOQcy0dT7bp7Ir6nm+ICu7FAVRPrgu1zlaDUv1QWQBwh7fS1E3jhYYWAUEgBrO8i QuAYHrGvi0783XPDWuNwRltQV7CfwQpP/1w2Nay/3pi782oYEcRWmu7AttWTYNK2 XO6NKpK5c9MxNbI+dP3ppoToHsYOOUPO7Rbl4UDSnPnB+/auElVclObwdaiiymzo CoC98hlKWqjwx5O8hrU57845X9rjZ/rnxfpfO21oJZyBP7RGX8503cvGKnLPn99b 8KUEkmI0TNiqcVLPuaBo3W5CSCBn0HWnUAsYb1td49sIu5phcENLuryOSairyfSU bS5Ms5lJSttyQo1zB2+1VY+4SejWy43bsYD1djHH//ACs3ddgaVmYYV4ljCBpOS9 tZgojHKsQjKWUmQ8XO1lNKIZh3kIj7J2KvvbOEa3lsNFQOehbsA= =C+D0 -----END PGP SIGNATURE----- --PHkvmXZGOaAzhGJw--