From patchwork Tue May 24 01:21:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Antero Mejr X-Patchwork-Id: 39590 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 DFC2B27BBEA; Tue, 24 May 2022 02:24:20 +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 B6BFA27BBE9 for ; Tue, 24 May 2022 02:24:19 +0100 (BST) Received: from localhost ([::1]:49632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntJHW-0002L1-R7 for patchwork@mira.cbaines.net; Mon, 23 May 2022 21:24:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntJHH-0002Kh-1q for guix-patches@gnu.org; Mon, 23 May 2022 21:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntJHG-00065Q-EV for guix-patches@gnu.org; Mon, 23 May 2022 21:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ntJHG-0001dZ-9N for guix-patches@gnu.org; Mon, 23 May 2022 21:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55605] [PATCH 1/2] gnu: Add qbe. Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 May 2022 01:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55605 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55605@debbugs.gnu.org Cc: Antero Mejr X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16533553916214 (code B ref -1); Tue, 24 May 2022 01:24:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2022 01:23:11 +0000 Received: from localhost ([127.0.0.1]:50500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntJGR-0001cA-4y for submit@debbugs.gnu.org; Mon, 23 May 2022 21:23:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:49722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntJGN-0001c1-My for submit@debbugs.gnu.org; Mon, 23 May 2022 21:23:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntJGN-0002IZ-Hs for guix-patches@gnu.org; Mon, 23 May 2022 21:23:07 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:58090) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1ntJGL-00062X-4k for guix-patches@gnu.org; Mon, 23 May 2022 21:23:07 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4L6bzl5VShz9sZk for ; Tue, 24 May 2022 03:22:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1653355379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zoH3KAgdbfi1Tok7KeFESu/14a4yQdOodf1/lfe1Bu4=; b=ex6LTb6t/rLSo5Ne7KY0+qSRv/YWYZPb784PrlLnM6eky/9/uxkIpOgdiwFIDfe6p3ZV2G JXshvJbyRMzbI3HekBBV+V7xbasx/FoLqjWEiB72lKF39GxTdkvRLy35Cabs4eegzUte0E BUWdqyMz9vfrxtyfycynVUey1kB0mN1ozgheOLOf7c08F5PR5s59/BNP7d6tbu4FeQzLqt vz7ASPitpoPrafJUvCIYhxdrrq/uoX06kxu5/wKQW3A1H04VFSDRBSX8WWPFjAg7SH9wzV c1sQoKn5Aie4np+gq52FctJNvBvt2qJtTZFAxBqkcafARyK2vzc5tcMzqJsqig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1653355377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zoH3KAgdbfi1Tok7KeFESu/14a4yQdOodf1/lfe1Bu4=; b=nm9E3ISPX+GcYL9tPMzVF6gWr1hgrBsyHTQuX69fi0LYSE2pMYEHrLUBIqzch5ipPlB2zj jFlpnPMNTdQ8I/glhbkS0j3kQXKxnPKv3qvOT/yb4CiGVgNCBGX7Xickmz9BdCOLHSkESB EDPjt6Q/yUrANcq9TdoOBKjHl1Wi7c32dsadb1YpK3dkr+7RpD0Q08A8RYM6h5anPc8baY znhi7gEZUqpqzzH51QLE7FpRrxXJLlBOWqDcRJ8M9W17RoA2QvAb8GcIHNEg6q5Nvi/3O7 Av8L2TxpdRRr0e1HyfIqqFFnSP51IzdaDPb4H2wLXR5j1QD5K1bi1Pq20bPETA== Date: Mon, 23 May 2022 21:21:54 -0400 Message-Id: <20220524012155.48729-1-antero@mailbox.org> MIME-Version: 1.0 X-MBO-RS-META: nq7cnaabtz8k1ox6ny4qydy5rgot8yqq X-MBO-RS-ID: 55c20fe40be9a8dcb4e Received-SPF: pass client-ip=80.241.56.151; envelope-from=antero@mailbox.org; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches X-Patchwork-Original-From: Antero Mejr via Guix-patches via From: Antero Mejr X-getmail-retrieved-from-mailbox: Patches * gnu/packages/c.scm (qbe): New variable. --- Hare + QBE builds, tested running a Hello World program using the stdlib. gnu/packages/c.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index e14e56ad71..01fd2e9a96 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2020, 2021 Greg Hogan ;;; Copyright © 2021 David Dashyan ;;; Copyright © 2021 Foo Chuan Wei +;;; Copyright © 2022 Antero Mejr ;;; ;;; This file is part of GNU Guix. ;;; @@ -1096,3 +1097,37 @@ (define-public utf8-h C and C++. The functions it provides are like those from the C header string.h, but with a utf8* prefix instead of the str* prefix.") (license license:unlicense)))) + +(define-public qbe + (let ((commit "9a3e131cf713f8619705f906caf28c5809708ad0") (revision "0")) + (package + (name "qbe") + (version (git-version "0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "git://c9x.me/qbe.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "04dhdm2j84h9hlqj934wh9v456v3kzh0ayxs1gncyh4inv3b41cf")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no test suite + #:make-flags + (list (string-append "CC=" + ,(cc-for-target)) + (string-append "DESTDIR=" + (assoc-ref %outputs "out")) + "PREFIX=") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) ;no configure script + (supported-systems (list "x86_64-linux" "aarch64-linux" "riscv64-linux")) + (home-page "https://c9x.me/compile/") + (synopsis "Compiler backend written in C") + (description + "QBE aims to be a pure C embeddable backend that provides 70% of the +performance of advanced compilers in 10% of the code.") + (license license:expat))))