From patchwork Fri Sep 29 09:16:20 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: 54390 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 CBF6527BBEA; Fri, 29 Sep 2023 10:18:22 +0100 (BST) 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 F305327BBE2 for ; Fri, 29 Sep 2023 10:18:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9dS-0005bp-0z; Fri, 29 Sep 2023 05:18:11 -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 1qm9dH-0005Uo-El for guix-patches@gnu.org; Fri, 29 Sep 2023 05:18:00 -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 1qm9dB-0003uu-G2 for guix-patches@gnu.org; Fri, 29 Sep 2023 05:17:55 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qm9dP-0004n0-Kv; Fri, 29 Sep 2023 05:18:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66263] [PATCH 16/23] gnu: cross-gcc-search-paths: Handle AVR target. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, vagrant@debian.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Fri, 29 Sep 2023 09:18:07 +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: patch To: 66263@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ , efraim@flashner.co.il, vagrant@debian.org, maxim.cournoyer@gmail.com X-Debbugs-Original-Xcc: efraim@flashner.co.il, vagrant@debian.org, maxim.cournoyer@gmail.com Received: via spool by 66263-submit@debbugs.gnu.org id=B66263.169597905818177 (code B ref 66263); Fri, 29 Sep 2023 09:18:07 +0000 Received: (at 66263) by debbugs.gnu.org; 29 Sep 2023 09:17:38 +0000 Received: from localhost ([127.0.0.1]:55212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qm9cs-0004iu-PJ for submit@debbugs.gnu.org; Fri, 29 Sep 2023 05:17:38 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:54310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qm9cW-0004em-SQ for 66263@debbugs.gnu.org; Fri, 29 Sep 2023 05:17:14 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-406589e5765so7859115e9.0 for <66263@debbugs.gnu.org>; Fri, 29 Sep 2023 02:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1695979012; x=1696583812; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tO8jAljSfvVAL9I6FVZaB5JJJXvlhi2ireIV3u5HSB0=; b=Xj8DlnAKhYwOSa1qYO4ESm6nCWq7xATJODjV6NZx1JliFwO7VSNpxwh1QGQ/bhFuqv 5Xr5DQA/C0oSbCGkBYsI+KTHlOVeIuCwppmJYq7D3xWJCr/Qd5Jr4vi5UmZFp2dZUroh bTFUxi+hGV92mo13MkayOK2fMx+Vxxrfyu/6JVb6M9BFddb+8bgHLBBjiZ6P7sL2FW/v JhSBzqFuiP3TXCiJeY/wmv21CaGWXNba3FpStch6YOZIt+GngsK6tM6LjIjZVJ33z6xS 3E1YVfj+X/2LPE/dboP3LkWsq7Utx9XtqiPogqa7yGBHkuCXsnX5Dm8+gaonWdbQxxsg 5FlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695979012; x=1696583812; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tO8jAljSfvVAL9I6FVZaB5JJJXvlhi2ireIV3u5HSB0=; b=TeeYzlL/ZQhOAf+lbqzXgcBKiEONIWaE/CtVFnVLqKnE7jCt9CtPUc4yTZB44nvjXE yY3zLx00QvwzwbgQOdbDcLVXEvO/al8QMIbTVxKQKR4MVOf5ZkAdGVGTwMQqZXq6c/lY YH9US/aC5Zja6tz0ZJ4uXzvzlH8Ixrzsz9HSz9jGzt3B114JA/qe6i5X6bH0AEqxBmzO x0jfMxfU03zNUJ9mhxvwgqXqF+BxuEPYVOeu9fXg/QVu78RotCqWauMXKIqD/S7Uuojd 4lNR6AfeYN2hNqt+5h9fW52addGdVlbNRKIfkUGlCrlPF8mYVe5pJajgAMctQingtPF4 Gung== X-Gm-Message-State: AOJu0Yx2pXx9xW4K4XIEPJxvbyVAIF9ZUu2cUhVmHsTpxo5V06SXWjLO b/ZbkkKpOT81O9fxolnaI3E8KxXJRriyRRI3BNLF4A== X-Google-Smtp-Source: AGHT+IHU2KKvmWc8lRin8EPqkhx9AkJLValHWs2MIHYHNKodnIbfLDBM/9n8jPC0tmG8n0jnWG4EpQ== X-Received: by 2002:a7b:ce09:0:b0:3fe:d630:f568 with SMTP id m9-20020a7bce09000000b003fed630f568mr3178323wmc.39.1695979012294; Fri, 29 Sep 2023 02:16:52 -0700 (PDT) Received: from omen15.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id k15-20020a7bc40f000000b004013797efb6sm1020933wmi.9.2023.09.29.02.16.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 02:16:52 -0700 (PDT) Date: Fri, 29 Sep 2023 11:16:20 +0200 Message-Id: <20230929091627.7820-16-jean@foundationdevices.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230929091627.7820-1-jean@foundationdevices.com> References: <20230929091627.7820-1-jean@foundationdevices.com> 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-search-paths): Handle AVR target case. --- gnu/packages/cross-base.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 10d912b755..ee90424076 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -267,6 +267,31 @@ (define (cross-gcc-snippet target) "-DTOOLDIR_BASE_PREFIX=\\\"../../../../\\\"")) #t)) +(define (cross-gcc-search-paths target) + "Return GCC search paths needed for TARGET." + (cons (search-path-specification + (variable "CROSS_LIBRARY_PATH") + (files `("lib" "lib64" + ,@(list (string-append target "/lib") + (string-append target "/lib64"))))) + + (map (lambda (variable) + (search-path-specification + (variable variable) + + ;; Add 'include/c++' here so that 's + ;; "#include_next " finds GCC's + ;; , not libc's. + (files (match variable + ("CROSS_CPLUS_INCLUDE_PATH" + `("include/c++" "include" + ,@(list (string-append target "/include/c++") + (string-append target "/include")))) + (_ + `("include" + ,@(string-append target "/include"))))))) + %gcc-cross-include-paths))) + (define* (cross-gcc target #:key (xgcc %xgcc)