From patchwork Sun May 8 20:25:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 39168 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 6996D27BBE9; Sun, 8 May 2022 21:37:52 +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 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 D433127BBEA for ; Sun, 8 May 2022 21:37:49 +0100 (BST) Received: from localhost ([::1]:50944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnnf3-0006sC-1K for patchwork@mira.cbaines.net; Sun, 08 May 2022 16:37:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnnTf-0003G0-1Z for guix-patches@gnu.org; Sun, 08 May 2022 16:26:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33187) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnnTe-0002Yl-Ld for guix-patches@gnu.org; Sun, 08 May 2022 16:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnnTe-0002n9-D3 for guix-patches@gnu.org; Sun, 08 May 2022 16:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#53834] [PATCH v2] 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: Sun, 08 May 2022 20:26: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.165204152310684 (code B ref 53834); Sun, 08 May 2022 20:26:02 +0000 Received: (at 53834) by debbugs.gnu.org; 8 May 2022 20:25:23 +0000 Received: from localhost ([127.0.0.1]:55317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnnT1-0002mG-IY for submit@debbugs.gnu.org; Sun, 08 May 2022 16:25:23 -0400 Received: from knopi.disroot.org ([178.21.23.139]:57896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnnSz-0002m6-8N for 53834@debbugs.gnu.org; Sun, 08 May 2022 16:25:22 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 7FFF6435FF; Sun, 8 May 2022 22:25:20 +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 DOeE4AmIXPrD; Sun, 8 May 2022 22:25:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1652041517; bh=uC8dLBPoHrDgwMos249bwVSTjm8OZL+rV9hd4HBirB8=; h=From:To:Cc:Subject:Date; b=BRizCT0CaUPFSBJJbZs09MExMbzbo3z7UeKIVMoyoFGR3/UcE1LZVDo3cKcpSUHPd nYd1/zMony3mHfH4rl6JYYLYGfGHn8dkYr1jCdt9S3HELxf3n1b7W3nU4DUUA5HXFf 4XJfE5O2CCGGarOYFjO+OazJU7CdIp8mHckC5k3qw0/V5Nnhh+sp8ZsOXcys2RHw7t 9ELjcsPP4eKSvPx3UKJiTJTkSn/hhBcI7t2BnsVJwv1iYN6Wr208ZNQGNrR56FMDFZ i3wxiMQ65roWdK9zuLU+D2NFIQD1yRpwPhS2VKlXKscLZ97nNhgCwiZ0vWgp0pdEty ym5sa2dbufVHw== Date: Sun, 8 May 2022 21:25:00 +0100 Message-Id: <20220508202500.10449-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 --- This improved patch fixes some style nits. Thanks to lilyp for pointing them out on #guix! gnu/packages/c.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index c9a25eb801..216ddfef88 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -47,6 +47,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) @@ -1108,3 +1109,48 @@ (define-public qbe language as input.") (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 + (list #: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")) + (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-for-target)) + (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, supporting most of C11 +along with some GCC and C2x extensions.") + (home-page "https://sr.ht/~mcf/cproc") + (license license:expat))))