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 +L8qIqNjQmef8wAA62LTzQ:P1 (envelope-from ) for ; Sat, 23 Nov 2024 23:22:11 +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 +L8qIqNjQmef8wAA62LTzQ (envelope-from ) for ; Sun, 24 Nov 2024 00:22:11 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-23sep header.b=foi0xL00; dmarc=pass (policy=quarantine) header.from=vodafonemail.de; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732404131; a=rsa-sha256; cv=none; b=M4rJDopNb6cK0LrUV+nnlHAf/lcypZ6Mcp7HD6Sf/wOocd7UtyZ4zoqmcasp3husN1ev6U +Dd1CJEUomasN0om6gYiZwEREU0H238AG2lA5FRibzqA3P1x/qQt37TDVHY+iB56J5MKhx jeNNToDNp7mtxf4h/YnU92BmQd1xPqj9fM0MEIUWudqFmyf2UyngIfGqFck7bBDHT8CCaO +prdz5a/PaUWIzd1/bV9Y1MLyIYezT2unIwpzu3WBH66+MCqDBcr6Ibnq8fw5moSo74EAF wc0ghGnbpcPTpm9aNUweZSVRWJvIIVFZnQ+HHdpkSYMs9PHLpDsBSzCgNK4Kww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-23sep header.b=foi0xL00; dmarc=pass (policy=quarantine) header.from=vodafonemail.de; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732404131; 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:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=0aMBq3n07UNyXXitl29iISpz0a1VOqDfzp1AnPSr6Cg=; b=Me7OMok7F4UImNuISCguYy5TIgrLznLyoHn8od3WWB5YW4ELtyEZqh3L+6WrJQrBHvQvrw NRARXKMZASYjLOaCC3wHRk3EepDgD2hGFqTR0TAEqYA2i+3EMcS6/NXPw/U5xf7iIm1ZKC WZoYEwrXdURLFD2F4P7/S/zX9ZD9Pl5WdESyscU++aTuYsQMWchPQYNBKdcwYACT1ssam1 YLTrxtZ38rCYfnW/59iIhFub5/F1DVKRDCOwWqcUMDSLtuQAEoRMISSZcoWdw1ZPtxEib0 FK1fIcXRVZGKt0Iuso2epjWeX1hcCnxfSQ3ivAcxBPcSRIo8dwNzb5Aw3jJU2w== 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 33DE252C60 for ; Sun, 24 Nov 2024 00:22:11 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEzRW-0004FL-Jx; Sat, 23 Nov 2024 18:21:34 -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 1tEzRU-0004DF-Do for guix-devel@gnu.org; Sat, 23 Nov 2024 18:21:32 -0500 Received: from mr4.vodafonemail.de ([145.253.228.164]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tEzRR-0007sV-Lv; Sat, 23 Nov 2024 18:21:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-23sep; t=1732404079; bh=0aMBq3n07UNyXXitl29iISpz0a1VOqDfzp1AnPSr6Cg=; h=Message-ID:Date:User-Agent:Subject:From:To:References: Content-Language:In-Reply-To:Content-Type:From; b=foi0xL00wAOhHUyipnCazKcjD65ZTyMUWFuQnJb2AQHC8A8YwlhdpJYR6TwZBDRen Of2Z5G4YIvOrzcZdhRJi751z8fKuqmStu7ma/59mJZ7Z0Vk5FZo+BQrlqUQFMVCZkH lT73058x/GhShQg/9qiN6zN4zuNYuuR97X25TkTI= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr4.vodafonemail.de (Postfix) with ESMTPS id 4Xwnz16HD3z1y0w; Sat, 23 Nov 2024 23:21:17 +0000 (UTC) Received: from [10.11.12.13] (aftr-62-216-210-135.dynamic.mnet-online.de [62.216.210.135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4Xwnyb1LHtz9rw0; Sat, 23 Nov 2024 23:20:52 +0000 (UTC) Message-ID: Date: Sun, 24 Nov 2024 00:20:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: A different way to bootstrap and build GCC From: Stefan To: guix-devel@gnu.org Cc: Attila Lendvai , =?UTF-8?Q?Sergio_Pastor_P=C3=A9rez?= , ekaitz@elenq.tech, Efraim Flashner , Timothy Sample , janneke@gnu.org References: <21f4ee5a-cd62-3b55-f0c5-ffd5272d1194@vodafonemail.de> Content-Language: en-US In-Reply-To: <21f4ee5a-cd62-3b55-f0c5-ffd5272d1194@vodafonemail.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-purgate-type: clean X-purgate: clean X-purgate-size: 3145 X-purgate-ID: 155817::1732404073-5B7FD466-07E1D2CC/0/0 Received-SPF: pass client-ip=145.253.228.164; envelope-from=stefan-guix@vodafonemail.de; helo=mr4.vodafonemail.de 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_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 33DE252C60 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -5.55 X-Spam-Score: -5.55 X-TUID: dDRUaTz3aVMj Hi! I got a step further with the different way to build GCC. The problem not using the proper multilib variant for embedded systems is solved now and I updated to GCC 14.2. To cite myself, my gut feeling is that the whole GCC version chain starting in (gnu packages commencement) should be build this way. So I started to play around with the bootstrapping of GCC. Starting with only few packages from (gnu packages commencement) I so far managed to build a static GCC 10.4.0 using a static musl 1.2.5. The initial packages I reuse are: %bootstrap-guile gash-boot bootar gash-utils-boot tcc-boot0 gnu-make-mesboot0 gmp-boot mpfr-boot mpc-boot Using only these I build a recent TCC from 2024-08-20 with Mes from tcc-boot0 as C library, and then MUSL 1.2.5. Then (only) three iterations of TCC with musl are needed to get a stable TCC with working floating point support. The chain continues with GNU Make 4.4.1, Binutils 2.42, Findutils 4.10.0, GCC 4.6.4 with gmp-boot, mpfr-boot, mpc-boot (the version with the RISC-V patches may just work), M4 1.4.19, GMP 6.3.0, MPFR 4.2.1, MPC 1.3.1, GCC 10.4.0. These are all static builds so far. I'm using latest versions of all packages, except Binutils, whose version 2.43 does not link the object files from TCC. I avoid to use --build=i686-unknown-linux-gnu to make it possible to build for other architectures as well. I think the next step should be GCC 14, then glibc with shared library support and GCC 14 again. I need several small patches to work around shortcomings in Mes, gash, gash-utils, missing functionality of version 3.8.0 of gnu-make-mesboot0 (version 3.81 would have it), bugs in TCC. They are all described in the comments. Maybe gash and gash-utils could be improved in future. The most annoying thing is that only one core can be used for the builds, otherwise they hang. I guess it is related to gash in combination with %bootstrap-guile, at least using Make 4.4.1 makes no difference. I published a git repository at . Unfortunately it's not a proper channel yet. If someone likes to give that bootstrap path a try, use this command: guix build --cores=1 -L GCC-10-bootstrap The working GCCs can be build with guix build -L GCC GCC-cross-picolibc-arm-none-eabi, GCC-cross-newlib-arm-none-eabi There are GCC…-toolchain package as well, which propagate ld and all the other tools from Binutils. But if these tools are only used indirectly through the gcc or g++ drivers, these GCC…-toolchain packages are not needed at all, as the GCC packages are standalone. There are also GCC…-c-toolchain variables for use with package-with-c-toolchain. There is no separate libstdc++ package yet, the library is just part of GCC. A separate package will only be needed for Clang or other compilers (maybe Zig), but I'm not sure yet, if clang actually needs a dependency to GCC. I hope this will be useful, maybe it can help the RISC-V bootstrap effort. I'm open for suggestions how to proceed from here. Bye Stefan