all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#55150] [PATCH] gnu: Add qbe.
@ 2022-04-27 11:29 Jon Eskin
       [not found] ` <handler.55150.B.165106987410863.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Eskin @ 2022-04-27 11:29 UTC (permalink / raw)
  To: 55150

[-- Attachment #1: Type: text/plain, Size: 119 bytes --]

Hello,

I’ve packaged the qbe compiler backend. I’m new to GUIX, so let me know if I messed anything up!

Jon

[-- Attachment #2: 0001-gnu-Add-qbe.patch --]
[-- Type: application/octet-stream, Size: 3677 bytes --]

From c81d8d7489f157611f56fdd44d0fc05553e95f7f Mon Sep 17 00:00:00 2001
From: Jon Eskin <eskinjp@gmail.com>
Date: Wed, 27 Apr 2022 05:48:54 -0400
Subject: [PATCH] gnu: Add qbe.

---
 gnu/local.mk         |  2 ++
 gnu/packages/qbe.scm | 56 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 gnu/packages/qbe.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 9bad87710c..1c4a418a33 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -50,6 +50,7 @@
 # Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 # Copyright © 2022 Remco van 't Veer <remco@remworks.net>
 # Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+# Copyright © 2022 Jon Eskin <eskinjp@gmail.com>
 #
 # This file is part of GNU Guix.
 #
@@ -503,6 +504,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/python-xyz.scm			\
   %D%/packages/toys.scm				\
   %D%/packages/tryton.scm			\
+  %D%/packages/qbe.scm				\
   %D%/packages/qt.scm				\
   %D%/packages/racket.scm			\
   %D%/packages/radio.scm			\
diff --git a/gnu/packages/qbe.scm b/gnu/packages/qbe.scm
new file mode 100644
index 0000000000..426566666c
--- /dev/null
+++ b/gnu/packages/qbe.scm
@@ -0,0 +1,56 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Jon Eskin <eskinjp@gmail.com>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages qbe)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix git-download)
+  #:use-module (guix licenses))
+
+(define-public qbe
+  (package
+    (name "qbe")
+    (version "2022.04.11")
+    (source (origin
+              (method git-fetch)
+              (uri
+               (git-reference
+                (url "git://c9x.me/qbe.git")
+                (commit "2caa26e388b1c904d2f12fb09f84df7e761d8331")))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1gv03ym0gqrl4wkbhysa82025xwrkr1fg44z814b6vnggwlqgljc"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+                          "CC=gcc")
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-before 'check 'fix-cc
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      ;; fix test script overriding environment variable
+                      (substitute* "tools/test.sh"
+                        (("cc=\"cc -no-pie\"") "cc=\"gcc -no-pie\""))
+                      #t)))))
+    (synopsis "Lightweight compiler backend")
+    (description
+     "QBE aims to be a pure C embeddable backend that provides 70% of the
+performance of advanced compilers in 10% of the code.")
+    (home-page "https://c9x.me/compile/")
+    (license expat)))
-- 
2.32.0 (Apple Git-132)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [bug#55150] Acknowledgement ([PATCH] gnu: Add qbe.)
       [not found] ` <handler.55150.B.165106987410863.ack@debbugs.gnu.org>
@ 2022-04-27 18:36   ` Jon Eskin
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Eskin @ 2022-04-27 18:36 UTC (permalink / raw)
  To: 55150

I wasn’t aware of Guix ‘R Us when I put this together, it looks like qbe is already available there with the intent of merging at a later time. This patch can probably be disregarded, sorry for the trouble.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-27 18:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27 11:29 [bug#55150] [PATCH] gnu: Add qbe Jon Eskin
     [not found] ` <handler.55150.B.165106987410863.ack@debbugs.gnu.org>
2022-04-27 18:36   ` [bug#55150] Acknowledgement ([PATCH] gnu: Add qbe.) Jon Eskin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.