From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uDyBOU8ZTWEdYwAAgWs5BA (envelope-from ) for ; Fri, 24 Sep 2021 02:18:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8M0lNU8ZTWHdHgAA1q6Kng (envelope-from ) for ; Fri, 24 Sep 2021 00:18:23 +0000 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 803471EFFF for ; Fri, 24 Sep 2021 02:18:23 +0200 (CEST) Received: from localhost ([::1]:59368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTYv0-0005SS-ML for larch@yhetil.org; Thu, 23 Sep 2021 20:18:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTYuh-0005Qo-I4 for guix-patches@gnu.org; Thu, 23 Sep 2021 20:18:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTYug-0006w8-Da for guix-patches@gnu.org; Thu, 23 Sep 2021 20:18:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTYug-0007P2-9N for guix-patches@gnu.org; Thu, 23 Sep 2021 20:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50449] [bug#47006] [WIP PATCH v2 2/2] gnu: Add zig. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Sep 2021 00:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50449 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: 50449@debbugs.gnu.org Received: via spool by 50449-submit@debbugs.gnu.org id=B50449.163244265928424 (code B ref 50449); Fri, 24 Sep 2021 00:18:02 +0000 Received: (at 50449) by debbugs.gnu.org; 24 Sep 2021 00:17:39 +0000 Received: from localhost ([127.0.0.1]:56269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTYuG-0007OK-8x for submit@debbugs.gnu.org; Thu, 23 Sep 2021 20:17:39 -0400 Received: from out1.migadu.com ([91.121.223.63]:21150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTYuD-0007O9-Jt for 50449@debbugs.gnu.org; Thu, 23 Sep 2021 20:17:35 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1632442652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X0R3eVGS0BB2iv0KyovzHZxgFQvTanPIX5prgjEMlC8=; b=WVi4CddpebeuxcIf18Nbu6v3yfGV37vQU+3CGXWcgSV0+KkzVBrmnNC4JUldEzSUKxP3xJ 2N/t0C8GUuvPY+X/w/mDuwUyucNnIUY9rgr1TM6DTfhXmeTuvmu2g0XXHfQkF/lds+UyVK SFTf+WqHmG6PU7mnsTHyW+pMoTOrdnE= From: Sarah Morgensen References: <0f6c5b692df8d06a0d7adddc9e5abf93894a366f.1631226695.git.liliana.prikler@gmail.com> <86wnnmnceg.fsf@mgsn.dev> <865yv6mmk2.fsf@mgsn.dev> <93454096d15aed82b9bf4b1401a0fddcb156f2b7.camel@gmail.com> <86czpdl8ns.fsf@mgsn.dev> <7b114e500e29364f44b0080e0f782255e92be74f.camel@gmail.com> Date: Thu, 23 Sep 2021 17:17:28 -0700 In-Reply-To: <7b114e500e29364f44b0080e0f782255e92be74f.camel@gmail.com> (Liliana Marie Prikler's message of "Tue, 14 Sep 2021 18:17:14 +0200 (1 week, 2 days, 7 hours ago)") Message-ID: <867df6kesn.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632442703; 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: content-transfer-encoding:content-transfer-encoding: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=X0R3eVGS0BB2iv0KyovzHZxgFQvTanPIX5prgjEMlC8=; b=ZZ7+Y3Hwoz/K+CauoI5FiHCbV6iz0qSRf1Pvbjs5LUByd081cQ7xNViZF1lOuyO3y5Ac1+ AVVJp0R54kI5woi4NSGKIXO39w95NqzIjFeVdcjJ1rOzxd8YwtsNdHr307LlKiEWQ0ze6n TrR6KxTDY4XhiVy0vI27XqNqGqLWpZdRLjLkOFBx2QWa408wmAcfpS9C1/Ury/irjLSdJJ G4NrX0mKuQWb7Zc/l3g82ILTuEItqH2ocKGCtqXyj7DEH+p0AVeEBLLV3YzAlFpy688hz2 h9H9z+OvLaizloccpvl+GWQjMXEiK8I0SF6yK+TOzSvL48MfXVMlNNAtwiPsKg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632442703; a=rsa-sha256; cv=none; b=TrAF94FQdgrQY/E7TUCeRUsj9NY6Pcu9lcYV9gQR4dTLJrqqzhZEAFkFhs80P5RPfynXo1 YWkxuQcLUx/9XJMMs9X9waSc7QdeuG5uNaemGj3uZu2w6m0uTYqMPJ5flO0J7056yCQyk4 jsLMmguVcgavAF5GH55Gnx2tD+zGnUXRiAdKScAAG627JruL9WuB5D3++QhRc8XPvq8SfI L4dbLPk+/y6XINaUimlaDqJ0WvnvCNYJzzDs6GqzImjYXmYVo5EE2evS5R+cX1wh+8D3Gq KEkhfMTXWbapy7oysNIMSM6JM6hmIF6nMEifcqhXtQzGX3CVcITuHW3tc3t3vQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=WVi4Cddp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.29 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=WVi4Cddp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 803471EFFF X-Spam-Score: -1.29 X-Migadu-Scanner: scn0.migadu.com X-TUID: jXClmHXRVkaK Hi Liliana, I just thought I'd send a note that lld (and the LLVM toolchain) is now 12.0.1 in master (see a7283c1d14). Liliana Marie Prikler writes: > Hi, > > Am Sonntag, den 12.09.2021, 15:40 -0700 schrieb Sarah Morgensen: >> > > + (patches >> > > + (search-patches >> > > + "zig-disable-libc-note-test.patch" >> > Is this test really necessary to skip that test? If not, let's try >> > to use the command line for that. >>=20 >> We could use "-Dskip-compile-errors", but that also skips ~600 other >> test cases. > Point taken, let's keep it then. > >> > > + ;; XXX: Remove the following patch when updating LLVM >> > > to 12.0.1. >> > > + "zig-disable-MIPS-tests.patch" >> > There's a patch for LLVM 12.0.1 waiting in the ML and we could >> > potentially bump lld to 12.0.1 regardless. (Can LLVM components be >> > mix-matched like that?) >>=20 >> I have no idea if they *can*, but I'm pretty sure they're not >> intended to be, as LLVM wants you to build everything together in one >> big blob. > Fair enough, I've tried to rebase this based on Andr=C3=A1s patch > regardless. In some sense this counts as a review of #50486, but I > obviously haven't tested all the problematic packages that would keep > it from being merged, like mesa. > >> > > + "zig-fix-cross-native-execution.patch" >> > IIUC this is weaker than "-Dskip-non-native". Is there a reason to >> > include specifically these non-native tests? >>=20 >> Yes, as I wrote in the patch header, it fixes the behavior of 'zig >> run' and 'zig test' when the target is cross-native. Would we want >> to stick to upstream, even if it's buggy? > I'm not particularly sure about 'zig run', but imo we should simply > supply the correct linker in cross-native and not worry about upstream > bugs in the negative case. > >> We might want to add "-Dskip-non-native" anyway as it speeds up tests >> by an order of magnitude, in which case tests will succeed without >> the patch. It looks their CI uses it "-Dskip-non-native" as well, >> and I suppose there's not a whole lot Guix can do to mess up Zig's >> cross-compiling anyway, since it's pretty self-contained... > Did that. > >> > > + (native-search-paths >> > > + (list >> > > + (search-path-specification >> > > + (variable "ZIG_INCLUDE_DIRS") >> > > + ;; XXX: It doesn't seem as though Zig can distinguish >> > > between >> > > C and C++ >> > > + ;; include paths, so provide both. >> > > + (files '("include/c++" "include"))) >> > > + (search-path-specification >> > > + ;; TODO: Might be confused with "ZIG_LIB_DIR"... Maybe >> > > use >> > > + ;; "ZIG_INCLUDE_PATH" and "ZIG_LIBRARY_PATH"? >> > > + (variable "ZIG_LIB_DIRS") >> > > + (files '("lib" "lib64"))))) >> > You can rewrite "zig-use-explicit-paths.patch" in-place with Emacs' >> > query-replace and/or sed (or even just manually, there are no lines >> > to add or remove) if you disagree with my environment variable >> > naming choice. Just make sure you don't accidentally break diff by >> > deleting trailing space. >> > Another potential naming choice would be to prefix everything with >> > ZIG_LIBC_ rather than simply ZIG_. Of course I thought about that >> > only after sending my previous mail ^^" >>=20 >> Ah, I meant to mention it in my last e-mail but I forgot. I didn't >> want to just go changing it on you without discussing it. >>=20 >> As far as I can tell, there's no such thing as a "Zig library" or a >> "Zig header"; these are for including system C headers and >> libraries. So, I would just go with LIBRARY_PATH and >> CPLUS_INCLUDE_PATH unless we anticipate needing to tell Zig something >> different than what we tell GCC/Clang. Furthermore, the in- >> development 'zig cc' command is intended to be a drop-in replacement >> for GCC/Clang, so it should probably honor the same environment >> variables. > Fair enough, I now have zig search the paths that would normally be > expected to be accordingly set. This leads to doubly adding > "/include", but I suppose that's fine as we risk not including the > right things in a C only context otherwise. > > Regards > > [2. text/x-patch; v4-0001-gnu-lld-Update-to-12.0.1.patch]... > > [3. text/x-patch; v4-0002-gnu-Add-zig.patch]... -- Sarah