From patchwork Tue Nov 28 11:34:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Pierre De Jesus DIAZ X-Patchwork-Id: 56894 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A245B27BBEA; Tue, 28 Nov 2023 11:37:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DAF0327BBE2 for ; Tue, 28 Nov 2023 11:37:11 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7wOm-0006zF-Kx; Tue, 28 Nov 2023 06:37:04 -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 1r7wOh-0006wB-M3 for guix-patches@gnu.org; Tue, 28 Nov 2023 06:36:59 -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 1r7wOh-0008CW-D6 for guix-patches@gnu.org; Tue, 28 Nov 2023 06:36:59 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r7wOo-0003Op-7V for guix-patches@gnu.org; Tue, 28 Nov 2023 06:37:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66263] [PATCH v1 12/22] gnu: cross-gcc: Find AVR Libc files. References: <20230929091333.7623-1-jean@foundationdevices.com> In-Reply-To: <20230929091333.7623-1-jean@foundationdevices.com> Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Nov 2023 11:37:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66263 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: moreinfo patch To: 66263@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ Received: via spool by 66263-submit@debbugs.gnu.org id=B66263.170117140712923 (code B ref 66263); Tue, 28 Nov 2023 11:37:06 +0000 Received: (at 66263) by debbugs.gnu.org; 28 Nov 2023 11:36:47 +0000 Received: from localhost ([127.0.0.1]:45641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7wOQ-0003M5-SC for submit@debbugs.gnu.org; Tue, 28 Nov 2023 06:36:47 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:58619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7wO2-0003JO-Dg for 66263@debbugs.gnu.org; Tue, 28 Nov 2023 06:36:28 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40b4c2ef58aso5319775e9.0 for <66263@debbugs.gnu.org>; Tue, 28 Nov 2023 03:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1701171365; x=1701776165; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TBo5k8mUQzjmm6IydwLDBApeqM8urQzeuzFPqDgapPM=; b=RDab1oPRwhPKFNcYph/QajfSfPfQnqcAkctbuH1P+sC1H2YS+v8vedPFq9rxVzRxkv MezqvW5kXzONaN45Tg3ZZQPD5txSVII8rVD1hxR5f27cX9JpdwLhQZtuBLzW5IirUBLm sLJAgzXXHPyP3Kff95XbYMb3c7HT9LGfExXeHAp0HWmpT3YwfwM4wpYs8WdnHPm2vQ5F HAoXJKGdo3riiq9qnkpjy9OBz45jdbhfqBDS42qE9N6jXzP2XJUcDkQHOQZ2GszEvPaV LDLAGTKc917NSy4N8EJVjdIunsQfVrWgMXx2KgISkOeO7/ee3D62q4jhEHP3tYi6L+oR K+jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701171365; x=1701776165; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TBo5k8mUQzjmm6IydwLDBApeqM8urQzeuzFPqDgapPM=; b=CH/OK25YA0+zAz/Y9XznQ2B/sZykxiKhvvFbPzqPUzON5Qk6y9+7GAilb8HA9vFH88 fkn+h3h21q0+twny0cbfSfpI4GoiNbR6KUNVFla1Dd/u9Atdxi7MnsDVeK0jqr2mCP9C nrDC6fPh9HxkCmVvUpvZpdm1WXX/hweo1sGHVpLlrbYmpi333nU02vfnG3AlZ6mZ68sv NEXF4UO76lA+y/6/hFdXxom5CW9MhR4yLNbngih/CLOCpqwxAIdj9SL7RgbdSTpK5Ovf ee9dH73s+CVgppKuj+UA7ylmMQRPk5N5OTUbuLnIvPUT5Tj9MkvFxOthcLfAz5utKrXN EZKg== X-Gm-Message-State: AOJu0YxKmAIZcR1+9W3K7FLppTKcjxa6TjDAP8CRVaNAC3HkM89AGUd4 TXXCC104xHZPQe/HFBTq7sYJzq1YKec5IjzTvYY= X-Google-Smtp-Source: AGHT+IHXBi8U4+VtdXnmM4skU9ucV9TMV2vJV05Nf+FG7AEnMa4Fx6p/uW6D+Xzj4sSCzWMrGqaNMw== X-Received: by 2002:a05:600c:45cf:b0:408:3ac4:dc3f with SMTP id s15-20020a05600c45cf00b004083ac4dc3fmr10096429wmo.29.1701171365759; Tue, 28 Nov 2023 03:36:05 -0800 (PST) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id f7-20020a05600c154700b0040b4cb14d40sm1848769wmg.19.2023.11.28.03.36.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 03:36:05 -0800 (PST) Date: Tue, 28 Nov 2023 12:34:55 +0100 Message-ID: <20231128113510.11214-12-jean@foundationdevices.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 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: , Reply-to: Jean-Pierre De Jesus DIAZ X-ACL-Warn: , Jean-Pierre De Jesus DIAZ via Guix-patches X-Patchwork-Original-From: Jean-Pierre De Jesus DIAZ via Guix-patches via From: Jean-Pierre De Jesus DIAZ Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/cross-base.scm (cross-gcc-arguments) : Add --with-native-system-header-dir for AVR. : Add target prefix to /lib to find AVR library. Change-Id: Ie9cae338da241fe987f53463aa3774a890e2af9a --- gnu/packages/cross-base.scm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 5f87eec56b..58c37e43c1 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -202,21 +202,35 @@ (define (cross-gcc-arguments target xgcc libc) #$@(if (target-avr? target) #~("--enable-multilib") + #~()) + + + #$@(if (and libc (target-avr? target)) + #~((string-append "--with-native-system-header-dir=" + #$libc "/" #$target "/include")) #~())) (remove (lambda (flag) (or (and #$libc (string-prefix? "--enable-languages" flag)) + (and #$libc + #$(target-avr? target) + (string-prefix? "--with-native-system-header-dir" + flag)) (and #$(target-avr? target) (string=? flag "--disable-multilib")))) #$flags))) ((#:make-flags flags) (if libc - #~(let ((libc (assoc-ref %build-inputs "libc"))) + #~(let ((libc (assoc-ref %build-inputs "libc")) + (lib-prefix (if #$(target-avr? target) + (string-append "/" #$target) + ""))) ;; FLAGS_FOR_TARGET are needed for the target libraries to receive ;; the -Bxxx for the startfiles. - (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib") + (cons (string-append "FLAGS_FOR_TARGET=-B" + libc lib-prefix "/lib") #$flags)) flags)) ((#:phases phases)