From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +GZfLUa6O2HFvQAAgWs5BA (envelope-from ) for ; Fri, 10 Sep 2021 22:04:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GGyeKEa6O2GubgAAbx9fmQ (envelope-from ) for ; Fri, 10 Sep 2021 20:04:22 +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 38FA713A12 for ; Fri, 10 Sep 2021 22:04:22 +0200 (CEST) Received: from localhost ([::1]:57702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOml3-00024Z-98 for larch@yhetil.org; Fri, 10 Sep 2021 16:04:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOmgf-0005Fu-Mk for guix-devel@gnu.org; Fri, 10 Sep 2021 15:59:49 -0400 Received: from out0.migadu.com ([94.23.1.103]:11587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOmgd-0000pA-BO; Fri, 10 Sep 2021 15:59:49 -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=1631303982; 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; bh=uRpwCso/F2zVKVs6gCnZNRrAzFJ0rEsXuCeA9w4lnzo=; b=Y9qrmc7uXvbF7DL3GtqpeuPDFF6DgJ25PkL7pkA8gB7e63IxNn9Y5eb5GkDEwHCuhesmjT mYjjz+M2ClXMl7G+J3lcYCr7xQrxRgW+RASgt1kIYh5tJ1H2OryzONEnyam1sjiBXwnze4 6ESNnnQ12FvdhWaQoLHmhj5VTwUklBU= From: Sarah Morgensen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: gcc: build all languages at once? In-Reply-To: <87r1dyzsf7.fsf@gnu.org> (message from Ludovic =?utf-8?Q?Cour?= =?utf-8?Q?t=C3=A8s?= on Wed, 08 Sep 2021 23:08:44 +0200) Date: Fri, 10 Sep 2021 12:59:39 -0700 Message-ID: <86pmtgkxqs.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=94.23.1.103; envelope-from=iskarian@mgsn.dev; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631304262; 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: in-reply-to:in-reply-to:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=uRpwCso/F2zVKVs6gCnZNRrAzFJ0rEsXuCeA9w4lnzo=; b=Tuzsdw8C25CmZvFlBdwqpUXloJMIa3wjtmm7dsZPNXEqniszzYwelQcAbvryI2uFXcLaEi YnX3fjOylLEkfmap0vWnlUgOvmXdGqtaQI1TH1JEIlGSO9OyUiqRRaRkMt4yo9DuWk/BCF 4iQDuMW5AEpNHKPaut5Pv9v3AfM1YZK3M2hE8NFL7tv9G+jm+kyBSLCUcV4BQ+2RNvMuWk Pnp13MJRRiGVCCF+EGtUsskZb85lDX4fDNs3FWvXyLNmMtUmXNRoJJfljLUbhyjzN0/Q+B QHyN8Fm8W1Et+870Sk0ZbgAGtoB3STB+xoMp5/c8+30FJRiZ/OHCdvpyKmCcNg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631304262; a=rsa-sha256; cv=none; b=UONX97IgPdX7vufh/otsLYu+K8n1eOsGAoTasdN99Gm8WP2OuMxLeLWb6CbT4jYaQtn9IS hDxJ2JNpqBod5e1QdayVm65siXKeLod6Hla5LvOl+2fG35JsJ4QKCzzeqNxYm0JzPrI83E 7vLI3R6a7JrBlwESHn2qSKW5paeAC0y3dE1Bc5BmmnFndE/kxVAhdkRtBQaL2IXy21v3Qf pDPTXmo/KIe8H0qLm4kuKujlrI4XvWhkLHIGS0p0dXqsSncBHjU75ruaWO39dE0zRxaB0r pt/WZ7yG0fzolIGAta4qaSCohvC0FMSwO1bECOV0BCmkJcyP6vHfpAlN7n2PeA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=mgsn.dev header.s=key1 header.b=Y9qrmc7u; dmarc=pass (policy=none) header.from=mgsn.dev; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -2.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=mgsn.dev header.s=key1 header.b=Y9qrmc7u; dmarc=pass (policy=none) header.from=mgsn.dev; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 38FA713A12 X-Spam-Score: -2.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: fSKjxRqif6Z1 Hi Ludo, Ludovic Court=C3=A8s writes: > Hi Sarah, > > Sarah Morgensen skribis: > >> I notice that out of GCC's supported languages (ada, c, c++, d, fortran, >> go, jit, lto, objc, obj-c++) we currently build all except ada, and five >> of them (d, fortran, go, objc, and obj-c++) are built separately. Most >> of GCC's build time is spent bootstrapping and building the actual >> compiler, rather than building the frontends, so we would save a lot of >> build time by building them all together. > > Yes, but at the expense of the build time of the main GCC package and of > its size. Its size shouldn't change, as the other languages should be entirely in separate packages or outputs. The build time... yeah, that could be harsh, especially on slower arches. >> We could also possibly reuse the 'core' parts of GCC between language >> frontends, saving some space. (This is what distros seem to do.) > > That=E2=80=99d be ideal, but I=E2=80=99m not sure it=E2=80=99s feasible. = It=E2=80=99s feasible for FHS > distros that =E2=80=9Cjust=E2=80=9D need to shuffle files around in vario= us binary > packages, but here we=E2=80=99d have to have several outputs or something= , and > most likely they=E2=80=99d refer to one another. Good point. I hadn't considered this. >> What do you all think? > > There=E2=80=99s definitely room for improvement in this area, but it=E2= =80=99s not clear > to me what can be done within the constraints that we have, in > particular the closure size of gcc (gcc:lib in particular) and having a > reasonably small set of dependencies for =E2=80=98gcc-final=E2=80=99. I = suppose > experimentation could tell us which approach to follow! I did some research, and it looks like the Debian GCC build scripts do a lot of what I am looking for. They allow building languages and libraries separately [0], and wow is it complicated! It looks the gist is liberal application of --disable-*, especially --disable-bootstrap. Doing something like this (with each language still built separately, but without bootstrapping again or building unnecessary libraries) should be feasible in Guix... with a fair amount of effort. I'm sure I don't have the familiarity with GCC to do anything but trial-and-error, so if anyone else wants to tackle this, have at it :) [0] https://salsa.debian.org/toolchain-team/gcc/-/blob/master/debian/rules2 -- Sarah