From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id ANHTGe/QZWULbwEA9RJhRA:P1 (envelope-from ) for ; Tue, 28 Nov 2023 12:37:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ANHTGe/QZWULbwEA9RJhRA (envelope-from ) for ; Tue, 28 Nov 2023 12:37:19 +0100 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 377835E4FC for ; Tue, 28 Nov 2023 12:37:19 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=foundationdevices.com header.s=google header.b=NFEjpzKD; dmarc=pass (policy=none) header.from=gnu.org; 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=1701171439; a=rsa-sha256; cv=none; b=huwTQ2Gf6jDBJIt4ITkgkPfhSIki3CQVraNj/QuIgXvwgIvrg3JNldMAkA93ZbJmP3AeMe XdqwYf9RnOmfr8RhTE4I4aYVAnSl7StBO3qgSdofQmXwjy5+p54dG5zgjZOfHkIJZge3bj 3B84kj/pnLETe7YogmjSl8bnZvyWVfL9h4UzlcXpwLAeZJXq8Pfb/dEjh3IRfRYVHJf7KP mxt2xPyAgyI6BK5KTeIb4ra6bDFztGXmFVNd8F97Az6UT0PL1fLzIcio0roqkrR9pBkjBY jHAZqzNzZO5R5BB3uZm779JkBtMmgVn8hydWItm0D8LEl/5w7HMeURChX1sg6A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=foundationdevices.com header.s=google header.b=NFEjpzKD; dmarc=pass (policy=none) header.from=gnu.org; 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=1701171439; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=qxMLjpAmAd6yM1ybGyAfpCfIuBBG5N3X9CRt6q6Ehhs=; b=rg+qU1PJywXIFD/CJk4/cqgkLOZJa/76m8w7n7lg8xim943Sq0JokmjMokGRC+Uf7dW3Iw EpsgA0YUY9I+nxQJlAdXa/YC9NflMJoO5jdx07H5Rzwe2lmFqxn0uhwPaPFxhHiy+SrHNE yQ6yknMA9sErcgHB4Ynmg6kmZbZpOnF9VMzcsg3d6Xr/xcvyrfcfdwi7GREQWd6/efOowc CQRdQv62B5CZxRw8yoEUESRbxCED9lplq4fdYcf20n25dwQo04ukHGt+upVRjY2bJLvkG4 JPtJIAqwyvtChF6L/zYG23XOM7LbSbnqNmVxPkJHPVUo+/MdMo/gZiZl9g2kOw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7wOf-0006uH-UX; Tue, 28 Nov 2023 06:36:57 -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 1r7wOe-0006tX-B6 for guix-patches@gnu.org; Tue, 28 Nov 2023 06:36:56 -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 1r7wOe-0008AR-2Y for guix-patches@gnu.org; Tue, 28 Nov 2023 06:36:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r7wOk-0003Ns-TP for guix-patches@gnu.org; Tue, 28 Nov 2023 06:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66263] [PATCH v1 08/22] gnu: cross-gcc: Handle target include paths. 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:02 +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.170117138812806 (code B ref 66263); Tue, 28 Nov 2023 11:37:02 +0000 Received: (at 66263) by debbugs.gnu.org; 28 Nov 2023 11:36:28 +0000 Received: from localhost ([127.0.0.1]:45612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7wNy-0003JS-F9 for submit@debbugs.gnu.org; Tue, 28 Nov 2023 06:36:28 -0500 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:47133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7wNv-0003In-S2 for 66263@debbugs.gnu.org; Tue, 28 Nov 2023 06:36:12 -0500 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2c9947f488fso41463151fa.2 for <66263@debbugs.gnu.org>; Tue, 28 Nov 2023 03:36:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1701171359; x=1701776159; 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=qxMLjpAmAd6yM1ybGyAfpCfIuBBG5N3X9CRt6q6Ehhs=; b=NFEjpzKDNYmv5MMcDxgWwpyQdmXCweixSSqnlFxXD4lmwBnqkJWcA9ydNiMwoZj6zG g41TgR5M2pDk+Pc27AVHvfiKnPz/JSCwMBqn3zQzcwd6f3ZzVcTCFR+nf6E1pldU9CeV ESwZo+2CZRhQWYSGMvwX/AMTR62VE9Pawe6G+XtgEpDR9Du5nAlOuNFJ4VYkuGFyDfhQ bgx4QWDk8W22DcG8VJMd/PziGVA+FGXwqMeJ9tc+sdVJ5CTIWkkg1FSK+0V3neJSA4Pn zokIN4X36zT1oisec+VVjMOSgQfTGPQWshKo4hQN0QjhZZbPg0BcUGpJCO4uLjsNq8yJ 3ezA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701171359; x=1701776159; 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=qxMLjpAmAd6yM1ybGyAfpCfIuBBG5N3X9CRt6q6Ehhs=; b=jjMHISzXXy7n2b28VJNaZl6SPGY4X/kAasadZ3sc1wO2OwkvPsA8XCrMROs3z6xhQW OPf8967RkBTTNQ8l5pZ6AXnG0FudYnWGblP1ln2MuVG7/ZDYfUYnvI4ScopmaO3TdaJw 4Qfvla1rK3t9eUSN6OzeJzbsFXxKHX7R4fXmrgVaWDmgcgU+2nhftGxkbx4wviBZtjdg hDUq+aZyfrH7Duisw3Hruj+o0jVi6fZmMLM6mPLzsiwFz4bXEOcfwzU1dNUSWXVGcOZE NPZd8NWlDBqhJk4bxHVhnKIKfO5ExvqFn9h9YGvg+5dUezdaSZ5oDZkJf5esF8z5FOlN C3vw== X-Gm-Message-State: AOJu0Yw+GPoVRy6uLdJlJB2HjG+r7oJIa2RpsbzvW3yaFXOgxDOt833m v8YE1NatvYD3wl2/9fEm5KuuabVfxRXQ08gG0zE= X-Google-Smtp-Source: AGHT+IFpdyjZIygGWXKjEsA1ZJrgb4u+vOcM/OV5KGq+8ZRFQ/0TPSIFYvZHFPnJvmPnO0a26dS4gQ== X-Received: by 2002:a2e:b744:0:b0:2c9:a022:63da with SMTP id k4-20020a2eb744000000b002c9a02263damr4908136ljo.19.1701171358946; Tue, 28 Nov 2023 03:35:58 -0800 (PST) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id f7-20020a05600c154700b0040b4cb14d40sm1848769wmg.19.2023.11.28.03.35.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 03:35:58 -0800 (PST) Date: Tue, 28 Nov 2023 12:34:51 +0100 Message-ID: <20231128113510.11214-8-jean@foundationdevices.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Jean-Pierre De Jesus DIAZ via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -6.13 X-Spam-Score: -6.13 X-Migadu-Queue-Id: 377835E4FC X-TUID: VaFdYM+X5Wyj * gnu/packages/cross-base.scm (cross-gcc-search-paths): New procedure. * gnu/packages/cross-base.scm (cross-gcc) : Convert to and use cross-gcc-search-paths procedure. Change-Id: Id306782eaf928d05cd005b9539087ed631506b5b --- gnu/packages/cross-base.scm | 42 +++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index dcb1c3efa8..fe33770c2a 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -249,6 +249,31 @@ (define (cross-gcc-snippet target) "-DTOOLDIR_BASE_PREFIX=\\\"../../../../\\\"")) #t)) +(define (cross-gcc-search-paths target) + "Return list of GCC search path specifications 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) @@ -341,22 +366,7 @@ (define* (cross-gcc target (inputs '()) ;; Only search target inputs, not host inputs. - (search-paths (cons (search-path-specification - (variable "CROSS_LIBRARY_PATH") - (files '("lib" "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")) - (_ - '("include")))))) - %gcc-cross-include-paths))) + (search-paths (cross-gcc-search-paths target)) (native-search-paths '()))) (define* (cross-kernel-headers . args) -- 2.41.0