From patchwork Fri Sep 29 09:16:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean-Pierre De Jesus DIAZ X-Patchwork-Id: 54391 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 EF83527BBEA; Fri, 29 Sep 2023 10:18:39 +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=unavailable 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 99DD227BBEB for ; Fri, 29 Sep 2023 10:18:37 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9dq-0005tJ-2o; Fri, 29 Sep 2023 05:18:34 -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 1qm9dI-0005W9-PQ 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 1qm9dD-0003vb-SF for guix-patches@gnu.org; Fri, 29 Sep 2023 05:17:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qm9dR-0004ng-AH; Fri, 29 Sep 2023 05:18:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66263] [PATCH 09/23] gnu: Add make-cross-gcc-toolchain. 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:09 +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.169597906718218 (code B ref 66263); Fri, 29 Sep 2023 09:18:09 +0000 Received: (at 66263) by debbugs.gnu.org; 29 Sep 2023 09:17:47 +0000 Received: from localhost ([127.0.0.1]:55220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qm9d1-0004jb-Oa for submit@debbugs.gnu.org; Fri, 29 Sep 2023 05:17:47 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:52583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qm9cP-0004e2-6t for 66263@debbugs.gnu.org; Fri, 29 Sep 2023 05:17:18 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-405524e6740so120861665e9.1 for <66263@debbugs.gnu.org>; Fri, 29 Sep 2023 02:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1695979004; x=1696583804; 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=lySh2JlWDrWJVGoYb6pOzfnxiKVxkvtsIQ5uUjoc9ds=; b=VCtcR2dmPaNTT9sEK+/Wq3yM0gdp6cJmnDuShlPwu0EEr/kIznRKZNdOjRrm7/OD92 ujxlBiMc4YZ2z4RwRKd+9vs1HO0H8/QmxdbRUOSV6bih30AuoHHs85Mp1XHHWmIPgT0f WPxJS2CIyvaNG9z8zD1CnzLs4cuREDXV/+lgqzzgcdjpDyBQMj7dBceJ3sePxDGBmp7R ElSNwZ8K0XF5exHJMcxoNekEub9wgm8bV9uQDQxjqDxPFXZvHM223wwSCwYhmbYTX3LI vKwBn6bKFElucH945JLFCJyodDQlorrhhxnarrNdUdHrjMQ6s5YSDTm7fXigX1bj0Ve7 /vJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695979004; x=1696583804; 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=lySh2JlWDrWJVGoYb6pOzfnxiKVxkvtsIQ5uUjoc9ds=; b=aNRwowM1OFicJZrM/HMuPlKRMyXLWYNXtUHRxU36iKhq84CkSQtAyVWLOOsyyswSmQ Wu+1PTruR7phtJXZUYN5K1pjpXK9HG6RgHStLQoGTvwI4nkfoYh091IB3p+ymsCEsgGx WN6adfi/srLWf5NYgNToULR0hU5t7w8jsl9j8/pSCTCU6i4BtQhSUg3XLCP8+xC+tAkl zN5zOh+woCoOpLf8qHh7WgotJeVGCow+4bjXVjBbu9a7TUuw0Qw4zsHwJ5pBr9ArItbt Gh8Y+wxjfjPFlsCRWygj4qxcm8JnHk5ghZAhpRVqtSFcmijGwbX29K1krPRBuS/Ns7ZS GZnA== X-Gm-Message-State: AOJu0Yxx2SgVlqDGctYSOVH9AwkDrjG7u+5lzZtG7DD+K/O48rWtYeiJ 0O54GfvVwkYh74pL9+DMyr5E42L1RhIiKIQpyniRSA== X-Google-Smtp-Source: AGHT+IGfxH3UwxkGOJsNxSmIGt/+X1rof9QCvxNyqmuNKdnNXTOFDNAb4G172fuHE8K6KnLxiWg4vA== X-Received: by 2002:a05:600c:2492:b0:405:3e9a:f1e3 with SMTP id 18-20020a05600c249200b004053e9af1e3mr3508733wms.11.1695979004622; Fri, 29 Sep 2023 02:16:44 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 02:16:44 -0700 (PDT) Date: Fri, 29 Sep 2023 11:16:13 +0200 Message-Id: <20230929091627.7820-9-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-toolchain.scm (make-cross-gcc-toolchain): New procedure. --- gnu/local.mk | 1 + gnu/packages/cross-toolchain.scm | 58 ++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 gnu/packages/cross-toolchain.scm diff --git a/gnu/local.mk b/gnu/local.mk index bfa816d717..bdd3af5080 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -197,6 +197,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/crates-graphics.scm \ %D%/packages/crates-gtk.scm \ %D%/packages/cross-base.scm \ + %D%/packages/cross-toolchain.scm \ %D%/packages/crypto.scm \ %D%/packages/cryptsetup.scm \ %D%/packages/cups.scm \ diff --git a/gnu/packages/cross-toolchain.scm b/gnu/packages/cross-toolchain.scm new file mode 100644 index 0000000000..0062d043a0 --- /dev/null +++ b/gnu/packages/cross-toolchain.scm @@ -0,0 +1,58 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 Foundation Devices, Inc. +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages cross-toolchain) + #:use-module (gnu packages avr) + #:use-module (gnu packages cross-base) + #:use-module (guix build-system trivial) + #:use-module (guix packages) + #:use-module (srfi srfi-1) + #:export (make-cross-gcc-toolchain)) + +(define* (make-cross-gcc-toolchain target + #:key + (libc (cross-libc target)) + (xgcc (cross-gcc target #:libc libc)) + (xbinutils (cross-binutils target))) + (package + (name (string-append (package-name xgcc) "-toolchain")) + (version (package-version xgcc)) + (source #f) + (build-system trivial-build-system) + (arguments + '(#:modules ((guix build union)) + #:builder (begin + (use-modules (ice-9 match) + (guix build union)) + + (match %build-inputs + (((names . directory) ...) + (union-build (assoc-ref %outputs "out") directory)))))) + (inputs (list xgcc xbinutils libc)) + (native-search-paths (package-native-search-paths xgcc)) + (search-paths (package-search-paths xgcc)) + (properties (alist-delete 'hidden? (package-properties xgcc))) + (license (package-license xgcc)) + (synopsis (string-append "Complete GCC tool chain for C/C++ development (" + target ")")) + (description + "This package provides a complete GCC cross tool chain for C/C++ +development to be installed in user profiles. This includes GCC, as well as +libc (headers and binaries), and Binutils. GCC is the GNU Compiler +Collection.") + (home-page "https://gcc.gnu.org/")))