From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id aPn2BipgFmZfeQAAqHPOHw:P1 (envelope-from ) for ; Wed, 10 Apr 2024 11:47:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aPn2BipgFmZfeQAAqHPOHw (envelope-from ) for ; Wed, 10 Apr 2024 11:47:22 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=foundation.xyz header.s=google header.b=J+6r4f1a; dmarc=fail reason="SPF not aligned (relaxed)" header.from=foundation.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712742442; 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=yAlebnQTDVr8B2I3nS+Nm7obU6r/bsm9QvR8ZnB4UeA=; b=L1+sM+rB6vDGiabj6QG6Fv/MDInrKWx5f+jvMBX4TRqeC8pTU54u1fgPufVnG8FNsvEJxA 0jSAzCiQbo3RHYjqon4fhKODMoaLZbIV8ZK4yBzMYsk1Iv0JoD/DUMGyMeWy32F6KdksvT 0BJxkBfhfbun421sHp+UTG8xe2logpDs49SmBkKfkJq5eZypMbmrzzC3hPIvRSy5AiXi3R cA9fq7fjwSU8nGegaaHhtzcR05FtBDR8TwyA1XMbaVVeVVeqavIMD6V+FtM8NQGFb4Ijsc MX4NWUqwllypB9zgzl9ZqBXAszBzd4WdQQm0QnMFU5mw3dgrr488TLt7EA9SJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=foundation.xyz header.s=google header.b=J+6r4f1a; dmarc=fail reason="SPF not aligned (relaxed)" header.from=foundation.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712742442; a=rsa-sha256; cv=none; b=ZpP1vrzhm1aTTp/vgG7+9Y4rqHO6fpYb+v8Tmv8r/D0rrobTNSDwFZAYpmMxU0eMS+rhrE pkYqP8aflytABQeiCAoY1CXIh8gc0qIdZ+mw0bhxM/AinAGk1FoFSdR76hWH+BfOMsblCJ 97tbcgjQLtipJTawh/FNMtzWYk7GuJ2JoRIsebQLIQDvywy6AC7sLipOEa5y8Pku3gxZwP wEgD+rTch+L3SMorDzINXDgPHDCMkdyJX15UdMkoe6PrMKjiSVcfXioMKa6PedVmeVquOh +WyYd0Qw6+yTO7duwiFnbK1DCVS8BdIdo29mUOAGFVFYiF6A8YZrv+UDf2lgwA== 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 67D45C47 for ; Wed, 10 Apr 2024 11:47:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruUXj-0003pi-4k; Wed, 10 Apr 2024 05:46:59 -0400 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 1ruUXg-0003pG-Q5 for guix-patches@gnu.org; Wed, 10 Apr 2024 05:46:56 -0400 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 1ruUXg-0002fr-Hv for guix-patches@gnu.org; Wed, 10 Apr 2024 05:46:56 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ruUXo-0001Yi-Te for guix-patches@gnu.org; Wed, 10 Apr 2024 05:47:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#68058] [PATCH] gnu: cross-gcc-toolchain: Add native-search-paths. Resent-From: Jean-Pierre De Jesus Diaz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Apr 2024 09:47:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68058 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Thiago Jung Bauermann Cc: 68058@debbugs.gnu.org, jean@foundationdevices.com X-Debbugs-Original-Cc: 68058@debbugs.gnu.org, Jean-Pierre De Jesus DIAZ , Jean-Pierre De Jesus DIAZ via Guix-patches via Received: via spool by submit@debbugs.gnu.org id=B.17127424235967 (code B ref -1); Wed, 10 Apr 2024 09:47:04 +0000 Received: (at submit) by debbugs.gnu.org; 10 Apr 2024 09:47:03 +0000 Received: from localhost ([127.0.0.1]:52169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruUXk-0001Xi-HD for submit@debbugs.gnu.org; Wed, 10 Apr 2024 05:47:02 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruUXc-0001VD-Dj for submit@debbugs.gnu.org; Wed, 10 Apr 2024 05:46:53 -0400 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 1ruUXN-0003oM-Vd for guix-patches@gnu.org; Wed, 10 Apr 2024 05:46:38 -0400 Received: from mail-vs1-xe32.google.com ([2607:f8b0:4864:20::e32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ruUXM-0002fB-72 for guix-patches@gnu.org; Wed, 10 Apr 2024 05:46:37 -0400 Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-479d6ab7585so2117354137.1 for ; Wed, 10 Apr 2024 02:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundation.xyz; s=google; t=1712742395; x=1713347195; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yAlebnQTDVr8B2I3nS+Nm7obU6r/bsm9QvR8ZnB4UeA=; b=J+6r4f1aafafjEV4oKYiaLyhdlCjPIeZg7/0Kb889jUaMAMBvqrCE2nWkhkJRupg4Z 39imTFnyaA5UMb1KKijglSURV0ZB6q2/p6h7J892iM9V04kFZOad5lM2fUisKpzdF/pb XBodm6etgaXdrTuaFdDtj35A3Tv+6tAY9qY51MOQT74foPJ71+NSGOh7RIjsz4gVa38h 7e7NCEbrcnZANaDyIgvwzbQTw0kmX/vYJGTfFv51vfvdPAp3HUDB0cmxefcmqw2BXElH E6MCP7OuJYbOSjMg4t6e1r3W0QO9yadb7uupsC0+i14yfwUyKI1SPQ7p+qmwxALzwZSQ awzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712742395; x=1713347195; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yAlebnQTDVr8B2I3nS+Nm7obU6r/bsm9QvR8ZnB4UeA=; b=dCVlN0SzPe7rea7hjzuyhKr/+vvEONE6OCdzaINzcwN4NuG/Nxar27oXQuKqudzkpd LrQAox8D+xhTZ44rHiS4mz3eac5zzyv4m6rHXL9hf3F+8/7PfnRhfJVUzo2wOxBM7MP9 rJrsDmcdbuXFEc3y7G9jsaEZ1qlVsvsSR62Z7dgrdoxmlginlg+MSQ/zVBtRfHiZiFNb 1QZOFD6UHC21v9xEYDhobZhaiRcmRcPPiulPalXcIelXm4CDa/AGX8iv1ccnv7GwNEhG TjmlHJRB4A99FoFO1Af4vAj3FCGzstLIVNAVihSOtu3RFUKyQjv+/P42BZWmjZOxtYmu 220w== X-Gm-Message-State: AOJu0YzVgXbfuEhbLr+Am0TvNwn8sBw27ER93HTrj3Fou0vWK7DW0wbh Hip656aj2j2HCw/6pomHfiz6UVzBhVnCK79MN5qbaCKf9nrz/tk0nw4fIBgU8kKfQKxKIVcn/FO UTQUp4g9uXuTulNx02E3vO8iCfkZCfuylX1FKeg== X-Google-Smtp-Source: AGHT+IGYS6FrC0P/ElpvZqJkjRZAV6c5nkZ6br2ABqf8b2DqEElcGDce50qg0wrFZEUvQcHe0gpBSi2QNCzBMAZsjH4= X-Received: by 2002:a05:6102:50a2:b0:47a:2a10:fb73 with SMTP id bl34-20020a05610250a200b0047a2a10fb73mr249743vsb.4.1712742394959; Wed, 10 Apr 2024 02:46:34 -0700 (PDT) MIME-Version: 1.0 References: <806b88813c0d8ef1265c43b49324d4ae4338fb0d.1703678931.git.jean@foundationdevices.com> <87jzl688by.fsf@linaro.org> In-Reply-To: <87jzl688by.fsf@linaro.org> From: Jean-Pierre De Jesus Diaz Date: Wed, 10 Apr 2024 09:46:24 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::e32; envelope-from=jean@foundation.xyz; helo=mail-vs1-xe32.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.27 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -5.27 X-Migadu-Queue-Id: 67D45C47 X-TUID: TiAGSikKnvUv Hi Thiago, >In issue 69394 you wrote that this solution doesn't work when there are >multiple cross toolchains installed on the same profile (the CROSS_ >environment variables would have all the cross toolchains), but I think >that moving from allowing zero cross toolchain installed in the >profile=C2=B9 to one cross toolchain installed is already an improvement. = :-) And >=C2=B9 Except for bare-metal cross toolchains, which IIUC don't have this > problem because they don't use crt*.o files? It's only a problem with the platforms that provide a C standard library so bare-metal ones are unaffected. However some of the bare-metal targets provide a C standard library like `avr' or `arm-none-eabi' which I'm still working on, they both provide AVR Libc and Newlib respectively and suffer from the same problem. That said there's no downside on the patch other than the bad user experience IMO, but the bad UX is already there anyway but I think also this should be merged so that we can start making progress towards having more functional cross toolchain packages. On Tue, Apr 9, 2024 at 10:44=E2=80=AFPM Thiago Jung Bauermann wrote: > > > Hello, > > [ What I'm saying here is a duplicate of what I just sent in issue > #69394, but I think it's useful to have these comments together with > the patch, to facilitate discussion about it. ] > > Jean-Pierre De Jesus DIAZ via Guix-patches via wri= tes: > > > * gnu/packages/cross-base.scm (cross-gcc-toolchain): Add > > native-search-paths. > > > > Change-Id: Ib4cc510fde71b8d3140e1001c3931f74300da8a0 > > --- > > gnu/packages/cross-base.scm | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm > > index 6ee7b315d8..dc6f7922d6 100644 > > --- a/gnu/packages/cross-base.scm > > +++ b/gnu/packages/cross-base.scm > > @@ -760,6 +760,7 @@ (define* (cross-gcc-toolchain/implementation target > > (((names . directory) ...) > > (union-build #$output directory)))))) > > (inputs `(,xbinutils ,xgcc ,@(if libc (list libc) '()))) > > + (native-search-paths (package-search-paths xgcc)) > > (home-page (package-home-page xgcc)) > > (synopsis > > (format #f "Complete GCC tool chain for C/C++ development (~a)" t= arget)) > > > > base-commit: 756ba0429e84ee0f8ce30484439b78c00c61d286 > > Today I ran into the problem described in issue 69394 with a custom > aarch64-linux-gnu cross toolchain: > > $ aarch64-linux-gnu-gcc -o ~/tmp/hello -g ~/tmp/hello.c > aarch64-linux-gnu-ld: cannot find crt1.o: No such file or directory > aarch64-linux-gnu-ld: cannot find crti.o: No such file or directory > collect2: error: ld returned 1 exit status > > And I was able to fix it by locally applying the patch above. Thank you! > > IMHO this patch should be applied. > > In issue 69394 you wrote that this solution doesn't work when there are > multiple cross toolchains installed on the same profile (the CROSS_ > environment variables would have all the cross toolchains), but I think > that moving from allowing zero cross toolchain installed in the > profile=C2=B9 to one cross toolchain installed is already an improvement.= :-) > > -- > Thiago > > =C2=B9 Except for bare-metal cross toolchains, which IIUC don't have this > problem because they don't use crt*.o files?