From patchwork Sat May 7 18:04:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 39152 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 1258027BBEA; Sat, 7 May 2022 19:05:29 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 E7BF427BBE9 for ; Sat, 7 May 2022 19:05:27 +0100 (BST) Received: from localhost ([::1]:38978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnOo3-0006L5-3J for patchwork@mira.cbaines.net; Sat, 07 May 2022 14:05:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnOnf-0006Kw-2m for guix-patches@gnu.org; Sat, 07 May 2022 14:05:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59036) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnOne-0002LQ-PG for guix-patches@gnu.org; Sat, 07 May 2022 14:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnOne-0007Pm-EJ for guix-patches@gnu.org; Sat, 07 May 2022 14:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#53834] [PATCH] gnu: Add cproc. References: <20220207011414.28849-1-jgart@dismail.de> In-Reply-To: <20220207011414.28849-1-jgart@dismail.de> Resent-From: "(unmatched-parenthesis" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 May 2022 18:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53834 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53834@debbugs.gnu.org Cc: "\(unmatched-parenthesis" Received: via spool by 53834-submit@debbugs.gnu.org id=B53834.165194667328462 (code B ref 53834); Sat, 07 May 2022 18:05:02 +0000 Received: (at 53834) by debbugs.gnu.org; 7 May 2022 18:04:33 +0000 Received: from localhost ([127.0.0.1]:52933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnOnB-0007Oz-7W for submit@debbugs.gnu.org; Sat, 07 May 2022 14:04:33 -0400 Received: from knopi.disroot.org ([178.21.23.139]:55226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnOn8-0007Oq-Dx for 53834@debbugs.gnu.org; Sat, 07 May 2022 14:04:32 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id C6FDD4367A; Sat, 7 May 2022 20:04:29 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T8eep63cVhxg; Sat, 7 May 2022 20:04:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1651946668; bh=jJZMg1vbSEMHSZwqzcTCo+mfS5Kfq14BHoR14dYox/A=; h=From:To:Cc:Subject:Date; b=GR/kmUVIsyzn3D6T3mHSuqfajIrWRJ5xkg6KhKXfl858WAAOT6D95OFTGZqgifNg9 qX97a2Oe3EwR+qRqI/sWARCPjcL2PELvNumOmxyYIwXm65C9rSSDAExJaGCdWVyPVW +rgM+YQuZMWSyJO4QhaNInbvcACOLtZ35aIRQ2S5bdhmfeyJ9zl0pt2wPLA8gD6RsA 76O4YOYjKfIYS5jwgSkMg6bpxp3MqLsvQcqHXidv+SWHjTfSDzI2h1TR+NJpc9Eh9X 763jenVkoTIrLf/ioHbDmMtDC8ijSVXZaexXB3rrPrk42MvSyttVWDN/ZymFqxqkfs /DpmsWFWMxtWg== Date: Sat, 7 May 2022 19:04:19 +0100 Message-Id: <20220507180419.19617-1-paren@disroot.org> 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: "\(unmatched-parenthesis" X-ACL-Warn: , "\(unmatched-parenthesis via Guix-patches" X-Patchwork-Original-From: "\(unmatched-parenthesis via Guix-patches" via From: "\\(" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/c.scm (cproc): New variable. Signed-off-by: (unmatched-parenthesis --- gnu/packages/c.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index 1e3296dae1..e03ea2e6eb 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -46,6 +46,7 @@ (define-module (gnu packages c) #:use-module (gnu packages bison) #:use-module (gnu packages check) #:use-module (gnu packages flex) + #:use-module (gnu packages gcc) #:use-module (gnu packages perl) #:use-module (gnu packages texinfo) #:use-module (gnu packages guile) @@ -1097,3 +1098,48 @@ (define-public qbe performance of advanced compilers such as LLVM and GCC in only 10% of the code.") (home-page "https://c9x.me/compile/") (license license:expat)))) + +(define-public cproc + (let ((commit "70fe9ef1810cc6c05bde9eb0970363c35fa7e802") + (revision "1")) + (package + (name "cproc") + (version (git-version "0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~mcf/cproc") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1qmgzll7z7mn587azkj4cizyyd8ii6iznfxpc66ja08140sbn9yx")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags ,#~(list (string-append "CC=" #$(cc-for-target)) + (string-append "PREFIX=" #$output)) + #:phases + ,#~(modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (gcc-lib (assoc-ref inputs "gcc:lib")) + (ld #$(ld-for-target)) + (host-system #$(nix-system->gnu-triplet (%current-system))) + (target-system + #$(nix-system->gnu-triplet (or (%current-target-system) + (%current-system))))) + (invoke "./configure" + (string-append "--prefix=" out) + (string-append "--host=" host-system) + (string-append "--target=" target-system) + (string-append "--with-ld=" ld) + (string-append "--with-gcc-libdir=" gcc-lib)))))))) + (inputs `(("qbe" ,qbe) + ("gcc:lib" ,gcc "lib"))) + (supported-systems (list "x86_64-linux" "aarch64-linux")) + (synopsis "Simple C11 compiler backed by QBE") + (description "@code{cproc} is a C compiler using QBE as a backend. It +currently supports C11 along with some GCC and C2x extensions.") + (home-page "https://sr.ht/~mcf/cproc") + (license license:expat))))